feat(rollback): record per-component rollback state and namespace the rollback ref - #525
Merged
Merged
Conversation
… rollback ref Rollback for a selected component records its state at state.components.<name>.<env> through the scoped serializer, preserving a sibling component's state across the CommitWithRetry re-apply on a 409. The rollback ref becomes rollback/<component>/<env> (rollback/<env> byte-identical when no component). First-environment eligibility and the previous-version ring are judged against the component's own environment subset, read from its overlaid state rows, so a component is never blocked or targeted by a sibling's ladder. An empty component keeps every path flat and byte-identical. Refs #294. 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
Rollback records state and eligibility against the flat, global env ladder. For a multi-component repo each component must roll back on its own state, its own environment subset, and its own ref namespace, without touching a sibling.
Fix
state.components.<name>.<env>viaWriteScopedState, preserving a sibling's state under theCommitWithRetry409 re-apply.rollback/<component>/<env>(rollback/<env>byte-identical when no component).Scope is the rollback runtime. The generator emitting
--componenton the rollback workflow and the lifecycle e2e are separate changes.Verification
go build ./...,go test ./...(2634 pass),go test -raceon rollback+config (590 pass),golangci-lint run ./...clean; single-component byte-identical baseline gate green. Tests prove per-component state recording, a concurrent rollback-finalize 409 re-apply that preserves the sibling verbatim (including an unmodeled key), the namespaced ref, first-env scoped to the component's ladder, and the single-component path unchanged.Refs #294.