Add FatalError: fail the run loudly (exit 1) on unrecoverable source errors#90
Merged
Conversation
…errors StopProcessing stops a run gracefully (exit 2). FatalError is its counterpart for unrecoverable, non-retryable problems (e.g. a deactivated account): the source/loader raises it, ingestify propagates it out of find_datasets/collect instead of swallowing it as a skipped find_datasets, and the CLI exits non-zero so schedulers surface the failure. Claude-Session: https://claude.ai/code/session_01B5EfLJqoafjW1FhvkxGSmg
…sing controlled Two fixes on top of the FatalError work: 1. FatalError now persists the summary (as FAILED) before aborting. The loader has no finally to save an in-progress summary, so a bare re-raise lost the record entirely. It now set_exception + yields (so the loader stores it) + re-raises, at each point FatalError can surface. 2. The async submit/collect path had NO stop/fail handling at all: a StopProcessing (e.g. quota) or FatalError raised while collecting propagated without ever persisting the summary. Added a handler mirroring the sync path so StopProcessing saves a FINISHED summary (controlled stop) and FatalError a FAILED one. StopProcessing keeps its own controlled-stop semantics and is no longer folded into FatalError's re-raise clauses — only FatalError forces the hard stop. 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.
StopProcessing stops a run gracefully (exit 2). FatalError is its counterpart for unrecoverable, non-retryable problems (e.g. a deactivated account): the source/loader raises it, ingestify propagates it out of find_datasets/collect instead of swallowing it as a skipped find_datasets, and the CLI exits non-zero so schedulers surface the failure.