Skip to content

Say what CRAB returned when its status cannot be read - #19

Merged
kandrosov merged 1 commit into
cms-flaf:mainfrom
kandrosov:crab-status-diagnostics
Aug 28, 2026
Merged

Say what CRAB returned when its status cannot be read#19
kandrosov merged 1 commit into
cms-flaf:mainfrom
kandrosov:crab-status-diagnostics

Conversation

@kandrosov

Copy link
Copy Markdown
Contributor

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. An
unreadable status response therefore cannot be diagnosed after the fact.

That is now the blocker: running law's exact invocation (same command, same cmssw_env, same
project directory) against both live tasks returns a perfectly parseable response —

exit code: 0 | stdout bytes: 1312630
  Status on the CRAB server:  SUBMITTED
  Status on the scheduler:    RUNNING

— 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_output is overridden to re-raise with the head of the response attached (first 12
lines, 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.

@kandrosov
kandrosov merged commit 59bb1b5 into cms-flaf:main Aug 28, 2026
3 checks passed
@kandrosov
kandrosov deleted the crab-status-diagnostics branch August 28, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant