Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache-image input to enable/disable caching of binfmt image #130

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

crazy-max
Copy link
Member

@crazy-max crazy-max commented Apr 12, 2024

@crazy-max crazy-max force-pushed the cache-image branch 3 times, most recently from 490df49 to 67290d2 Compare April 12, 2024 13:32
@crazy-max crazy-max requested a review from tonistiigi April 12, 2024 13:33
@crazy-max crazy-max marked this pull request as ready for review April 12, 2024 13:34
Copy link
Member

@tonistiigi tonistiigi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this cache get invalidated?

@crazy-max
Copy link
Member Author

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 docker pull: https://github.com/docker/setup-qemu-action/actions/runs/9775565828/job/26986391188#step:3:113

if image is up to date then we got https://github.com/docker/setup-qemu-action/actions/runs/9775565828/job/26986391188#step:3:116

Status: Image is up to date for tonistiigi/binfmt:master

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

@crazy-max crazy-max requested a review from tonistiigi July 3, 2024 09:53
@tonistiigi tonistiigi merged commit fdbeaac into docker:master Jan 7, 2025
14 checks passed
@crazy-max crazy-max deleted the cache-image branch January 8, 2025 08:27
@alec-drw
Copy link

alec-drw commented Jan 8, 2025

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

mergify bot added a commit to ArcadeData/arcadedb that referenced this pull request Jan 13, 2025
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)

  

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=docker/setup-qemu-action&package-manager=github\_actions&previous-version=3.2.0&new-version=3.3.0)](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)
2bndy5 added a commit to nRF24/pyRF24 that referenced this pull request Jan 27, 2025
- 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.
@darthShadow
Copy link

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.

Failed to save: Failed to CreateCacheEntry: Received non-retryable error: Failed request: (409) Conflict: cache entry with the same key, version, and scope already exists

@crazy-max
Copy link
Member Author

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.

Failed to save: Failed to CreateCacheEntry: Received non-retryable error: Failed request: (409) Conflict: cache entry with the same key, version, and scope already exists

Yes we should skip in this case I will take a look.

@crazy-max
Copy link
Member Author

crazy-max commented Feb 21, 2025

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.

Failed to save: Failed to CreateCacheEntry: Received non-retryable error: Failed request: (409) Conflict: cache entry with the same key, version, and scope already exists

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:

image

But since Feb, 11:

image

Fyi it makes sense to have this message if you're using setup-qemu-action in multiple jobs within the same workflow as all of them will try to save the cache with the same key and scope. This is the same behavior as @actions/cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support cache tonistiigi/binfmt docker images
4 participants