feat(fleet): add shared fleet-repin composite action - #467
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
The mutation logic that repins each example repo to the rc under test lives inline in the
repinjob offleet-e2e.yaml, where it clones every repo fresh. There is no reusable unit that a suite can call to repin the checkout it already has, and no automated coverage of the version+sha repin contract.Fix
Adds
.github/actions/fleet-repin/action.yaml, a composite action carrying the repin mutation, install-and-assert, push-retry, and read-back-verify logic. It differs from the parent job by mutating the job's EXISTING checkout in place and leaving the workspace at the pushed commit, so later steps in the same job read the repinned manifest.The action is INERT: no caller is wired up, so fleet runs are byte-for-byte unchanged. Behavioral contract (all fail-closed):
stablekernel/cascadeand its self-reported version is asserted against the dispatched tag before anything is mutated.cli_version/cli_version_shaare set, other in-repo prerelease refs rewritten, workflows regenerated, then pushed to main with a bounded fetch/reset/re-apply retry loop (normal push, DCO sign-off, no GPG).Adds e2e scenario
45-fleet-repin-version-sha-idempotent.yamlcovering the CLI-level contract: apin_mode: shamanifest carrying acli_version+cli_version_shapair emits sha-mode refs,generate-workflow --forceregenerates drift-free and idempotent, and both pin fields survive.Verification
go build ./...,go test ./...(2351 pass),golangci-lint run ./...: cleancd e2e && go build ./... && go vet ./...: cleanshellcheck -s bashover the embedded action script: cleanactionlintover the workflows tree: no new findings