feat(k8s): report instance counters onto the deployment during the wait#201
Open
pablovilas wants to merge 1 commit into
Open
feat(k8s): report instance counters onto the deployment during the wait#201pablovilas wants to merge 1 commit into
pablovilas wants to merge 1 commit into
Conversation
The wait_deployment_active loop already computes desired/launched/ready
every cycle but only printed them into the log line, so the platform had
no launched/healthy counts for k8s custom scopes (no instance meters, no
n/n chip subtitles — unlike SWM-managed scopes, which report them).
Each change in the counts now PATCHes the deployment with a partial
strategy_data body ({amount_instances_to_wait, launched_instances,
healthy_instances}) — the deployment strategies merge a partial body over
the current data server-side, so switched_traffic and friends are
untouched; this is the same contract the scope-workflow-manager uses.
Reporting is best-effort: a failed patch logs at debug and never fails
the deployment.
pablovilas
force-pushed
the
feat/k8s-report-instance-counts
branch
from
July 14, 2026 02:30
eea47a5 to
5b2653f
Compare
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
wait_deployment_activecomputesdesired/ launched /readyevery 10s but only printed them into the log line — so k8s custom-scope deployments carry nolaunched_instances/healthy_instances/amount_instances_to_waitinstrategy_data, and the dashboard can't show "X/Y launched" / "X/Y healthy" (SWM-managed scopes report these; this agent never did).strategy_databody carrying only the three counters. A partial body merges server-side — core'supdateByIddeep-merges current + incoming and every deployment strategy (blue_green,initial,external) returns the mergedstrategyData— soswitched_trafficand friends are untouched. This is byte-identical to the scope-workflow-manager's production contract (onInstancesCheckFunctionCreator).desiredis never reported (a scope that declares nothing shows nothing).initial,blue_green, andswitch_trafficworkflows all run this step, counters flow for every deploy shape, live and after the fact.With this, the deployment page's instance meters and "n/n" chip subtitles light up for k8s custom scopes with zero FE/BFF changes (pairs with nullplatform/admin-dashboard#2014, which renders counters for any scope type).
Test Plan
bats k8s/deployment/tests/wait_deployment_active.bats— 25/25 (3 new: partial-body counters patch, change-only re-reporting, failed report never fails the deployment)k8s/deployment/testssuite — the only failures (build_deployment.batsfile-type parameter / secret-files, 2) reproduce on pristinemain(c9b25bf) with this change stashed — pre-existing, unrelated.🤖 Generated with Claude Code