Skip to content

Relax the hold on schedule when the surge itself fails - #10

Merged
kylan11 merged 1 commit into
mitis-cloud:mainfrom
0xmichalis:fix/bound-hold-on-surge-failure
Oct 19, 2026
Merged

kylan11 merged 1 commit into
mitis-cloud:mainfrom
0xmichalis:fix/bound-hold-on-surge-failure

Conversation

@0xmichalis

Copy link
Copy Markdown
Contributor

Summary

  • reconcileDoomed returned as soon as PatchReplicas (or stampDeletionCosts) failed, before the status patch. BlockedSince was therefore never persisted, so readinessDeadlineSeconds never started counting, the phase never became Relaxed, and the webhook kept answering 429 for as long as the error lasted, i.e. until the drainer gave up. understudy_oldest_blocked_eviction_seconds also restarted from zero on every reconcile, so the alert the README recommends could not fire. Anything that persistently refuses the replica patch triggers it: a policy engine or ValidatingAdmissionPolicy, or missing Rollout permissions with rbac.create: false.
  • On a failed surge, carry on to the status patch: record the hold, report SurgeReady=False with reason SurgeFailed plus a Warning event, and let the existing relax decision run. The surge is retried on every reconcile while the doom lasts.
  • The reconcile now returns RequeueAfter: activeRequeue instead of the error, so retries are paced at 5 s rather than by the exponential backoff, which could otherwise delay the relax well past the deadline. A conflicting write still triggers an immediate reconcile through the target watch.
  • Docs: the never-wedge paragraph in how-it-works covers refused surges.

Verification

  • New envtest spec denies replica changes on the target with a ValidatingAdmissionPolicy. On main the status never records the hold (the reconciler loops on the denial in backoff and the spec times out). With this change it reports SurgeFailed with BlockedSince set, turns Relaxed after readinessDeadlineSeconds, and the eviction is admitted while the replicas stay at 1.
  • Existing never-wedge specs, make test lint build and the ARGO_ROLLOUTS_CRD= "Optional Rollout API" run: passed, no generated-file drift.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 17, 2026 19:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@kylan11
kylan11 merged commit 8c2ee3c into mitis-cloud:main Oct 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants