Repository navigation
Restore Go vendor mode and retry tool downloads - #172
Conversation
Superseded — see the current review report for commit
|
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
| try { | ||
| $archive = Join-Path $workdir 'artifact.zip' | ||
| Invoke-WebRequest -Uri $url -OutFile $archive -MaximumRetryCount 3 | ||
| Invoke-WebRequest -Uri $url -OutFile $archive -MaximumRetryCount 5 -RetryIntervalSec 2 |
There was a problem hiding this comment.
🟡 Suggestion (medium confidence): Invoke-WebRequest -MaximumRetryCount only retries on HTTP 304/400–599 responses, not on connection resets or mid-body stream failures. So the Windows path does not get the stream-error coverage that --retry-all-errors gives the curl path, which is the incident class this PR targets. If Windows stream errors were part of the 13 failures, wrap the call in a small bounded retry loop (e.g. 5 attempts, Start-Sleep 2).
Superseded — see the current review report for commit
|
b136fe2 to
d86c048
Compare
Superseded — see the current review report for commit
|
General PR Review: Restore Go vendor mode and retry tool downloadsBlocking Issues: 0 | Suggestions: 1 | Threads Resolved: 0 Review SummaryThis PR removes the job-level I scanned the full PR diff for security and correctness. Hash-before-extract ordering and download origins are unchanged. No repo-local criteria loaded, so only the base criteria were applied. Security IssuesNone found. Correctness IssuesNone found. Suggestions
Prompt for AI agentsReviewed commit: |
Incident
Incident triage reported 13 failed release runs across two classes: vendored private-module resolution failures and transient toolchain download/stream errors.
An explicit
GOFLAGS=-mod=readonlydisables Go's automatic vendor mode. A caller with a complete vendor tree therefore attempts module resolution instead of using its vendored private dependencies. The job's proxy-onlyGOPROXY=https://proxy.golang.orgalso removes Go's normal direct fallback, exposing private-module 404s. Vendor mode and readonly mode both refuse required go.mod edits; forcing a module mode job-wide is not needed for that hygiene property.Fix
GOFLAGS,GOPROXY, andGOSUMDBassignments fromgoreleaser-binaries. The required whole-file inventory found no matching assignments in any other release job.GOTOOLCHAIN=local, locked tool versions/checksums, module gates, and the trusted gon build's separate step-local module/checksum settings unchanged.curl --retry 5 --retry-delay 2 --retry-all-errors; PowerShell usesInvoke-WebRequest -MaximumRetryCount 5 -RetryIntervalSec 2. Hash-before-extract and the committed download origins remain unchanged.Related fixes and merge order
#171 owns the separate Git credential-form fix and the root
.golangci.ymlreadonly removal. Neither is duplicated here.That root configuration is upstream of the fleet sync and pairs with the baton-admin template guard: #171 merges first, then the downstream template PR. This incident fix has no downstream-template dependency. This repository's module graph contains only public dependencies and no tracked vendor tree.
This branch was created from main and rebased onto
49d2c72e6150c82c8cae8e37fdb0dc5ce42aab79after #171 merged; its incident patch is unchanged in range-diff. It is not stacked on an open feature branch. The incident change is limited to caller module-mode defaults, bounded installer retries, and their existing CI/fixture coverage.Evidence
make test-scripts: PASS, including 28 tool-integrity tests (native Windows PowerShell fixture skipped locally).GOTOOLCHAIN=local go test ./...andGOTOOLCHAIN=local go vet ./...: PASS.make workflow-validate, Bash syntax check ofinstall-tool.sh, andgit diff --check: PASS.-mod=readonlybypasses vendoring and fails module resolution. go.mod remains unchanged.--retry-all-errorsfails immediately with exit 52 before extraction/PATH publication. Successful bytes still pass the fixture's committed checksum.Known full-lint limitation (pre-existing)
Full
golangci-lint run --timeout=5m ./...with v2.14.0 exits 3 because gocritic/ruleguard references the absenttools/rules.go.The comparison using main
49d2c72e's configuration also exits 3 with the sameruleguard init error: no file matching .../tools/rules.go. Go sources are unchanged from main. This is not introduced by the module-mode fix; no unrelated lint rules are changed here.Scope and follow-ups