Skip to content

fix(deploy): give activation a 120s health window, configurable per service - #11459

Merged
dezren39 merged 1 commit into
mainfrom
fix/11170-deploy-health-window
Nov 18, 2026
Merged

dezren39 merged 1 commit into
mainfrom
fix/11170-deploy-health-window

Conversation

@dezren39

@dezren39 dezren39 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Closes #11170.

Before: after a deploy restarts a service, it probes the health check 10 times, half a second apart, which gives the service about 5 seconds to be ready. secrets-broker answers 503 until its first Bitwarden refresh finishes, which took about 40 seconds on the laptop. So its first activation could never pass, and the flip-back stopped the service.

After: activation keeps probing for 120 seconds by default. A definition can set its own window with the new optional field healthTimeoutSeconds (1 to 3600). A service stuck on 503 for 40 or 60 seconds now activates. One that never gets ready still fails, with a message like HTTP 503 (still failing after 120s).

How:

  • wait_health runs against a deadline. It retries every failure until the window closes, whether the endpoint answers 503 or isn't listening yet, because a cold-starting service can be in either state.
  • healthTimeoutSeconds is validated as an optional field; unknown fields are still refused.
  • The dry-run plan's health step names the window.
  • The design doc (§4.1) records the choice.

Testing:

  • test_deploy_slice3.py: 15 pass, 8 of them new. They run on a fake clock, so the long window costs no real time. They cover:
    • a 40-second and a 60-second cold start passing the default window;
    • a service that never gets ready failing exactly when the window closes;
    • unreachable endpoints being retried;
    • activation honouring the definition's window;
    • validation bounds;
    • the plan text.
  • test_deploy_slice2.py, test_argv.py and the three property suites still pass.
  • The rerun of secrets-broker's first activation on the laptop belongs to Migration M2: one declaration for the fleet three (laptop-agent, secrets-broker, queue-broker) #5769, as the issue says.

Generated by Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…ervice (#11170)

wait_health probed ten times at half-second intervals, about five
seconds. secrets-broker answers 503 until its first Bitwarden refresh
finishes (about 40 seconds on the laptop), so its first activation
could never pass and the flip-back stopped it.

Activation now retries every failure, 503 or not listening, until a
window closes: 120 seconds, or the definition's optional
healthTimeoutSeconds (1..3600). The plan names the window, and the
design doc records the choice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dezren39
dezren39 marked this pull request as ready for review November 18, 2026 00:50
@dezren39
dezren39 requested a review from a team as a code owner November 18, 2026 00:50
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T00:52:04.871118Z 1f3941f Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

deploy: health probe window (~5s) is shorter than cold-start readiness (secrets-broker first activation cannot pass)

2 participants