From f8a91e798f58ca71bcf0204854d387a228262a5c Mon Sep 17 00:00:00 2001 From: rldyourmnd Date: Wed, 26 Aug 2026 02:43:28 +0500 Subject: [PATCH 1/2] fix(download): enforce three total attempts --- CHANGELOG.md | 4 ++++ actions/tool-cache/tool-cache.sh | 2 +- internal/garmproviderincus/provider/incus.go | 2 +- internal/garmproviderincus/provider/specs.go | 2 +- internal/garmproviderincus/provider/specs_test.go | 2 +- internal/repositorycontract/external_downloads_test.go | 6 +++--- scripts/install-benchmark-toolchain.sh | 2 +- 7 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67e830f..0f30006 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -76,6 +76,10 @@ Versioning. ### Fixed +- Bound every reviewed `curl` download path to two retries after the initial + request, making the repository-wide download policy exactly three total + attempts while leaving service-readiness polling and provider state retries + under their separate typed deadlines. - Default undeclared queue reservations to each pool's hard CPU and memory limits instead of silently applying a global historical overcommit table; smaller measured envelopes now require an explicit reviewed pool field. diff --git a/actions/tool-cache/tool-cache.sh b/actions/tool-cache/tool-cache.sh index a16d12a..72764cf 100755 --- a/actions/tool-cache/tool-cache.sh +++ b/actions/tool-cache/tool-cache.sh @@ -108,7 +108,7 @@ fi if [[ "$source" == upstream ]]; then rm -f -- "$candidate" curl --proto '=https' --tlsv1.2 --fail --silent --show-error --location \ - --retry 5 --retry-all-errors --retry-max-time 180 --connect-timeout 15 --max-time 300 \ + --retry 2 --retry-all-errors --retry-max-time 180 --connect-timeout 15 --max-time 300 \ --max-filesize "$max_bytes" \ --output "$candidate" "$url" if ! verify_candidate; then diff --git a/internal/garmproviderincus/provider/incus.go b/internal/garmproviderincus/provider/incus.go index d97c6c5..e966116 100644 --- a/internal/garmproviderincus/provider/incus.go +++ b/internal/garmproviderincus/provider/incus.go @@ -999,7 +999,7 @@ if [[ -n "${CA_B64}" ]]; then test -s "${ca_file}" export CURL_CA_BUNDLE="${ca_file}" fi -curl -H "Authorization: Bearer ${BEARER_TOKEN}" --retry 5 --retry-delay 5 --retry-connrefused --fail "${METADATA_URL}/install-script/" -o "${install_script}" +curl -H "Authorization: Bearer ${BEARER_TOKEN}" --retry 2 --retry-delay 5 --retry-connrefused --fail "${METADATA_URL}/install-script/" -o "${install_script}" chmod 0700 "${install_script}" # GARM's pinned runtime wrapper enables xtrace before it invokes the generated # installer. Keep tracing output on an already-open /dev/null descriptor so a diff --git a/internal/garmproviderincus/provider/specs.go b/internal/garmproviderincus/provider/specs.go index 808b0d1..7b67785 100644 --- a/internal/garmproviderincus/provider/specs.go +++ b/internal/garmproviderincus/provider/specs.go @@ -89,7 +89,7 @@ set -o pipefail METADATA_URL="{{ .MetadataURL }}" BEARER_TOKEN="{{ .CallbackToken }}" -curl -H "Authorization: Bearer $BEARER_TOKEN" --retry 5 --retry-delay 5 --retry-connrefused --fail $METADATA_URL/install-script/ -o /tmp/real-install.sh +curl -H "Authorization: Bearer $BEARER_TOKEN" --retry 2 --retry-delay 5 --retry-connrefused --fail $METADATA_URL/install-script/ -o /tmp/real-install.sh chmod +x /tmp/real-install.sh /tmp/real-install.sh diff --git a/internal/garmproviderincus/provider/specs_test.go b/internal/garmproviderincus/provider/specs_test.go index 8664983..89fd843 100644 --- a/internal/garmproviderincus/provider/specs_test.go +++ b/internal/garmproviderincus/provider/specs_test.go @@ -270,7 +270,7 @@ set -o pipefail METADATA_URL="https://gateway.example/metadata" BEARER_TOKEN="opaque-token" -curl -H "Authorization: Bearer $BEARER_TOKEN" --retry 5 --retry-delay 5 --retry-connrefused --fail $METADATA_URL/install-script/ -o /tmp/real-install.sh +curl -H "Authorization: Bearer $BEARER_TOKEN" --retry 2 --retry-delay 5 --retry-connrefused --fail $METADATA_URL/install-script/ -o /tmp/real-install.sh chmod +x /tmp/real-install.sh /tmp/real-install.sh diff --git a/internal/repositorycontract/external_downloads_test.go b/internal/repositorycontract/external_downloads_test.go index 87a3798..d54d342 100644 --- a/internal/repositorycontract/external_downloads_test.go +++ b/internal/repositorycontract/external_downloads_test.go @@ -65,13 +65,13 @@ func TestExternalDownloadFallbackMarkersRemainBounded(t *testing.T) { root := toolCacheRepositoryRoot(t) checks := map[string][]string{ "actions/tool-cache/tool-cache.sh": { - "--retry 5", "verify_candidate", "nddev_tool_cache_event=", + "--retry 2", "verify_candidate", "nddev_tool_cache_event=", }, "scripts/install-benchmark-toolchain.sh": { - "--retry 5", "toolchain SHA-256 mismatch", "rustc 1.97.1", + "--retry 2", "toolchain SHA-256 mismatch", "rustc 1.97.1", }, "internal/garmproviderincus/provider/incus.go": { - "--retry 5", "validateRunnerTool", + "--retry 2", "validateRunnerTool", }, "internal/imagebuild/artifacts.go": { "attempt <= 3", "http.StatusTooManyRequests", "expectedSHA", diff --git a/scripts/install-benchmark-toolchain.sh b/scripts/install-benchmark-toolchain.sh index 952d07f..43e1535 100755 --- a/scripts/install-benchmark-toolchain.sh +++ b/scripts/install-benchmark-toolchain.sh @@ -23,7 +23,7 @@ download_verified() { exit 65 } curl --proto '=https' --tlsv1.2 --fail --silent --show-error --location \ - --retry 5 --retry-all-errors --connect-timeout 15 --max-time 300 \ + --retry 2 --retry-all-errors --connect-timeout 15 --max-time 300 \ --output "${output}" "${url}" chmod 0600 "${output}" actual_sha256="$(sha256sum "${output}" | awk '{print $1}')" From f2a3c9ac84e2fa7c57e4fcbd9764ac7f882ca64a Mon Sep 17 00:00:00 2001 From: rldyourmnd Date: Wed, 26 Aug 2026 02:44:16 +0500 Subject: [PATCH 2/2] release(provider): cut bounded download .78 --- CHANGELOG.md | 4 ++++ config/example-runner-1.yaml | 2 +- config/example-runner-2.yaml | 2 +- config/example-runner-3.yaml | 2 +- config/example-runner-4.yaml | 2 +- config/example-services.yaml | 2 +- config/provider-derivative.yaml | 6 +++--- 7 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f30006..acbc4fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +- Added provider derivative `v0.1.5-nddev.78`: runner metadata bootstrap uses + the same three-total-attempt download contract as every other reviewed + network artifact path. + - Added provider derivative `v0.1.5-nddev.77`: undeclared pool reservations now use hard CPU and memory limits, removing implicit overcommit from queue accounting and per-member placement while retaining explicitly reviewed diff --git a/config/example-runner-1.yaml b/config/example-runner-1.yaml index bc81009..1e51d25 100644 --- a/config/example-runner-1.yaml +++ b/config/example-runner-1.yaml @@ -9,7 +9,7 @@ control_plane: manager_version: v0.2.1-nddev.80 scheduling_mode: scale-set provider: incus - provider_version: v0.1.5-nddev.77 + provider_version: v0.1.5-nddev.78 provider_interface: v0.1.0 worker_kind: incus-container runner: actions/runner diff --git a/config/example-runner-2.yaml b/config/example-runner-2.yaml index 222a980..06586bd 100644 --- a/config/example-runner-2.yaml +++ b/config/example-runner-2.yaml @@ -9,7 +9,7 @@ control_plane: manager_version: v0.2.1-nddev.80 scheduling_mode: scale-set provider: incus - provider_version: v0.1.5-nddev.77 + provider_version: v0.1.5-nddev.78 provider_interface: v0.1.0 worker_kind: incus-container runner: actions/runner diff --git a/config/example-runner-3.yaml b/config/example-runner-3.yaml index ea45787..373cca9 100644 --- a/config/example-runner-3.yaml +++ b/config/example-runner-3.yaml @@ -9,7 +9,7 @@ control_plane: manager_version: v0.2.1-nddev.80 scheduling_mode: scale-set provider: incus - provider_version: v0.1.5-nddev.77 + provider_version: v0.1.5-nddev.78 provider_interface: v0.1.0 worker_kind: incus-container runner: actions/runner diff --git a/config/example-runner-4.yaml b/config/example-runner-4.yaml index b4940a0..dabe025 100644 --- a/config/example-runner-4.yaml +++ b/config/example-runner-4.yaml @@ -9,7 +9,7 @@ control_plane: manager_version: v0.2.1-nddev.80 scheduling_mode: scale-set provider: incus - provider_version: v0.1.5-nddev.77 + provider_version: v0.1.5-nddev.78 provider_interface: v0.1.0 worker_kind: incus-container runner: actions/runner diff --git a/config/example-services.yaml b/config/example-services.yaml index 4ed47d5..2bc0297 100644 --- a/config/example-services.yaml +++ b/config/example-services.yaml @@ -27,7 +27,7 @@ control_plane: manager_version: v0.2.1-nddev.80 scheduling_mode: scale-set provider: incus - provider_version: v0.1.5-nddev.77 + provider_version: v0.1.5-nddev.78 provider_interface: v0.1.0 worker_kind: incus-container runner: actions/runner diff --git a/config/provider-derivative.yaml b/config/provider-derivative.yaml index 9e1db4e..c6ee5e0 100644 --- a/config/provider-derivative.yaml +++ b/config/provider-derivative.yaml @@ -16,7 +16,7 @@ artifact: garm-provider-incus # state all move together, because all three derive from here. A provider change # that does not bump it ships under the previous version, which is exactly how # runner-1 and runner-2 diverged. -derivative_version: v0.1.5-nddev.77 +derivative_version: v0.1.5-nddev.78 # The external-provider protocol GARM speaks to this binary. It moves on its own # schedule -- a provider release does not imply an interface release -- so it is @@ -37,8 +37,8 @@ runtime: queue_intent_schema_version: 4 build: - source_commit: b9937e043eb0f9e4ce62b531cc0ee421ca382f21 - binary_sha256: 965d39a69654180c3d91b9c92d2e8a6b41ca96a056416aed9656409aed209990 + source_commit: f8a91e798f58ca71bcf0204854d387a228262a5c + binary_sha256: 204e3e1a4a4e9b9beeb3516fb8921e58fe9b2f928ed70404a8bdd4497ee0ade2 go_version: go1.26.6 cgo_enabled: false target_os: linux