fix: hand resolved version-under-test to auto-promote via artifact - #221
Merged
Merged
Conversation
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.
Problem
Auto-promote on green fleetderives the rc version fromworkflow_run.head_branch. When the fleet is dispatched onmainwith-f cascade_version=vX.Y.Z-rc.N(the documented trigger),head_branchismain, not the rc tag, so the rc-shape gate fails andpromote=false. A fully green fleet then silently skips promotion. Aworkflow_rundoes not inherit the triggering run's dispatch inputs, so the validated version is known only inside the fleet run.Fix
Carry the resolved version-under-test across the
workflow_runboundary as a build artifact.fleet-e2e.yaml(resolve job): write the exact resolved$VERSION(the value every suite is pinned to) toversion-under-test.txtand upload it as theversion-under-testartifact.auto-promote.yaml(resolve job): download that artifact from the triggering run (run-id,github-token) and read it as the authoritative rc. Fall back to the existinghead_branch/head_sha-> tag lookup only when the artifact is absent (back-compat for a tag-push-triggered fleet). The rc-shape gate (^vX.Y.Z-rc.N$) is unchanged, so a missing/invalid version stays a cleanpromote=falseno-op. Addedactions: readis required for the cross-run artifact download.Actions pinned by SHA to match repo style:
upload-artifactv7.0.1 (existing pin),download-artifactv5.0.0.Verification
actionlintclean on both workflows.go build ./...ok,golangci-lint run ./...0 issues,e2emodule builds. Allgo test ./...pass exceptTestNormalizeWorkflowPath_ActionlintClean, which fails identically on cleanmain(a local actionlint path-resolution artifact, unrelated to this change).