feat(hotfix): thread the component through the hotfix plan and generated apply lane - #527
Merged
Merged
Conversation
…ted apply lane The generated per-component hotfix workflow calls hotfix plan --component, but the plan command did not register the flag and the apply lane materialized a flat env/<env> branch, so finalize looked for env/<component>/<env> that never existed. hotfix plan now accepts --component and constructs env/<component>/<env>; the generated apply lane materializes and protects env/<component>/<env>, and the context job derives TARGET_ENV by stripping the component-aware prefix. Plan, apply, and finalize now agree on the same env branch. A single component keeps env/<env> and the flat TARGET_ENV, byte-identical. Refs #293. 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 generated per-component hotfix workflow calls
hotfix plan --component <name>, but the plan command never registered--component, so Cobra rejected it and the plan job failed. The generated apply lane also materialized a flatenv/<env>branch and derivedTARGET_ENVfrom it, so finalize looked forenv/<component>/<env>that the workflow never created. The per-component hotfix lane did not compose end to end.Fix
hotfix planaccepts--componentand constructsenv/<component>/<env>(via a distinct planner option); the single-flight check and branch creation use it.env/<component>/<env>, and the context job derivesTARGET_ENVby stripping the component-aware prefix.env/<env>and the flatTARGET_ENV, byte-identical.Verification
go build ./...,go test ./...(2647 pass),go test ./... -race(2647 pass),golangci-lint run ./...clean; e2e module build+vet clean. Single-component byte-identical baseline gate green (cascade-hotfix.yamlgolden unchanged). Tests prove the component plan usesenv/<component>/<env>, the apply lane materializes and strips it, plan and finalize both carry--component, and the single-component flat form is byte-identical.Refs #293.