Skip to content

ci: retry pip installs on transient PyPI/TLS failures#1027

Closed
vnguyen-lexipol wants to merge 1 commit intoMemPalace:developfrom
vnguyen-lexipol:ci/retry-pip-installs
Closed

ci: retry pip installs on transient PyPI/TLS failures#1027
vnguyen-lexipol wants to merge 1 commit intoMemPalace:developfrom
vnguyen-lexipol:ci/retry-pip-installs

Conversation

@vnguyen-lexipol
Copy link
Copy Markdown
Contributor

Observed SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC during pip install on run 24379493758. Plain pip install has no retries, so a transient TLS glitch fails the whole job.

This PR:

  • Upgrades pip before install
  • Adds --retries 10 --timeout 120 to pip install
  • Wraps install in a 5-attempt retry loop with backoff (15s / 30s / 45s / 60s)
  • Applies to all 4 install steps (ubuntu / windows / macos + lint)

No behavior change on the happy path — retries only kick in when pip fails transiently.

GitHub Actions run 24379493758 failed during pip install with
SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC while downloading wheels.
Upgrade pip, raise pip retries/timeout, and retry the install step
up to 5 times with backoff on test and lint jobs.
@vnguyen-lexipol vnguyen-lexipol requested a review from bensig as a code owner April 19, 2026 07:12
@igorls igorls added enhancement New feature or request area/ci CI/CD and workflows labels Apr 24, 2026
@igorls
Copy link
Copy Markdown
Member

igorls commented Apr 25, 2026

Closing in favor of #939, which just merged and addresses the same root cause from a different angle: enabling cache: 'pip' on actions/setup-python removes most PyPI traffic from CI, which is the more reliable mitigation for transient network/TLS errors than retry logic.

Thanks for the contribution. If transient install failures persist after caching is in place, a follow-up that wraps installs in something like nick-fields/retry@v3 (rather than four copy-pasted shell loops) would be welcome — but let's see whether caching alone is enough first.

@igorls igorls closed this Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci CI/CD and workflows enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants