Skip to content

build: tolerate slow third-party downloads - #26671

Closed
Ariznawlll wants to merge 2 commits into
matrixorigin:mainfrom
Ariznawlll:codex/issue-26664-onnx-download-timeout
Closed

Ariznawlll wants to merge 2 commits into
matrixorigin:mainfrom
Ariznawlll:codex/issue-26664-onnx-download-timeout

Conversation

@Ariznawlll

Copy link
Copy Markdown
Collaborator

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Fixes #26664

What this PR does / why we need it:

Cold Docker builds in the Guangzhou DinD runner repeatedly failed while downloading the pinned 21.9 MiB ONNX Runtime archive. The download made steady progress, but the downloader's 120-second per-attempt hard limit aborted it before completion. A successful control run on the same route needed about 14 minutes and 35 seconds.

This change:

  • raises the default hard transfer limit from 120 seconds to 1800 seconds;
  • aborts transfers that remain below 1 KiB/s for 120 seconds, so stalled connections still fail promptly;
  • keeps both thresholds configurable through environment variables and validates them as positive integers;
  • adds a regression test for the slow-transfer curl contract.

Existing HTTPS-only enforcement, connection timeout, bounded retries, download-size limit, SHA-256 verification, atomic publication, cache handling, legacy curl fallback, and concurrent-download behavior remain covered by the downloader test suite.

Validation:

  • sh -n thirdparties/download thirdparties/download_test
  • git diff --check c58cd292d3e6e039a8882654d3b20ad345171e87..HEAD
  • make -C thirdparties test-download

This branch was previously deployed

1 inactive deployment
ci — cc84d462 Deployed Aug 4, 2026 by mergify[bot] via Matrixone Utils CI / Coverage #44426
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working kind/test-ci size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ONNX Runtime 下载的 120 秒上限导致广州 DinD 冷构建稳定失败

2 participants