fix(hotfix): converge the release on finalize rerun instead of skipping it - #592
Merged
Merged
Conversation
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
The hotfix finalize convergence rerun routes through Manager.update via ActionUpdate. update() called findRelease unconditionally, but the Gitea e2e backend rejects the GitHub release-object shape and Bearer auth, so the lookup errored and the rerun (hotfix-clean-apply step 11) failed in the harness. Mirror create()'s existing non-GitHub guard: delegate to create() so the tag is materialized and a synthetic success returned. Real-GitHub release-object convergence is covered by the finalize rerun unit test and the live fleet. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
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.
The hotfix finalize idempotency gate (prior.SHA == mergeSHA) returned early BEFORE the release was created. If the release API blipped after the state marker was committed, the run failed and the rerun short-circuited to green while the tag/release was never created (silent green-with-missing-release, violating rerun-safety).
Fix: the idempotency path now CONVERGES the release via find-or-create (release.ActionUpdate; tag-create treats HTTP 422 as success) using the version already recorded in state. Chosen over reordering because allocateVersion skips existing tags, so create-release-before-state would mint a duplicate version on rerun; state-first pins the version and the rerun converges on the same tag.
Verification: build/-race/lint green, 3051 tests; TestFinalize_RerunAfterReleaseFailure_CreatesRelease (fail-before/pass-after) + a dry-run guard + an e2e hotfix rerun replay asserting stable state and a green rerun.