fix: Prevent rollback steps from running when not needed - #16
Merged
Conversation
The rollback steps were incorrectly evaluating when the publish/push steps were skipped due to dry_run mode. This caused the workflow to fail even when the actual release steps succeeded. Added dry_run check to both rollback step conditions to ensure they only run when: 1. Not in dry run mode 2. The corresponding step actually failed
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.
Problem
After merging the build verification improvements, the actual release (run #3) failed because the rollback steps were incorrectly evaluating their conditions. The "Rollback on publish failure" step ran even though the publish succeeded, causing the workflow to fail.
Root Cause
The rollback steps had incomplete conditional logic:
This condition was missing the
!inputs.dry_runcheck. When steps were skipped due to dry run mode, the rollback conditions were evaluating incorrectly.Solution
Updated both rollback step conditions to include the dry run check:
This ensures rollback steps only run when:
Changes in this PR
This PR includes two commits:
Testing
Next Steps
Once merged, you can retry the release and it should complete successfully without false rollback triggers.