borg-backup-ui icon indicating copy to clipboard operation
borg-backup-ui copied to clipboard

Retry transient Python runtime download failures with bounded backoff

Open borg-codex-bot opened this issue 3 weeks ago • 0 comments

Problem

PR #727 CI repeatedly failed while downloading the hash-pinned CPython supplier archive with HTTP 504, even though the maintainer could download the same file repeatedly and an independent probe intermittently returned HTTP 200. The downloader currently aborts after a single request.

Scope

  • Add bounded retries with increasing delays for transient HTTP and network/transfer errors in plugin/python_runtime.py.
  • Preserve exact URLs, pinned SHA256 verification and atomic cache replacement. Never accept partial or unverified downloads.
  • Fail immediately on checksum mismatch, permanent HTTP errors, certificate verification errors and local filesystem failures.
  • Remove temporary partial downloads after failures and show concise retry diagnostics without dumping URLs or server response bodies.
  • Add focused deterministic tests with mocked time/network and document the retry policy.

Internal build reliability change; no user-facing release-note fragment or runtime/package version bump. CI/build policy changes must merge to main before the privileged test publication is retried. After merge, integrate current main into PR #727 and rerun its CI and testing workflow.

Implemented in PR #729. The policy is five attempts with 5/10/20/40-second delays. 54 focused tests, full hosted CI (2,450 tests), runtime compatibility (326 tests), quality, audit and hosted preflight passed. Actual pinned upstream downloads succeeded in that CI run. Awaiting maintainer merge, followed by integration into PR #727 and its verified test-channel publication.

borg-codex-bot avatar Nov 09 '26 07:11 borg-codex-bot