Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approved
No active review issues are reported for the change to fail explicitly when a requested rollback version is unavailable.
No open issues 🎉
What changed in this PR
This PR makes rollback to an unavailable container version fail with a non-zero exit status, so scripts and CI no longer report success when no rollback occurred.
Changes:
- Raise an error instead of printing a warning when the requested version is unavailable.
- Remove the rollback flag; successful boot now leads directly to the post-deploy hook.
- Update the failure test to assert the exception, lock release, and skipped hooks.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
| File | Description |
|---|---|
test/cli/main_test.rb |
Assert unavailable-version errors, lock release, and no hook execution. |
lib/kamal/cli/main.rb |
Raise on unavailable rollback versions and simplify post-deploy hook execution. |
Review effort: Balanced
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.
kamal rollback VERSIONprinted "The app version 'VERSION' is not available as a container" when no host had that version, then exited 0. Scripts and CI saw a successful rollback while the old version kept running.It now raises with the same message, so
bin/kamalprints the error and exits 1.with_lockreleases the deploy lock on the way out and neither hook runs. Therolled_backflag is gone: the post-deploy hook is only reached after a boot now.Related to #1658, where
kamal rollback --helplands in this same branch.