Skip to content

feat(hotfix): thread the component through the hotfix plan and generated apply lane - #527

Merged
joshua-temple merged 1 commit into
mainfrom
feat/hotfix-plan-component
Jul 8, 2026
Merged

joshua-temple merged 1 commit into
mainfrom
feat/hotfix-plan-component

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

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 flat env/<env> branch and derived TARGET_ENV from it, so finalize looked for env/<component>/<env> that the workflow never created. The per-component hotfix lane did not compose end to end.

Fix

  • hotfix plan accepts --component and constructs env/<component>/<env> (via a distinct planner option); the single-flight check and branch creation use it.
  • 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.

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.yaml golden unchanged). Tests prove the component plan uses env/<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.

…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>
@joshua-temple
joshua-temple merged commit 92bbcb0 into main Jul 8, 2026
20 checks passed
@joshua-temple
joshua-temple deleted the feat/hotfix-plan-component branch July 8, 2026 11:39
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