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

[FEATURE]: Unpin docker buildx in the Github workflow #360

Open
amarburg opened this issue Dec 13, 2024 · 1 comment
Open

[FEATURE]: Unpin docker buildx in the Github workflow #360

amarburg opened this issue Dec 13, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request needs triage This issue needs triage support

Comments

@amarburg
Copy link
Collaborator

amarburg commented Dec 13, 2024

Feature Type

Adding new functionality to the BlueROV2 driver

Problem Description

As discovered while testing #358, recent versions of docker/buildx change the handling of "empty" configuration values. In .github/workflows/docker.yaml, we use an empty configuration value to "unset" the default cache-to on all targets and disable storage of build cache on PR builds:

          set: |
            *.platform=linux/amd64
            *.cache-from=type=registry,ref=ghcr.io/${{ steps.lowercase-repo.outputs.repository }}:cache-${{ matrix.ROS_DISTRO }}
            *.cache-to=

By default, docker/bake-action uses a recent version of docker/buildx. The above syntax worked previously but broke on or around buildx v.0.19.2.

As a short term fix, #358 pins buildx to v0.18.0. Note this is pinning of docker/buildx as called from bake-action, not of the docker/bake-action github workflow action itself.

By default this regression only affects the Github workflow, not command line builds. It can be replicated on a machine running buildx v0.19.2 -- at present this is the version installed for Ubuntu 24.04 from the Docker repository -- with (in a blue checkout):

cd .docker
docker buildx bake --set "*.cache-to="

On my 24.04 machine:

$ docker buildx version
github.com/docker/buildx v0.19.2 1fc5647

$ docker buildx bake --set "*.cache-to="
[+] Building 0.0s (1/1) FINISHED             docker-container:container-builder
 => [internal] load local bake definitions                                 0.0s
 => => reading docker-bake.hcl 2.39kB / 2.39kB                             0.0s
 => => reading docker-bake.override.hcl 170B / 170B                        0.0s
ERROR: EOF

I plan to produce a MWE and submit a bug to buildx ; again it may be a "true bug" or resolved by a change of syntax, but it breaks existing syntax.

Feature Description

Check if this issue can be resolved either by using a different syntax for the *.cache-to= or more recent versions of docker/buildx Should then be possible to un-pin the version in the workflow file.

Alternative Solutions

n/a

Additional Context

No response

@amarburg amarburg added enhancement New feature or request needs triage This issue needs triage support labels Dec 13, 2024
@amarburg amarburg self-assigned this Dec 13, 2024
@amarburg
Copy link
Collaborator Author

Created docker/buildx issue #2858

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage This issue needs triage support
Projects
None yet
Development

No branches or pull requests

1 participant