chore: pin example Dockerfiles digests and simplify dynamic module bump workflow#8678
chore: pin example Dockerfiles digests and simplify dynamic module bump workflow#8678shahar-h wants to merge 1 commit intoenvoyproxy:mainfrom
Conversation
…p workflow Signed-off-by: Shahar Harari <shahar.harari@sap.com>
✅ Deploy Preview for cerulean-figolla-1f9435 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8678 +/- ##
=======================================
Coverage 74.50% 74.50%
=======================================
Files 243 243
Lines 38670 38670
=======================================
Hits 28810 28810
Misses 7868 7868
Partials 1992 1992 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/retest |
| # Envoy image tag and digest are updated by tools/hack/bump-envoy-dynamic-modules.sh during releases. | ||
| FROM docker.io/envoyproxy/envoy:distroless-dev@sha256:1679d1bb44c7f90aca4a0f5e33f7c7c5723e96a90b38f9ad5a5b158ed4c95a40 |
There was a problem hiding this comment.
Won't this be fairly noisy? This will change with every envoy commit
There was a problem hiding this comment.
Maybe we pin here to a specific dev commit and we manually bump like go-control-plane?
We'd still want release branches to target a release envoy version though.
There was a problem hiding this comment.
Good point — the noise concern applies equally to the github.com/envoyproxy/envoy/source/extensions/dynamic_modules Go module in examples/dynamic-module-test/go.mod, which uses a pseudo-version pinned to a commit. However, Dependabot doesn't support updating Go pseudo-versions (see dependabot/dependabot-core#2028), so the Go module is currently stuck on a month-old commit with no automatic updates. Meanwhile, the distroless-dev Docker tag is mutable and always resolves to the latest envoy build, so every image pull gets the newest commit — creating a growing version skew between the Docker image and the Go module.
I see two options:
Option 1: Use envoy per-commit image tags
Switch from distroless-dev to commit-tagged images (e.g. distroless-dev-6f94ab127f45cf93a29da0a740c7e84d466d14fb). This lets us pin both the Go module and the Docker image to the exact same envoy commit. Dependabot won't try to update commit-based tags (they're not semver-comparable), so there's no noise. We can either update both manually as needed, or create a dedicated weekly workflow that bumps both to the latest envoy main commit in a single PR. During releases, the bump script would still override both — the image to a specific release tag (e.g. distroless-v1.37.0) and the Go module to a commit from the corresponding release branch.
Option 2: Keep using distroless-dev tag
Keep the current distroless-dev tag with a digest pin. Dependabot handles weekly digest updates automatically. For the Go module, we'd need a separate workflow to bump the pseudo-version since Dependabot can't do it. The downside is that the Docker image and Go module are updated independently and may point to different envoy commits.
Please share your thoughts.
Note: We should also consider migrating to Renovate, which natively supports both Go pseudo-version updates and tool directive dependency updates (see envoyproxy/gateway#6213 (comment)). That would eliminate the need for a custom workflow entirely, but it's a larger migration that should be evaluated separately.
What this PR does / why we need it:
Refactor the dynamic module dependency bump process and pin all example
Dockerfile images by digest.
bump-envoy-dynamic-modules.shto read the envoy version directly from
DefaultEnvoyProxyImageinapi/v1alpha1/shared_types.goinstead of requiring a CLI argument. On main(where the image is
distroless-dev) the script exits cleanly; on releasebranches it extracts the version automatically. This eliminates the need to
pass
ENVOY_VERSIONthrough the Makefile, build-args, and Dockerfile ARGs.ARG ENVOY_VERSION/ARG ENVOY_IMAGE_DIGESTfrom the dynamicmodule Dockerfile; use direct
FROMlines with digest pins instead.ENVOY_VERSIONvariable fromexamples/dynamic-module-test/Makefileand
--build-argpassthrough.ENVOY_PROXY_VERSIONparsing fromtools/make/examples.mkandsimplify the
update-dynamic-module-depstarget.RELEASING.mdto reflect the simplifiedmake update-dynamic-module-depscommand (no argument needed).SHA256 digests to improve reproducibility and supply-chain security.
"/examples/*"to the Docker package ecosystem independabot.ymlso digest pins are kept up to date automatically.Which issue(s) this PR fixes:
N/A
Release Notes: No