Conversation
The commit retry loop only recognised 409 and 412, so a 500 from the Hub raised on the first attempt and took the adapter's whole nightly job with it. A 5xx means the Hub failed to apply the commit rather than refusing one, so nothing landed and replaying the same operations is safe. is_transient_hub_error answers that separately from is_commit_conflict, so neither predicate's name covers a case it does not judge, and the three call sites gate on is_retryable_commit_error. The datastore submitter still retries only where it proved the batch absent, so a retry cannot duplicate records. Matched against the Hub's "Server error '5xx" clause rather than a bare status number, because request ids in these messages contain digit runs that would otherwise read as a status.
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.
What happens today
mt_benchfailed in the 2026-09-10 nightly on this, and nothing about it was the adapter's fault:The retry loop in
cron/store.pyis guarded byis_commit_conflict, which recognises 409 and 412 and nothing else. A 500 is therefore not retryable, so the very first attempt raisesStoreErrorand the job dies — with eight attempts and jittered backoff sitting unused right beside it. One bad minute on the Hub costs that source its whole day.The change
A 5xx means the Hub failed to apply the commit rather than refusing one, so nothing landed and replaying the same operations is safe. That is a different question from "did I lose a race", so it gets its own predicate rather than widening
is_commit_conflictpast what its name and docstring claim:is_transient_hub_error— 500, 502, 503, 504is_retryable_commit_error— either that or a conflictThree call sites now gate on the combined predicate:
RawStore.commit,DatastoreSubmitter.publish, andFlatPublisher._commit_batchin the flat rebuild that just landed. The submitter's existing guard is untouched, so it still retries only where_landed_anywayproved the batch absent and a retry cannot duplicate records.Status matching goes against the Hub's
Server error '5xxclause rather than a bare number. These messages carry request ids likeRoot=1-6aa264f2-3b5a4040556d7a837e54029b, and a digit run inside one must not read as a status —test_a_request_id_holding_a_status_number_is_not_a_statuspins that.Tests
1422 passed, 1 skipped, ruff clean. Four new, one amended:500is not a server faultretry_waitsfixture, since it retries before reportingScope
This does not fix the other two nightly failures.
halis #289 andterminal_bench_2is #290, both still awaiting review. Those three are the whole of the current nightly redness, and the nightly being red also means theFlat rebuildworkflow'sworkflow_runtrigger never fires — only its 01:14 catch-up schedule does.