Repository navigation
fix: retry transient schema request failures - #1290
Merged
datho7561 merged 1 commit intoOct 2, 2026
Merged
Conversation
Retries remote schema requests that fail with 429, 502, 503 or 504, or with a connection reset or timeout, at most twice, honouring Retry-After and capping the wait at one second. Other failures, including 304 and 404, are not retried. Mirrors yaml-language-server#1342 for the client's own request path.
Contributor
Author
|
Thanks for testing it by hand and for the quick merge, @datho7561. |
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.
Retries remote schema requests that fail for a temporary reason, instead of treating the first failure as final. This is the client side of redhat-developer/yaml-language-server#1342: the extension fetches schemas through its own request path, so the language server change does not reach it.
Retried: HTTP 429, 502, 503, 504, and connection errors. Everything else, including 304, 403 and 404, fails immediately as before. Retry-After is honoured, otherwise exponential backoff with jitter. Each wait is capped at 1s and there are at most 2 retries, so schema loading cannot stall editing for long. The final error is rethrown unchanged.
Fixes #1284
16 unit tests cover error classification, Retry-After parsing, delay capping, retry budget and no-retry cases. The logic lives in a module with no vscode import so it runs without the extension host. Lint, type check and webpack build pass. I did not run the full vscode-test suite locally.