fix: guard should_replace against losing completed_at on same-run - #81
Open
cgoea wants to merge 1 commit into
Open
fix: guard should_replace against losing completed_at on same-run#81cgoea wants to merge 1 commit into
cgoea wants to merge 1 commit into
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.
Motivation
is_terminal()treats a terminalstatus(failure/success/...) as sufficient on its own, independent ofcompleted_at. a job's own conclusion is known the instant it finishes, before every sibling job in its cell/run has necessarily finished too. Two same-run/attempt snapshots of the same cell or leaf can therefore both be "terminal" while differing in how much they actually know.Technical Details
Variant.should_replaceandRunLeaf.should_replaceintherock_status_document.py.should_replaceimplementations are already the sole gate consulted by `upsert_leaf'.Test Plan
test_same_attempt_terminal_with_completed_at_beats_terminal_without: an existing terminalRunLeafwithcompleted_atset must not be replaced by a same-run/attempt terminal update withcompleted_at=None.test_same_attempt_terminal_without_completed_at_replaced_by_one_with.test_variant_same_attempt_terminal_with_completed_at_not_downgraded: same guard,Variant.should_replacepath.test_merge_does_not_lose_completed_at_from_later_incomplete_snapshot.scripts/receive_therock/tests/suite to confirm no existing test relied on a same-run/attempt terminal update being able to clearcompleted_at.Test Result
All tests pass.