Found in review of #15: CI trusts the registry's own checksum for gc; cache warnings; no curl timeout #61
No reviewers
Labels
No labels
No milestone
No project
No assignees
3 participants
Due date
No due date set.
Dependencies
No dependencies set
Reference
mikluko/gascitypacks!61
Loading…
Reference in a new issue
No description provided.
Delete branch "worker/gascitypacks-bo9"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes the three findings of gascitypacks-bo9 (found in review of #15) in
.forgejo/workflows/test.yaml:GC_SHA, one per architecture (GC_SHA256_AMD64,GC_SHA256_ARM64), and the download runs only if it matches. The.sha256file from the registry is no longer fetched. A mismatch falls back to building gc atGC_SHA, as an unpublished pin does. I downloaded both binaries and hashed them myself, and the values match what the registry publishes.cache: falseonsetup-goin both jobs that use it (lintandscripts);cache-dependency-pathgoes with it.curl --max-time 180; the binaries are 133 and 145 MB and took about 10 seconds to fetch from the Mac.Changelog note:
.changelog/ci-gc-checksum-pinned.md. No new shell logic: the step's existingcaseandifchange in place.Verified: the YAML parses; the download-and-check logic, run against the real registry, accepts the right sum and falls back on a wrong one;
gc lint .passes; the changelog v2 checker passes with-base main.Not done: gascity-root's
test / configstep has the same shape (the bead says so) and is in another repository. ChangingGC_SHAnow means changing the two checksums with it, which the workflow's comment says.Bead: gascitypacks-bo9
Review of
f46989d0e5for gascitypacks-bo9. Checks of the head: success.Verdict
fail
Findings
main; the forge saysnot_mergeable, and a local merge of the head intoorigin/main(be97be3) conflicts in bothsetup-goblocks. Since this branch was cut, #78 moved the Go module to the repository root, somainnow hasgo-version-file: go.modwithcache-dependency-path: go.mod, and the comment above thegcstep says "the packs' tools' tests need it". Rebase ontomainand resolve each block asgo-version-file: go.modpluscache: false(dropcache-dependency-path). Keep main's wording "the packs' tools' tests" in the new comment instead of "the forgejo pack's tests".forgejo/go.modno longer exists on main, so keeping this branch's side would break both jobs.Everything else is correct. Once rebased, the change does what the bead asks:
.sha256is no longer fetched.cache: falseis set inlintandscripts.curl --max-time 180is added.A mismatch, a timeout or an unpublished pin all fall through to the existing
go installatGC_SHA. An empty$sumfailssha256sum -cand falls back the same way.Verified
origin/mainatbe97be3: CONFLICT in.forgejo/workflows/test.yaml, in two hunks, bothsetup-gowith:blocks (go.modon main againstforgejo/go.modpluscache: falsehere). Aborted the merge.GC_SHAis unchanged on main (6bd609f5…). The two pinned sums are the ones the registry publishes for it: fetchedgc-linux-amd64.sha256(fb534fad…6541) andgc-linux-arm64.sha256(06df6435…3bb9) and compared them. The PR description says the author also hashed the binaries themselves.gc-linux-amd64: OKfrom the newsha256sum -c -, the download used with nogo installfallback, and thengc lint: 2 pack(s) ok. The lint and scripts logs show no cache-save warning from setup-go.go vet,go testor the shell tests locally. The diff changes no Go and no test code, and there is no clean merge result to run them on.f46989d0e50524a1c52aReview of
0524a1c52afor gascitypacks-bo9. Checks of the head: success.Verdict
pass
Findings
None that block, and no minor ones.
The blocking finding of round 1 (review 263, on
f46989d) is resolved. The branch is now one commit on top ofmainat0e49d7c. Bothsetup-goblocks keep main'sgo-version-file: go.mod, addcache: falseand dropcache-dependency-path. The new comment keeps main's wording, "the packs' tools' tests need it".The change does what the bead asks, and nothing else:
test.yaml:14-15keeps the expected SHA-256 per architecture besideGC_SHA, and:43checks the download against it withecho "$sum $file" | sha256sum -c -. The registry's.sha256is no longer fetched.cache: falseis set inlint(:28) andscripts(:78), the only two jobs that usesetup-go.curl --max-time 180(:43).A mismatch, a timeout or an unpublished pin leaves
downloadedunset, so the existinggo installatGC_SHAruns (:52). The gascity-roottest / configstep the bead mentions is in another repository, and the PR description says it is left out.Verified
docs/shell.md:65still describes the step correctly.origin/main(0e49d7c): clean, no conflict. The forge saysmergeable.go vet ./...andgo test ./...pass (both packages ok), andtest.yamlparses as YAML.GC_SHAis unchanged on main (6bd609f5…). The two pinned sums are the ones the registry publishes for it: I fetchedgc-linux-amd64.sha256(fb534fad…6541) andgc-linux-arm64.sha256(06df6435…3bb9) and compared them.gc-linux-amd64: OKfrom the new check, thengc lint: 2 pack(s) ok, with nogo installfallback. The Post setup-go steps oflintandscriptssucceed with no cache-save warning. The changelog job (v2 checker) passes with the fragment.changelog/ci-gc-checksum-pinned.md, which is a### Fixedentry.