cache-image input to enable/disable caching of binfmt image - #130
Conversation
490df49 to
67290d2
Compare
tonistiigi
left a comment
There was a problem hiding this comment.
How does this cache get invalidated?
when image is downloaded from cache it first loads it to docker store: https://github.com/docker/setup-qemu-action/actions/runs/9775565828/job/26986391188#step:3:110 and to make sure it's up to date we are doing a new if image is up to date then we got https://github.com/docker/setup-qemu-action/actions/runs/9775565828/job/26986391188#step:3:116 Otherwise hosted tool cache is evicted and new image is saved in place. More info on actions-toolkit repo: https://github.com/docker/actions-toolkit/blob/c70efab546578fc88fb6528cd28de42705cda4be/src/docker/docker.ts#L108 |
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
9d2e9ac to
c3bed4e
Compare
|
Why is this also storing it in the tool cache? This is not a tool, and this behavior is not consistent with the use of the tool cache, nor used in any other of the docker actions |
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.2.0 to 3.3.0. Release notes *Sourced from [docker/setup-qemu-action's releases](https://github.com/docker/setup-qemu-action/releases).* > v3.3.0 > ------ > > * Add `cache-image` input to enable/disable caching of binfmt image by [`@crazy-max`](https://github.com/crazy-max) in [docker/setup-qemu-action#130](https://redirect.github.com/docker/setup-qemu-action/pull/130) > * Bump `@actions/core` from 1.10.1 to 1.11.1 in [docker/setup-qemu-action#172](https://redirect.github.com/docker/setup-qemu-action/pull/172) > * Bump `@docker/actions-toolkit` from 0.35.0 to 0.49.0 in [docker/setup-qemu-action#187](https://redirect.github.com/docker/setup-qemu-action/pull/187) > * Bump cross-spawn from 7.0.3 to 7.0.6 in [docker/setup-qemu-action#182](https://redirect.github.com/docker/setup-qemu-action/pull/182) > * Bump path-to-regexp from 6.2.2 to 6.3.0 in [docker/setup-qemu-action#162](https://redirect.github.com/docker/setup-qemu-action/pull/162) > > **Full Changelog**: <docker/setup-qemu-action@v3.2.0...v3.3.0> Commits * [`53851d1`](docker/setup-qemu-action@53851d1) Merge pull request [#187](https://redirect.github.com/docker/setup-qemu-action/issues/187) from docker/dependabot/npm\_and\_yarn/docker/actions-to... * [`7066b90`](docker/setup-qemu-action@7066b90) chore: update generated content * [`7559081`](docker/setup-qemu-action@7559081) build(deps): bump `@docker/actions-toolkit` from 0.35.0 to 0.49.0 * [`08d11eb`](docker/setup-qemu-action@08d11eb) Merge pull request [#172](https://redirect.github.com/docker/setup-qemu-action/issues/172) from docker/dependabot/npm\_and\_yarn/actions/core-1.11.1 * [`e53506f`](docker/setup-qemu-action@e53506f) chore: update generated content * [`610b442`](docker/setup-qemu-action@610b442) build(deps): bump `@actions/core` from 1.10.1 to 1.11.1 * [`58a19f8`](docker/setup-qemu-action@58a19f8) Merge pull request [#182](https://redirect.github.com/docker/setup-qemu-action/issues/182) from docker/dependabot/npm\_and\_yarn/cross-spawn-7.0.6 * [`49a12c4`](docker/setup-qemu-action@49a12c4) Merge pull request [#180](https://redirect.github.com/docker/setup-qemu-action/issues/180) from docker/dependabot/github\_actions/codecov/codecov... * [`2b8ac83`](docker/setup-qemu-action@2b8ac83) ci: fix deprecated input for codecov-action * [`fdbeaac`](docker/setup-qemu-action@fdbeaac) Merge pull request [#130](https://redirect.github.com/docker/setup-qemu-action/issues/130) from crazy-max/cache-image * Additional commits viewable in [compare view](docker/setup-qemu-action@49b3bc8...53851d1) [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- disables caching the qemu image (docker/setup-qemu-action#130). There might be a lack of specificity in the cache key generated from the image tag (`docker.io/tonistiigi/binfmt:latest`): https://github.com/docker/actions-toolkit/blob/39e9b0e5c11efcb5cd80bca4f00eebf1695ecf59/src/docker/docker.ts#L132-L170 - allows running release CI via manual trigger on non-default branches without uploading artifacts (as a pre-release) to test-pypi.
|
Is there any output key added to skip pushing to the cache if it already exists? All actions seem to be throwing 409 warnings about matching caches.
|
Yes we should skip in this case I will take a look. |
After investigation it seems related to new cache service v2 that has been enabled in Feb, 11: actions/cache#1541 Looking at comment from maintainer it seems to be an issue on their side that will be fixed in few days: actions/cache#1541 (comment) Looks like they are going to remove this annotation that was not there before: But since Feb, 11: Fyi it makes sense to have this message if you're using |
Seems it has been fixed in actions/toolkit#1966 Will bring this in our actions-toolkit |
|
Thanks, that will fix the warning. But doesn't the underlying problem still deserve fixing, because it will always try to re-create the cache entry even if it was a cache hit? |
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.2.0 to 3.3.0. Release notes *Sourced from [docker/setup-qemu-action's releases](https://github.com/docker/setup-qemu-action/releases).* > v3.3.0 > ------ > > * Add `cache-image` input to enable/disable caching of binfmt image by [`@crazy-max`](https://github.com/crazy-max) in [docker/setup-qemu-action#130](https://redirect.github.com/docker/setup-qemu-action/pull/130) > * Bump `@actions/core` from 1.10.1 to 1.11.1 in [docker/setup-qemu-action#172](https://redirect.github.com/docker/setup-qemu-action/pull/172) > * Bump `@docker/actions-toolkit` from 0.35.0 to 0.49.0 in [docker/setup-qemu-action#187](https://redirect.github.com/docker/setup-qemu-action/pull/187) > * Bump cross-spawn from 7.0.3 to 7.0.6 in [docker/setup-qemu-action#182](https://redirect.github.com/docker/setup-qemu-action/pull/182) > * Bump path-to-regexp from 6.2.2 to 6.3.0 in [docker/setup-qemu-action#162](https://redirect.github.com/docker/setup-qemu-action/pull/162) > > **Full Changelog**: <docker/setup-qemu-action@v3.2.0...v3.3.0> Commits * [`53851d1`](docker/setup-qemu-action@53851d1) Merge pull request [ArcadeData#187](https://redirect.github.com/docker/setup-qemu-action/issues/187) from docker/dependabot/npm\_and\_yarn/docker/actions-to... * [`7066b90`](docker/setup-qemu-action@7066b90) chore: update generated content * [`7559081`](docker/setup-qemu-action@7559081) build(deps): bump `@docker/actions-toolkit` from 0.35.0 to 0.49.0 * [`08d11eb`](docker/setup-qemu-action@08d11eb) Merge pull request [ArcadeData#172](https://redirect.github.com/docker/setup-qemu-action/issues/172) from docker/dependabot/npm\_and\_yarn/actions/core-1.11.1 * [`e53506f`](docker/setup-qemu-action@e53506f) chore: update generated content * [`610b442`](docker/setup-qemu-action@610b442) build(deps): bump `@actions/core` from 1.10.1 to 1.11.1 * [`58a19f8`](docker/setup-qemu-action@58a19f8) Merge pull request [ArcadeData#182](https://redirect.github.com/docker/setup-qemu-action/issues/182) from docker/dependabot/npm\_and\_yarn/cross-spawn-7.0.6 * [`49a12c4`](docker/setup-qemu-action@49a12c4) Merge pull request [ArcadeData#180](https://redirect.github.com/docker/setup-qemu-action/issues/180) from docker/dependabot/github\_actions/codecov/codecov... * [`2b8ac83`](docker/setup-qemu-action@2b8ac83) ci: fix deprecated input for codecov-action * [`fdbeaac`](docker/setup-qemu-action@fdbeaac) Merge pull request [ArcadeData#130](https://redirect.github.com/docker/setup-qemu-action/issues/130) from crazy-max/cache-image * Additional commits viewable in [compare view](docker/setup-qemu-action@49b3bc8...53851d1) [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
gh-42586: build(deps): bump docker/setup-qemu-action from 3 to 4 Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu- action) from 3 to 4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/docker/setup-qemu- action/releases">docker/setup-qemu-action's releases</a>.</em></p> <blockquote> <h2>v4.0.0</h2> <ul> <li>Node 24 as default runtime (requires <a href="https://github.com/actions/runner/releases/tag/v2.327.1">Actions Runner v2.327.1</a> or later) by <a href="https://github.com/crazy- max"><code>@crazy-max</code></a> in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/245">docker/setup-qemu-action#245</a></li> <li>Switch to ESM and update config/test wiring by <a href="https://github.com/crazy-max"><code>@crazy-max</code></a> in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/241">docker/setup-qemu-action#241</a></li> <li>Bump <code>@actions/core</code> from 1.11.1 to 3.0.0 in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/244">docker/setup-qemu-action#244</a></li> <li>Bump <code>@docker/actions-toolkit</code> from 0.67.0 to 0.77.0 in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/243">docker/setup-qemu-action#243</a></li> <li>Bump <code>@isaacs/brace-expansion</code> from 5.0.0 to 5.0.1 in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/240">docker/setup-qemu-action#240</a></li> <li>Bump js-yaml from 3.14.1 to 3.14.2 in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/231">docker/setup-qemu-action#231</a></li> <li>Bump lodash from 4.17.21 to 4.17.23 in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/238">docker/setup-qemu-action#238</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/docker/setup-qemu- action/compare/v3.7.0...v4.0.0">https://github.com/docker/setup-qemu- action/compare/v3.7.0...v4.0.0</a></p> <h2>v3.7.0</h2> <ul> <li>Bump <code>@docker/actions-toolkit</code> from 0.56.0 to 0.67.0 in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/217">docker/setup-qemu-action#217</a> <a href="https://redirect.github.com/docker/setup-qemu- action/pull/230">docker/setup-qemu-action#230</a></li> <li>Bump brace-expansion from 1.1.11 to 1.1.12 in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/220">docker/setup-qemu-action#220</a></li> <li>Bump form-data from 2.5.1 to 2.5.5 in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/218">docker/setup-qemu-action#218</a></li> <li>Bump tmp from 0.2.3 to 0.2.4 in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/221">docker/setup-qemu-action#221</a></li> <li>Bump undici from 5.28.4 to 5.29.0 in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/219">docker/setup-qemu-action#219</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/docker/setup-qemu- action/compare/v3.6.0...v3.7.0">https://github.com/docker/setup-qemu- action/compare/v3.6.0...v3.7.0</a></p> <h2>v3.6.0</h2> <ul> <li>Display binfmt version by <a href="https://github.com/crazy- max"><code>@crazy-max</code></a> in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/202">docker/setup-qemu-action#202</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/docker/setup-qemu- action/compare/v3.5.0...v3.6.0">https://github.com/docker/setup-qemu- action/compare/v3.5.0...v3.6.0</a></p> <h2>v3.5.0</h2> <ul> <li>Bump <code>@docker/actions-toolkit</code> from 0.54.0 to 0.56.0 in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/205">docker/setup-qemu-action#205</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/docker/setup-qemu- action/compare/v3.4.0...v3.5.0">https://github.com/docker/setup-qemu- action/compare/v3.4.0...v3.5.0</a></p> <h2>v3.4.0</h2> <ul> <li>Bump <code>@docker/actions-toolkit</code> from 0.49.0 to 0.54.0 in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/193">docker/setup-qemu-action#193</a> <a href="https://redirect.github.com/docker/setup-qemu- action/pull/197">docker/setup-qemu-action#197</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/docker/setup-qemu- action/compare/v3.3.0...v3.4.0">https://github.com/docker/setup-qemu- action/compare/v3.3.0...v3.4.0</a></p> <h2>v3.3.0</h2> <ul> <li>Add <code>cache-image</code> input to enable/disable caching of binfmt image by <a href="https://github.com/crazy-max"><code>@crazy- max</code></a> in <a href="https://redirect.github.com/docker/setup- qemu-action/pull/130">docker/setup-qemu-action#130</a></li> <li>Bump <code>@actions/core</code> from 1.10.1 to 1.11.1 in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/172">docker/setup-qemu-action#172</a></li> <li>Bump <code>@docker/actions-toolkit</code> from 0.35.0 to 0.49.0 in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/187">docker/setup-qemu-action#187</a></li> <li>Bump cross-spawn from 7.0.3 to 7.0.6 in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/182">docker/setup-qemu-action#182</a></li> <li>Bump path-to-regexp from 6.2.2 to 6.3.0 in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/162">docker/setup-qemu-action#162</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/docker/setup-qemu- action/compare/v3.2.0...v3.3.0">https://github.com/docker/setup-qemu- action/compare/v3.2.0...v3.3.0</a></p> <h2>v3.2.0</h2> <ul> <li>Bump <code>@docker/actions-toolkit</code> from 0.31.0 to 0.35.0 in <a href="https://redirect.github.com/docker/setup-qemu- action/pull/154">docker/setup-qemu-action#154</a> <a href="https://redirect.github.com/docker/setup-qemu- action/pull/155">docker/setup-qemu-action#155</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/docker/setup-qemu- action/compare/v3.1.0...v3.2.0">https://github.com/docker/setup-qemu- action/compare/v3.1.0...v3.2.0</a></p> <h2>v3.1.0</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="docker/setup-qemu-action@96fe6ef7 f33517b61c61be40b68a1882f3264fb8"><code>96fe6ef</code></a> Merge pull request <a href="https://redirect.github.com/docker/setup-qemu- action/issues/315">#315</a> from docker/dependabot/npm_and_yarn/docker/actions-to...</li> <li><a href="docker/setup-qemu-action@31f08d3f c9186dbe4b4550696f2e32e9aa7f9465"><code>31f08d3</code></a> [dependabot skip] chore: update generated content</li> <li><a href="docker/setup-qemu-action@4e7017a4 74d2cf3912bb0437f7fafec6d5fb6c52"><code>4e7017a</code></a> build(deps): bump <code>@docker/actions-toolkit</code> from 0.91.0 to 0.92.0</li> <li><a href="docker/setup-qemu-action@0eca2352 93ca1939b58c082f69bdc981ccce8c94"><code>0eca235</code></a> Merge pull request <a href="https://redirect.github.com/docker/setup-qemu- action/issues/314">#314</a> from crazy-max/fix-yarn-preapprove-actions- toolkit</li> <li><a href="docker/setup-qemu-action@ea66a413 0b037e7961e14a0e5b155836e797cced"><code>ea66a41</code></a> chore: allow actions-toolkit to bypass yarn age gate</li> <li><a href="docker/setup-qemu-action@451542b0 3ae7946b7082a398b11c8c315a0e4e80"><code>451542b</code></a> Merge pull request <a href="https://redirect.github.com/docker/setup-qemu- action/issues/308">#308</a> from docker/dependabot/npm_and_yarn/undici-6.27.0</li> <li><a href="docker/setup-qemu-action@532ae005 7542ec2102e2d19e9feccf85f1f69013"><code>532ae00</code></a> [dependabot skip] chore: update generated content</li> <li><a href="docker/setup-qemu-action@b6f5af65 9afad3f9931b782668dee4595ae7e841"><code>b6f5af6</code></a> build(deps): bump undici from 6.26.0 to 6.27.0</li> <li><a href="docker/setup-qemu-action@cf96b862 94b57480ac6d330bd177fca87eac95bc"><code>cf96b86</code></a> Merge pull request <a href="https://redirect.github.com/docker/setup-qemu- action/issues/304">#304</a> from docker/dependabot/npm_and_yarn/tmp-0.2.7</li> <li><a href="docker/setup-qemu-action@f0ba643f 78dc96bc931fb83e5dadc39628e10047"><code>f0ba643</code></a> [dependabot skip] chore: update generated content</li> <li>Additional commits viewable in <a href="https://github.com/docker/setup-qemu- action/compare/v3...v4">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing- security-vulnerabilities/about-dependabot-security-updates#about- compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> URL: #42586 Reported by: dependabot[bot] Reviewer(s):


follow-up docker/actions-toolkit#200
related to #110
fixes #166
Tested through ci workflow
first run
setup-qemu-action saves image to hosted tool cache: https://github.com/docker/setup-qemu-action/actions/runs/9775565828/job/26986231861#step:3:113
And post cache to upload to GitHub Cache store: https://github.com/docker/setup-qemu-action/actions/runs/9775565828/job/26986231861#step:7:3
second run
download image from cache and load it: https://github.com/docker/setup-qemu-action/actions/runs/9775565828/job/26986391188#step:3:105
See cache entries as well: https://github.com/docker/setup-qemu-action/actions/caches