Conversation
The page said the `gha` cache backend defaults to v1 unless $ACTIONS_CACHE_SERVICE_V2 is set. When `version` isn't passed, BuildKit selects v2 if `url_v2` is set, and otherwise infers the version from the `url` string. Buildx forwards an explicitly supplied version but does not add a version attribute based on ACTIONS_CACHE_SERVICE_V2, so a runner that exposes only $ACTIONS_RESULTS_URL can reach v2 without that variable. It also listed `yes` among the values that enable v2 selection. Buildx parses the variable with strconv.ParseBool, which rejects `yes`. The `url` row claimed it is ignored when `version=2`. It is ignored only when `url_v2` is set; with `version=2` and no `url_v2`, `url` is used. Signed-off-by: Sunmin Lee <134378502+sunm2n@users.noreply.github.com>
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This branch has not been deployed
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.
Description
Three claims on the GitHub Actions cache page don't match how Buildx and BuildKit behave.
The
versiondefault. The page says the default is v1 unless$ACTIONS_CACHE_SERVICE_V2is set. Whenversionisn't passed, BuildKit selects v2 ifurl_v2is set, and otherwise infers the version from theurlstring (gha.go). Buildx forwards an explicitly supplied version but doesn't add a version attribute based on the environment variable (opt.go#L1522-L1553), so a runner that exposes only$ACTIONS_RESULTS_URLcan reach v2 without that variable.yesas a true value. The page listsyesamong the values that enable v2 selection. Buildx parses$ACTIONS_CACHE_SERVICE_V2withstrconv.ParseBool, which rejectsyes.urlignored at v2. The parameter table saysurlis ignored whenversion=2. It's ignored only whenurl_v2is set; withversion=2and nourl_v2, BuildKit falls back tourl.The rewritten Version section also states two conditions the previous text left out: Buildx fills in only unspecified URL parameters, and it checks
$ACTIONS_CACHE_SERVICE_V2only whenversionis omitted.Related issues or tickets
None. Found while checking the page against the Buildx and BuildKit sources.
Reviews