fix(webservice): health-monitor skips projects with an in-flight deploy#2730
Merged
Merged
Conversation
The health-monitor probed live web services and recovered after 3 failures, but a fresh deploy's `docker compose up --build` legitimately returns errors for minutes — so the monitor raced the initial deploy and fired a redundant restart-in-place (the benign "superseded" seen on find-ai's first prod deploy). Worse, for a slow build it could repeatedly interrupt it. Skip recovery for any project whose latest web_service_deploy is pending or building; clear accrued failures so a real failure after the deploy still recovers normally. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
The web-service health-monitor probed active services and recovered after 3 consecutive failures — but a fresh deploy's
docker compose up --buildlegitimately 502s for minutes. So the monitor raced the initial deploy and fired a redundant restart-in-place (the benignsupersededwe saw on find-ai's first prod deploy); for a slow build it could repeatedly interrupt it.Fix: skip recovery for any project whose latest
web_service_deployispending/building, and clear accrued failures so a genuine post-deploy failure still recovers.Unit test covers the status gate (pending/building → skip; live/failed/superseded/none → probe normally).
go test ./pkg/webservice/green.🤖 Generated with Claude Code