feat(promote): scope hotfix rejoin cleanup to the component - #524
Merged
Merged
Conversation
When a hotfix rejoins trunk, the lifecycle cleanup recovers the component by parsing the recorded env ref before it is cleared, then deletes env/<component>/<env> (via EnvBranchName) and collects hotfix tags under the component's strict tag grammar. A single-component rejoin parses to an empty component, deletes env/<env>, and uses the default grammar, byte-identical. This keeps a component's rejoin from orphaning or cross-deleting a sibling's env branch and from missing its own component-namespaced hotfix tags. 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
After hotfix branches became
env/<component>/<env>and hotfix tags component-namespaced, the promote rejoin cleanup still deletedenv/<env>and collected hotfix tags with the manifest default grammar. For a multi-component repo that orphans or cross-deletes a component's branch and never sees its tags.Fix
ParseEnvBranch) before it is cleared, and threads it onto the rejoin event.env/<component>/<env>viaEnvBranchName; tag collection resolves the component's strict tag grammar.env/<env>, and uses the default grammar, byte-identical.Scope is the rejoin/lifecycle-cleanup path. Rollback per-component and the generator emitting
--componenton the hotfix workflow are separate changes.Verification
go build ./...,go test ./...(2628 pass),go test ./... -race(2628 pass),golangci-lint run ./...clean; single-component byte-identical baseline gate green. Tests prove component-scoped branch deletion (env/api/test), no sibling cross-delete (env/web/stagingnever touched), tag collection scoped to the component's namespace, and the single-component path unchanged.Refs #293.