Repository navigation
fix: remove the canary when activation confirmation fails - #415
Open
FlorianFranzen wants to merge 1 commit into
Open
FlorianFranzen wants to merge 1 commit into
FlorianFranzen wants to merge 1 commit into
Conversation
When the confirmation times out, `activate` rolls back but leaves the canary in `temp_path`. The next `wait` for the same closure finds it at once, the deployer confirms by deleting it before activation is done and reports success, and the new canary is never removed: the host rolls back again. Remove the canary whenever the confirmation fails, after dropping the watcher so its removal is not reported as an event.
FlorianFranzen
force-pushed
the
fix/stale-canary
branch
from
November 4, 2026 02:57
6c26522 to
8dd375b
Compare
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 changed
activation_confirmationremoves the canary when the confirmation fails, after dropping its watcher.Why
On a timeout,
activaterolled back but leftdeploy-rs-canary-<hash>intemp_path.waitreturns at once when that file already exists, so on the next deployment of the same closure the deployer confirmed by deleting the stale canary while activation was still running. The canary created after activation was then never removed, so the host timed out and rolled back, whiledeployreported success, and left a canary again. Once one confirmation had timed out, every retry of the same closure rolled back until the file was removed by hand.This may explain #214, where
Deployment confirmed.is printed before activation finishes.Validation
cargo test --all-targets(the new test fails without the fix)cargo clippy --all-targets -- --deny warningscargo fmt --check