fix(sync): a start that never began is a failed start, not a silent return (#810) - #813
Merged
Merged
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.
Declared reviewers: 1
Closes #810.
Landing on
integration/remote. Head5255e6810cd24abbb9da9525fea192edd9a0044d.The defect, which I shipped
agmsg_sync_autostartdid this per team:Three things went with that
return, and none was announced:started/slow/failedblocks are all built after the loop, so leaving early skips every one of them;return, notcontinue.Why it costs more than it looks
#761/#765 exist so that connected, and not syncing is never silent, and #775 — mine — replaced their warning block with this function, on the stated grounds that the warning survives whenever a start fails.
tests/test_delivery.batssays so in as many words:That held for the failure the test drives, a
sync startthat runs and refuses. It did not hold here. A start that never began is also a start that failed, and on that path the operator was told nothing at all — the exact state those two issues were opened about, reachable through a door I added.mktempfailing is not a missing binary. It isTMPDIRunset to a path that does not exist, or not writable, or a full filesystem — and the last one is uncomfortable, because a start that outruns its budget deliberately leaves its two temp files behind. The feature can contribute to the condition that used to silence it.The fix
Report it as what it is, and keep going:
The
failedblock then prints the per-teambash … sync start <team>remedy that #765 established, unchanged.Test
One case, driven by putting a failing
mktemponPATH— which is what a full or unwritable temp filesystem looks like from inside this function, rather than a mock of the branch.It asserts the warning, the reason, the remedy, and both team names: the second must not be lost because the first could not allocate.
return 0restoredconnected, but not syncingis absentcontinuechanged tobreakTwo mutations, two different assertions. The second matters because a fix that only added the message would still abandon the rest of the teams, and one assertion cannot tell those apart.
Measurements
Drift
Re-measured immediately before landing.
Not in this PR
#802and#804are the same family — a failure turned into an ordinary value, and an unexpectedmktempdependency — and are left to their own issues. What is specific here is that the thing lost was a user-visible warning another issue was opened to create.Attribution
Found by review after #775 had landed, and filed as #810 rather than mentioned. I landed the defect; the reading that caught it is not mine.