Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On
*.ghe.comtenants, anonymous github.com API lookups can hit the anonymous rate limit and fail a run. SettingGH_ACTIONS_LOCK_CACHE_DIRnow saves successful anonymous public GET responses to disk, so later processes and CI runners reuse them and a failed run still keeps its progress. The cache is opt-in, entries expire after 24h by default (GH_ACTIONS_LOCK_CACHE_TTL), and authenticated requests, tenant requests, and error responses are never cached.Live evidence: a GHE.com workflow verifying 10 workflows with 21 locked dependencies ran without public github.com credentials. The cold first attempt saved its successful responses but could not verify 19 pins because of the anonymous limit. The second attempt restored the cache and only 8 pins remained unverified. The third attempt verified all 10 workflows, and a fourth warm attempt succeeded again with the verification step under 1 second. This shows that failed runs persist partial progress and that later processes and runners reuse it, beyond in-memory caching. The compressed cache grew from about 73KB to 148KB to 150KB across the attempts. A cold cache does not bypass rate limits; it only accumulates progress across attempts.
Changes
GET /repos/...requests toapi.github.com, keyed by URL,Accept, and API version.GH_ACTIONS_LOCK_CACHE_TTL.Review focus
Check the cache key and the skip conditions in
internal/ghapi/diskcache.go. Unit tests, vet, and build checks cover the cache. The existing full suite has a knownnilHTTPError.RequestURL-related timeout limitation, which this PR does not change.