Repository navigation
fix(deploy): preserve-live worker verify and rollback tolerate HPA replicas and CronJob history - #25752
Merged
Conversation
…plicas and CronJob history The image-only helper hashed each Deployment's whole spec, including the HPA-owned replica count, and bound every CronJob-spawned Job. HPA rescaling or hourly record-seal Job turnover therefore failed post-roll verify (run 43619755069 on 2026-11-14 moved the image, then refused with post-roll runtime/consumer drift) and made the documented inverse unrunnable while the worker autoscales. Identity hashes now exclude .spec.replicas on Deployments and StatefulSets, and Jobs controlled by a CronJob in the same read are omitted as run history. Image/digest, UID, other spec drift, standalone Jobs, unknown-controller Jobs and an activated T4 fallback still refuse; the admission dry-run and CAS write still compare the full spec. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…icas and mismatched owned Jobs Panel review-20261119t043424-48d8 F1-F8: re-check the T4 fallback on the final pre-write read (containers and init containers), exclude replicas only for the worker and record-seal-worker, keep a CronJob-owned Job bound when its worker images differ from the owner's jobTemplate, ignore uid-less owner references, and tighten the turnover and replay tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…AS from a fresh read Panel review-20261119t050359-7770 F1-F9: replica exclusion requires a live HPA per listed Deployment, bound by UID and spec hash; a CronJob-owned Job is omitted only when its generated name and whole run equal the owner's jobTemplate (plus controller defaults); the CAS patch is rebuilt from a fresh target read so an HPA rescale mid-deploy no longer conflicts; runbook covers pre-change receipts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…sion; fresh read before dry-run Panel review-20261119t055004-708a F1-F4. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…chart tripwire Panel review-20261119t060937-9adc F1, F2, F4, F5, F6, F9 (F3, F7, F8 rejected with reasons in the PR). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Git-on-my-level
deleted the
fix/worker-image-only-autoscale-tolerance
branch
November 19, 2026 07:17
This was referenced Nov 19, 2026
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.
What
.github/scripts/worker_image_only.pyis the preserve-live writer forgcp_diarizer.yml. Its post-rollverifyand its rollback precondition (the fresh baseline must equal the receipt'safteridentity plus consumers) compared:.spec, which includes the HPA-owned replica count;Rescaling and Job history rotation therefore refused both operations even though no release action changed anything.
Production evidence (read-only, ro-prod):
record-seal-sweeperCronJob (0 * * * *) rotates its Job history every hour.record-seal-workerhas its own HPA (1-16).verifywithpost-roll runtime/consumer drift.Change
.spec.replicasonly on the two HPA-scaled Deployments: the worker andrecord-seal-worker(HPA_DEPLOYMENTS). The exclusion applies only while the same namespace read proves exactly one live HPA (minReplicas >= 1) targeting each of them throughapps/v1. Those HPAs are bound by UID and spec hash, so removing, retargeting or reconfiguring one refuses. The operator-scaled T4 fallback, StatefulSets and every other workload keep it bound. Nothing else is excluded.<cronjob>-<digits>, and whose run equals that CronJob's jobTemplate. The pod spec and template annotations must be identical, labels may differ only by the four controller-generated labels (which must carry this Job's own UID and name), the selector must be exactly the controller'sbatch.kubernetes.io/controller-uidselector, and every Job field must equal the template or a controller default. That is CronJob run history. Any other Job (different digest, parallelism, suspend, a hand-made name) stays bound. The CronJob itself stays bound, so ajobTemplate, schedule or image change still refuses. Owned Jobs are still image-validated (a mutable image refuses).verify.Tests
python3 .github/scripts/test_worker_image_only.pypasses: 48 tests, 30 new. Before the fix, the four tolerance tests and the replay errored with the production refusal, and the T4-at-verify test failed.minReadySeconds, nodeSelector, CronJob schedule or sibling serviceAccount change;replicasas their example of drift now use non-autoscaled fields.Panels review-20261119t043424-48d8 (8 findings), review-20261119t050359-7770 (9) and review-20261119t055004-708a (4): all accepted and fixed in commits 2-4. Panel review-20261119t060937-9adc (9) was triaged in commit 5:
backendimage, not the worker image, so its Jobs never enter the worker-image inventory); F7 (an extra admission-added annotation keeps the Job bound, which refuses rather than passes, and the live sweeper Jobs match exactly); F8 (a renamed or StatefulSet fallback keeps its replicas bound in the drift hash, so activation still refuses).Live check (read-only, ro-prod): the target identity hash was identical (87d19f3…) at 04:31Z (10 replicas) and 05:32Z (8 replicas) and 06:07Z. The new
inventoryon prod returns the target plusrecord-seal-sweeper, T4,record-seal-workerand both HPAs, and omits the live sweeper Job history under the strict template match.Permissions
No new permissions. The workflow's GKE identity
omi-ci-deployer-prodholdsroles/container.developeronbased-hardware(read 2026-11-19 with ro-prodget-iam-policy), which includes get/list onautoscaling/horizontalpodautoscalers. An unavailable read still fails closed.Product invariants affected
none
Failure class (fixes)
Failure-Class: none
Deploy-tooling fix; the closest class (
FC-readback-verifier-treats-omitted-proto-default-as-drift) covers proto-default serialization, not controller-owned fields.🤖 Generated with Claude Code