Skip to content

fix: Prevent rollback steps from running when not needed - #16

Merged
cameronrye merged 1 commit into
mainfrom
fix/enhance-build-verification
Nov 13, 2025
Merged

fix: Prevent rollback steps from running when not needed#16
cameronrye merged 1 commit into
mainfrom
fix/enhance-build-verification

Conversation

@cameronrye

@cameronrye cameronrye commented Nov 13, 2025

Copy link
Copy Markdown
Owner

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:

if: steps.publish.outcome == 'failure'

This condition was missing the !inputs.dry_run check. 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:

- name: Rollback on push failure
  if: ${{ !inputs.dry_run && steps.push.outcome == 'failure' }}

- name: Rollback on publish failure
  if: ${{ !inputs.dry_run && steps.publish.outcome == 'failure' }}

This ensures rollback steps only run when:

  1. Not in dry run mode
  2. The corresponding step actually failed

Changes in this PR

This PR includes two commits:

  1. Enhanced build verification (from previous PR fix: Enhance build verification in CI and release workflows #15)
  2. Fixed rollback logic (new fix)

Testing

Next Steps

Once merged, you can retry the release and it should complete successfully without false rollback triggers.

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
@cameronrye
cameronrye merged commit 68d3792 into main Nov 13, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant