Say what CRAB returned when its status cannot be read - #19
Merged
Conversation
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.
Why
The tolerance added in #18 keeps the production running, but its message repeats law's error, and
law's error names only the value it ended up with —
but got 'None'— never the output it read. Anunreadable status response therefore cannot be diagnosed after the fact.
That is now the blocker: running law's exact invocation (same command, same
cmssw_env, sameproject directory) against both live tasks returns a perfectly parseable response —
— and law's own parser extracts all six fields from it. So the failure cannot be reproduced from
outside the running process, and the only way to learn what it sees is to have it say so.
Change
parse_query_outputis overridden to re-raise with the head of the response attached (first 12lines, JSON excluded — the status lines are all near the top and the per-job JSON is megabytes).
The message #18 prints then carries it, so the next occurrence shows whether CRAB returned an
error page, a throttling notice, a truncated response, or nothing at all.
No behaviour change: the same exception is raised in the same cases, and #18's retry-then-degrade
path is untouched.
Testing
A response with no status line now raises an error containing both law's original text and the
offending lines. Verified directly on
parse_query_output.