Repository navigation
fix(ci): authenticate license URL probes in make notices - #3056
Conversation
Signed-off-by: Mark Chmarny <mark@chmarny.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: NVIDIA/aicr/.coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review. 📝 WalkthroughWalkthroughThe normalizer can use Priority: ⬆️ High Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk was identified in the changed workflow or probe path. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Signed-off-by: Mark Chmarny <mark@chmarny.com>
Coverage Report ✅
Coverage BadgeNo Go source files changed in this PR. |
Summary
make noticesnow authenticates its license-URL probes whenGITHUB_TOKENis set: eachgithub.com/<owner>/<repo>/blob/<ref>/<path>is probed through itsraw.githubusercontent.comequivalent. The merge-gatenotices-generatorstep now passes the workflow token. The release job already exportsGITHUB_TOKENtomake release, so the tag build picks this up with no change.Motivation / Context
Since 2026-10-02, GitHub rate-limits the ~760 anonymous HEAD probes from Actions runner IPs (mostly 503, some 429). That makes
notices-generatorfail on every run and turnsmainred on every push (d41c86a). The same URLs resolve from a workstation, so the URLs aren't broken. The release build runs the same generator, so this also exposes the v1.0.0-rc1 tag.Fixes: #3055
Related: N/A
Type of Change
Component(s) Affected
cmd/aicr,pkg/cli)cmd/aicrd,pkg/server)pkg/recipe)pkg/bundler,pkg/component/*)pkg/collector,pkg/snapshotter)pkg/validator)pkg/errors,pkg/k8s)docs/,examples/)tools/normalize-go-license-urls,.github/workflows/merge-gate.yaml(token + path filter),RELEASE.mdImplementation Notes
raw.githubusercontent.com/<o>/<r>/<ref>/<path>resolves the same ref/path as the blob URL, including refs with slashes (sdk/azcore/v1.20.0), abbreviated SHAs, andHEAD. It also returns the same 404s; I checked the movedgoogle/cel-gorepo and a missing subdirectory LICENSE. The notices still cite thegithub.comURLs. A localmake noticeswith and without a token produces byte-identical output: 466github.comblob URLs, none fromraw.githubusercontent.com.--configfile in the script's private temp dir (umask 077, deleted after the batch, and on exit), never passed on argv.raw.githubusercontent.combatch gets the config. Other license hosts (cs.opensource.google, ...) are probed in a separate, anonymous curl invocation.Authorizationheader on a cross-host redirect.pull_request(not_target) withcontents: read, so the token is read-only.noticespath filter didn't listtools/normalize-go-license-urls, even though the generator calls it, so a change to the checker skipped its own gate. Added it. This also makes this PR's ownnotices-generatorrun prove the fix.GITHUB_TOKENthe probes are exactly as before.GITHUB_TOKEN.Testing
make qualifypasses in a clean detached worktree at ed7c8f6 (rc=0, "Codebase qualification completed"). The follow-up filter commit (one YAML line) was checked withactionlint,yamllint, and the workflow tests intools/testgrid-link-checkandtools/corroborate.tools/normalize-go-license-urls_test.shhas new cases for token mode:make noticesend to end, locally: anonymous and authenticated runs both exit 0, with identical output.notices-generatorjob: the throttling only reproduces on runner IPs.Risk Assessment
Rollout notes: None. The release job already sets
GITHUB_TOKEN, so the rc1 tag build uses authenticated probes automatically.Checklist
make testwith-race)make lint)git commit -S) — GPG signing info