Skip to content

Validate and retry manifest fetch to prevent silent failures#1332

Open
priyagupta108 wants to merge 2 commits into
actions:mainfrom
priyagupta108:manifest-fetch-retry
Open

Validate and retry manifest fetch to prevent silent failures#1332
priyagupta108 wants to merge 2 commits into
actions:mainfrom
priyagupta108:manifest-fetch-retry

Conversation

@priyagupta108

@priyagupta108 priyagupta108 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

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:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

Copilot AI review requested due to automatic review settings July 9, 2026 03:58
@priyagupta108 priyagupta108 requested a review from a team as a code owner July 9, 2026 03:58
@priyagupta108 priyagupta108 self-assigned this Jul 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/install-python.ts
@priyagupta108 priyagupta108 force-pushed the manifest-fetch-retry branch from 6eebaf2 to 0bc3767 Compare July 9, 2026 04:12
@priyagupta108 priyagupta108 changed the title validate and retry manifest fetch Validate and retry manifest fetch to prevent silent failures Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants