Record a failed API response as a failure - #29
Open
marvinm2 wants to merge 1 commit into
Open
Conversation
write_stats_response checked the type of the response but not its status, so the body of an error reply was written to tmp/ as though it were data. The report generator then found no usable rows, preserved the previous ones, and the run finished green. That is why GitHub views and clones stopped at 2026-W14 while every weekly run since has reported success: the traffic endpoints need a token, and once the call started failing there was nothing to say so. Non-2xx responses now go to failed/ with the status logged, which is what that folder is for.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #28.
write_stats_responsechecked the type of the response but not its status, so the body of an error reply was written totmp/as though it were collected data. The report generator then found no usable rows, preserved the previous ones, and the run finished green.Non-2xx responses now go to
failed/with the status logged, which is what that folder appears to be for. Thepd.Seriesand unexpected-type paths are unchanged.This does not recover the missing GitHub weeks and does not fix whatever made the traffic calls start failing. It only means the next failure is visible rather than silent.
Two tests added alongside the existing
write_stats_responseones, checking that an error status is filed underfailed/and that the error body is not written as data.Run with
python -m unittest discover -s testsfrom the repo root. Two tests intest_galaxy.pyfail on my machine, but they fail the same way on an unmodifiedmain, so they look unrelated to this change.