Validate and retry manifest fetch to prevent silent failures#1332
Open
priyagupta108 wants to merge 2 commits into
Open
Validate and retry manifest fetch to prevent silent failures#1332priyagupta108 wants to merge 2 commits into
priyagupta108 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens Python versions manifest retrieval by validating manifest shape/content, adding bounded retries with exponential backoff for transient failures, skipping retries on rate-limit responses, and surfacing a hard failure when both manifest sources are exhausted (instead of silently succeeding).
Changes:
- Add manifest validation (non-empty list of
IToolRelease) and a shared retry/backoff fetch helper. - Skip retry/backoff when errors indicate rate limiting (HTTP 403/429), falling back to the alternate source immediately.
- Expand unit tests to cover fallback behavior, retries, rate-limit short-circuiting, and “fail loudly” behavior when all sources return invalid/empty manifests.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/install-python.ts | Introduces manifest validation plus retry/backoff logic and loud failure when both sources fail. |
| dist/setup/index.js | Updates the bundled distribution output to reflect the new manifest fetch/validation logic. |
| tests/install-python.test.ts | Adds/updates tests for retry, fallback, rate-limit behavior, and exhausted-source failure. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6eebaf2 to
0bc3767
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:
This PR validates that the manifest is a non-empty list of valid releases, retries transient failures like truncated responses with backoff (skipping rate limits), and fails loudly when all sources are exhausted instead of silently exiting 0.
Related issue:
#1318
Check list: