Repository navigation
fix(server): providers keep their saved status until the first check finishes #34678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+144
−15
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
901987b
test(server): boot keeps the cached provider status over the pending …
juliusmarminge 9d1bc55
fix(server): providers keep their saved status until the first check …
juliusmarminge 0bf13ec
fix(server): a check that finishes before boot wins over the saved st…
juliusmarminge 5b5a0dd
fix(server): save a check that finished before boot when no cache exists
juliusmarminge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read the first-check flag before the snapshot in both sync paths.
The snapshot and the flag are read in separate steps. If the first check completes between them, the placeholder is paired with
false.awaitingBootInstances, so the placeholder is included in the initial upsert at line 943 withpublish: falseand is persisted.syncProviderreceives the placeholder. If the completed result was already synced through the stream, the placeholder replaces it.Read
isAwaitingFirstCheckbefore the snapshot. If the flag isfalse, the first check has already completed, so the snapshot read afterward returns the completed result. Atrueresult keeps the existing refresh path. This assumes the flag does not return totrueafter the first check completes.For the live path, this edit moves the snapshot read below the guard:
Suggested fix
For the boot path, move the
isAwaitingFirstCheckloop above the fallback snapshot reads. Keep theawaitingBootInstancesset and its placeholder logic unchanged.Add a test that completes the first check between the two reads, using the existing boot or live-sync case.