Add release orchestration state to local apply flow#396
Merged
Conversation
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.
Summary
This PR advances release-orchestration state for local app applies.
It adds richer release states and threads them through the local app release model, then introduces the first real local replacement-apply path instead of treating every apply as a fresh start.
What Changed
partially_failedrelease status and propagated it through local rolling-update handlingcompletedandfailedstartAll()pathWhy
Before this change, release state became richer in the shared model and cluster path, but the local app-apply path still treated every apply as a fresh startup and could not express partial replacement outcomes cleanly.
This closes that gap by giving local apply the minimum orchestration seams and branch logic needed to behave like a replacement flow when services already exist.
Validation
All checks were run serially, one test command at a time, with
YOQ_SKIP_SLOW_TESTS=1.zig build test -Doptimize=ReleaseSafe -Dtest-filter='app apply route preserves partially failed release metadata across reads'zig build test -Doptimize=ReleaseSafe -Dtest-filter='pause failure after cutover becomes partially failed'zig build test -Doptimize=ReleaseSafe -Dtest-filter='markAppReleaseStatus persists partially failed state'zig build test -Doptimize=ReleaseSafe -Dtest-filter='materializeMessage defaults are operator friendly for orchestration states'zig build test -Doptimize=ReleaseSafe -Dtest-filter='appStatusFromReport preserves partially failed local release state'zig build test -Doptimize=ReleaseSafe -Dtest-filter='historyEntryFromDeployment preserves partially failed local release state'zig build test -Doptimize=ReleaseSafe -Dtest-filter='PreparedLocalApply detects replacement candidates from existing app containers'zig build test -Doptimize=ReleaseSafe -Dtest-filter='startServiceByIndex launches a single service thread'zig build test -Doptimize=ReleaseSafe -Dtest-filter='stopServiceByIndex marks running service stopped without pid'zig build test -Doptimize=ReleaseSafe -Dtest-filter='PreparedLocalApply classifies replacement and new service indexes'zig build test -Doptimize=ReleaseSafe -Dtest-filter='syncExistingServiceStates marks selected running services'zig build test -Doptimize=ReleaseSafe -Dtest-filter='runReplacementPlan counts started and replaced services'zig build test -Doptimize=ReleaseSafe -Dtest-filter='runReplacementPlan reports partial failure after mutation'zig build test -Doptimize=ReleaseSafe -Dtest-filter='runScopedApply chooses replacement branch for replacement candidates'Impact
Local app applies now have a clearer release-state model and a real replacement branch, which reduces drift between local and remote orchestration behavior and gives status/history a more accurate view of what happened during local apply.