File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 candidate_tests_sha256 : ${{ steps.candidate_test_binary.outputs.sha256 }}
2323 env :
2424 COSMO_MODEL_GUARD_BUILD_PROFILE : public-runtime
25+ # Cargo defaults each HTTP request to 30 seconds and only three retries.
26+ # The public rsproxy sparse index can exceed that from GitHub runners.
27+ CARGO_HTTP_TIMEOUT : " 120"
28+ CARGO_NET_RETRY : " 5"
2529
2630 # Specify the public container image for the build environment
2731 container :
Original file line number Diff line number Diff line change @@ -167,6 +167,17 @@ def test_nightly_sophon_container_build_uses_bash(self) -> None:
167167 self .assertIn (" defaults:\n run:\n shell: bash\n " , build_job )
168168 self .assertIn ("set -euo pipefail" , build_job )
169169
170+ def test_nightly_sophon_build_retries_cargo_downloads (self ) -> None :
171+ workflow = (
172+ REPOSITORY / ".github/workflows/nightly-build-test-sophon.yml"
173+ ).read_text (encoding = "utf-8" )
174+ build_job = workflow .split (" build-sophon:" , 1 )[1 ].split (
175+ "\n test-sophon:" , 1
176+ )[0 ]
177+
178+ self .assertIn ('CARGO_HTTP_TIMEOUT: "120"' , build_job )
179+ self .assertIn ('CARGO_NET_RETRY: "5"' , build_job )
180+
170181 def test_container_builds_bound_and_cache_npm_connections (self ) -> None :
171182 npmrc = (REPOSITORY / "src/web/.npmrc" ).read_text (encoding = "utf-8" )
172183 self .assertIn ("registry=https://registry.npmmirror.com/" , npmrc )
You can’t perform that action at this time.
0 commit comments