fix: prevent false service error alerts during operations#6279
Merged
Conversation
Test Results 32 files ±0 64 suites ±0 6m 17s ⏱️ +47s For more details on these failures, see this check. Results for commit fb7467c. ± Comparison against base commit 89b8867. ♻️ This comment has been updated with latest results. |
0c258dd to
c2d8ae9
Compare
dd091d2 to
46064ef
Compare
The 'Something went wrong' dialog appeared during long operations such as policy import or dry-run even though they succeeded. The api-gateway polled service health by broadcasting GET_STATUS and discarding any reply later than 300ms. A service that is merely busy answers the poll late, so it looked identical to a crashed one and was reported as not ready, tripping the dialog mid-operation. Track service liveness by the recency of any status reply instead of a single 300ms snapshot. The gateway now keeps a persistent SEND_STATUS listener that records every reply (including late ones) and reports a service as unavailable only once it has been silent past a TTL of ~2 heartbeats. A busy-but-alive service keeps its liveness fresh, so it is no longer confused with a crashed one, while a genuinely down service is still detected. The frontend keys the dialog off that signal with a short grace re-check (so a brief restart blip is ignored), resets the alert on recovery so a future outage is reported again, and clears the pending check when the socket closes. Signed-off-by: Alex Piatakov <alex.piatakov@swirldslabs.com>
46064ef to
fb7467c
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.
Description
Resolves #6281