fix(observe): blame a failed server only on the apps planned for it - #17
Merged
Merged
Conversation
A server whose poll failed reports no apps, so the fleet view attributed it to every app another replica proved existed. A single-server app then rendered as a fleet with a missing replica whenever an unrelated server was down, and an app whose only server failed vanished from the view. A failed snapshot now carries plannedApps, taken from the host plan the caller already holds, and the pivot attributes the failure to exactly those apps. The old attribute-to-everything behaviour remains for snapshots without the field.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 39 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
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. Comment |
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.
Summary
Fixes the fleet view blaming an unreachable server on apps that don't run there (raised by CodeRabbit on #16).
A server whose poll fails reports no apps, so
pivotByAppattributed it to every app another replica proved existed. Withwebon server A,apion A and B, and a database on C:webrender as a two-server fleet with an "Unreachable" warning, and put the wrong list in--json.Change
ServerSnapshot.plannedApps(new, set only on failed polls): the apps the server is configured to run. Both places that build a failed snapshot (MetricsCollector.unreachable,unreachableObserver) already hold the host plan, so they fill it in.pivotByAppblames a failed server only on its planned apps, and creates a view (with no replicas) for an app whose every server failed.plannedAppskeep the previous attribute-to-everything behaviour, so existing consumers and tests are unaffected.Verification
pivot.ts(the 4th is a sanity case that passes either way).statuson a single server is unchanged.🤖 Generated with Claude Code