[FLINK-39796] Fix snapshot bake by pinning bake-action to local source #261
+8
−0
Annotations
2 errors and 1 warning
|
Build and push Docker image
cannot parse bake definitions: ERROR: failed to find target docker-metadata-action\n```\n\n## Root cause\n\n`docker-bake.hcl`'s `bake-platform` target does `inherits = [\"docker-metadata-action\"]`. That target is defined as an empty stub (`target \"docker-metadata-action\" {}`) on every `dev-*` branch, but **not on `master`**.\n\nThe regression was triggered by [FLINK-39796] bumping `docker/bake-action` from v4 to v7. v7 changed the default of an unset `source` input: instead of baking the **local working tree**, it now falls back to the workflow's own git context and bakes it as a **remote ref**, so buildx fetches `docker-bake.hcl` (and the build context) from the triggering commit on `master`:\n\n```\ndocker buildx bake https://github.com/apache/flink-docker.git#<sha> --file .github/workflows/docker-bake.hcl ... bake-platform\n```\n\nSince the job checks out a `dev-*` branch but v7 reads `master`, two things break:\n\n1. `master`'s `docker-bake.hcl` lacks the `docker-metadata-action` stub → `inherits` fails.\n2. The snapshot Dockerfile is generated at runtime by `add-custom.sh` into the local working tree and is never committed, so a remote bake context could not find `$DOCKER_FILE` anyway.\n\nThis is why the workflow was green on v4 (which baked the local `dev-*` checkout that has both the stub and the generated Dockerfile) and red on v7.\n\n## Fix\n\nSet `source: .` on the bake step to restore the pre-v7 behavior of baking the local working tree. This resolves both issues at once: the checked-out `dev-*` tree contains both the generated Dockerfile and the `docker-metadata-action` stub.\n\n## Notes\n\n- An alternative/complementary change would be to add `target \"docker-metadata-action\" {}` to `master`'s `docker-bake.hcl` to match the `dev-*` branches. That alone is **not** sufficient under v7's remote bake, because the runtime-generated Dockerfile still wouldn't exist in the remote context — hence pinning `source: .` is the actual fix.\n",
|
|
Build and push Docker image
cannot parse bake definitions: ERROR: failed to find target docker-metadata-action\n```\n\n## Root cause\n\n`docker-bake.hcl`'s `bake-platform` target does `inherits = [\"docker-metadata-action\"]`. That target is defined as an empty stub (`target \"docker-metadata-action\" {}`) on every `dev-*` branch, but **not on `master`**.\n\nThe regression was triggered by [FLINK-39796] bumping `docker/bake-action` from v4 to v7. v7 changed the default of an unset `source` input: instead of baking the **local working tree**, it now falls back to the workflow's own git context and bakes it as a **remote ref**, so buildx fetches `docker-bake.hcl` (and the build context) from the triggering commit on `master`:\n\n```\ndocker buildx bake https://github.com/apache/flink-docker.git#<sha> --file .github/workflows/docker-bake.hcl ... bake-platform\n```\n\nSince the job checks out a `dev-*` branch but v7 reads `master`, two things break:\n\n1. `master`'s `docker-bake.hcl` lacks the `docker-metadata-action` stub → `inherits` fails.\n2. The snapshot Dockerfile is generated at runtime by `add-custom.sh` into the local working tree and is never committed, so a remote bake context could not find `$DOCKER_FILE` anyway.\n\nThis is why the workflow was green on v4 (which baked the local `dev-*` checkout that has both the stub and the generated Dockerfile) and red on v7.\n\n## Fix\n\nSet `source: .` on the bake step to restore the pre-v7 behavior of baking the local working tree. This resolves both issues at once: the checked-out `dev-*` tree contains both the generated Dockerfile and the `docker-metadata-action` stub.\n\n## Notes\n\n- An alternative/complementary change would be to add `target \"docker-metadata-action\" {}` to `master`'s `docker-bake.hcl` to match the `dev-*` branches. That alone is **not** sufficient under v7's remote bake, because the runtime-generated Dockerfile still wouldn't exist in the remote context — hence pinning `source: .` is the actual fix.\n",
|
|
Complete job
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4, docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25, docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9, docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f, docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392. Actions will be forced to run with Node.js 24 by default starting June 16th, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|
background
wait
wait-all
cancel
Loading