Repository navigation
Mark job FAILED on any uncaught crash, not just interrupts - #98
Merged
Merged
Conversation
The summary is persisted RUNNING up front so a job is observable from the moment it starts. But execute() only caught KeyboardInterrupt/SystemExit (-> ABORTED); the async submit/collect loop only caught StopProcessing / interrupts / FatalError. An ordinary exception in an uncovered phase — e.g. an HTTP 402 from a source API during submit — propagated uncaught, so the up-front RUNNING summary was never updated and monitoring kept reading the job as "still running" forever. Add a top-level backstop in execute(): on any other exception, flip a still-RUNNING summary to FAILED (set_exception) and persist it before re-raising. It only acts when the summary is still RUNNING, so richer inner handlers that already recorded partial results are left untouched. Catch Exception (not BaseException) so GeneratorExit/interrupts are unaffected. Claude-Session: https://claude.ai/code/session_01B5EfLJqoafjW1FhvkxGSmg
Python 3.9 is end-of-life and setup-python no longer provides it on the GitHub-hosted runners, so those matrix legs fail to start. Test on 3.10–3.12. Claude-Session: https://claude.ai/code/session_01B5EfLJqoafjW1FhvkxGSmg
SQLAlchemy 2.1 makes psycopg (v3) the default dialect for a plain `postgresql://` URL (psycopg2 was the default before), so the job failed with "No module named 'psycopg'" while only psycopg2-binary was installed. Install both drivers so the job passes whichever SQLAlchemy version resolves. Claude-Session: https://claude.ai/code/session_01B5EfLJqoafjW1FhvkxGSmg
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.
The summary is persisted RUNNING up front so a job is observable from the moment it starts. But execute() only caught KeyboardInterrupt/SystemExit (-> ABORTED); the async submit/collect loop only caught StopProcessing / interrupts / FatalError. An ordinary exception in an uncovered phase — e.g. an HTTP 402 from a source API during submit — propagated uncaught, so the up-front RUNNING summary was never updated and monitoring kept reading the job as "still running" forever.
Add a top-level backstop in execute(): on any other exception, flip a still-RUNNING summary to FAILED (set_exception) and persist it before re-raising. It only acts when the summary is still RUNNING, so richer inner handlers that already recorded partial results are left untouched. Catch Exception (not BaseException) so GeneratorExit/interrupts are unaffected.