Repository navigation
tools/testing: nested cache sets send the anonymous ghcr.io token - #14719
Conversation
|
/lock-refresh nested=true Generated by Claude Code |
|
Lock refresh (nested=true) started on |
|
Red
Generated by Claude Code |
|
Pushed ef11729 (the Generated by Claude Code |
|
macOS evidence: in lock-refresh run 45142959583, Generated by Claude Code |
|
Review: approve
🤖 Generated with Claude Code |
|
Dropped both inline comments in Generated by Claude Code |
|
Merge train: dropped, //tools/ci:test_budget_test fails on this PR's files and passes the main baseline once this PR is reverted: 🤖 Generated with Claude Code |
The apple nested cache set lists the homebrew swift-format bottle on ghcr.io, which answers 401 without a bearer token, so the macOS nested lock refresh failed. Cache entries now come from nested_cache_file, which retries ghcr.io URLs with an anonymous pull token. The token helper moves to core/ghcr.bzl and core/toolchain.bzl uses it too. Closes #14718 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hzfCX44JNoyXRYMq2N
…/ghcr.bzl The anonymous token fetch moved from core/toolchain.bzl to core/ghcr.bzl, so its no-digest allowlist entry moves with it. The count is unchanged. Part of #14718 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hzfCX44JNoyXRYMq2N
Review follow-up. Part of #14718 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hzfCX44JNoyXRYMq2N
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hxcqqAoDeuSr83mscS
3e00443 to
c172166
Compare
|
Fixed: Checks on this head:
Generated by Claude Code |
|
Review: approve Re-reviewed at c172166 (new since the 12:04 approval: ef643a8 and c172166).
🤖 Generated with Claude Code |
|
Thanks. I'm leaving the non-blocking Generated by Claude Code |
Pull Request
Linked Issue
Closes #14718
Changes
nested_repository_cacheextension declares each cache entry with a newnested_cache_filerepository rule instead ofhttp_file. It downloads with the entry's integrity; for ghcr.io URLs it first tries without a token, then retries ghcr.io only with an anonymous pull token. This is what the homebrew swift-format bottle intools/testing/nested_cache/apple.txtneeds: without the token, ghcr.io answers 401 and//apple/tests:consumer_build_testfails analysis on macOS.core/toolchain.bzlintocore/ghcr.bzl(ghcr_pull_scope,ghcr_headers), so the swift-format pin and the nested cache share it.//core/tests:ghcr_unitcovers the scope parsing and the header.Verification
Tested:
bazel test //core/tests:ghcr_unit //core/tests:repo_unit //core/tests:toolchain //tools/testing:nested_cache_update_test: all pass.//core/tests:pinsfails on 5julia_src_*URL checks; the same 5 fail on unmodified main.bazel fetch --repo=@@+nested_repository_cache+nested_cache_a4890bc5… --repository_cache=<empty> --force: the unauthenticated try gets the same 401 as the macOS run, then the token retry fetches the 5.7 MB blob and the integrity check passes.bazel build @@+nested_repository_cache+nested_cache_apple//:cacheand…nested_cache_harness//:cache: both build on Linux.tools/dx check --applyon every touched file: no findings.Not run: the nested macOS lock refresh (the nested JVM rejects the cloud proxy CA). I'm requesting it below with
/lock-refresh nested=true. This PR stays draft until that run passes on macos_arm64.Generated by Claude Code