Skip to content

bazel/ci: Add CI for registry/module updater (bzlmod) - #48135

Merged
phlax merged 2 commits into
mainfrom
bazel-updater
Oct 8, 2026
Merged

phlax merged 2 commits into
mainfrom
bazel-updater

Conversation

@phlax

@phlax phlax commented Oct 8, 2026

Copy link
Copy Markdown
Member

No description provided.

@phlax
phlax marked this pull request as draft October 8, 2026 12:57
@phlax
phlax added this pull request to stack #48138 October 8, 2026 14:14
@phlax phlax changed the title [WIP] bazel/ci: Add CI for registry/module updater (bzlmod) bazel/ci: Add CI for registry/module updater (bzlmod) Oct 8, 2026
@phlax
phlax marked this pull request as ready for review October 8, 2026 14:41
@phlax

phlax commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

/retest flakey github

@phlax
phlax force-pushed the bazel-updater branch 2 times, most recently from 2fb46e5 to 5cb7f7a Compare October 8, 2026 14:52
@phlax
phlax removed this pull request from stack #48138 October 8, 2026 14:56
@phlax
phlax enabled auto-merge (squash) October 8, 2026 14:56
@phlax

phlax commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

/retest

@jwendell jwendell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @phlax, nice consolidation. A few things I think need addressing before this lands (details inline):

  1. steps.update.outputs.changes is never actually set, so the "no changes" gating doesn't work and no-op runs will fail at git commit.
  2. The bazel task derives the version only from the root MODULE.bazel.
  3. The report step can mask deps.report failures.

Review drafted with AI assistance (GitHub Copilot).

Comment thread ci/dependency/update.sh Outdated
if [[ -z "$(git status --porcelain -- ':(glob)**/MODULE.bazel.lock')" ]]; then
echo 'Lockfiles are in sync, nothing to do' >&2
if [[ -n "${GITHUB_OUTPUT:-}" ]]; then
echo 'changes=false' >> "$GITHUB_OUTPUT"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This writes changes=false from inside the envoyproxy/toolshed/actions/bson composite action, so it lands on bson's inner run step rather than on steps.update. bson only re-exports exit-code, command and output, so steps.update.outputs.changes is always empty and every != 'false' check (L101/L110/L153 in the workflow) evaluates true.

When lockfiles are already in sync, the PR step then runs and toolshed's pr/create.sh fails on git commit ("nothing to commit") under set -e. The same applies to registry/bazel runs that end up with no diff.

Suggestion: compute this in a plain run: step in the workflow after update, for all tasks, e.g.

- id: changes
  run: |
    if [[ -n "$(git status --porcelain)" ]]; then
        echo "changes=true" >> "$GITHUB_OUTPUT"
    else
        echo "changes=false" >> "$GITHUB_OUTPUT"
    fi

and gate on steps.changes.outputs.changes == 'true'.

Comment thread ci/dependency/update.sh Outdated
OUTPUT=$(git diff -- ':(glob)**/MODULE.bazel.lock' | sha256sum | cut -c1-7)
fi
else
OUTPUT=$(git diff -U0 -- MODULE.bazel \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

deps.update updates every module in MODULE_DIRS (api, mobile, docs, ...), but the version is only read from the root MODULE.bazel diff. For a dep declared only in a non-root module (what bazel-api used to cover), OUTPUT is empty, which gives branch dependency/bazel/<dep>/, a title ending in -> , and an artifact named <dep>-.

Maybe diff ':(glob)**/MODULE.bazel' instead, and fail loudly if OUTPUT is still empty?

- name: Generate report
run: |
./ci/run_envoy_docker.sh './ci/do_ci.sh deps.report' \
| tee "${RUNNER_TEMP}/deps-report.md"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Without an explicit shell:, this runs as bash -e {0} (no pipefail), so the step's exit status comes from tee, and a failing deps.report still produces a green job with a partial or empty report. Adding shell: bash (which runs with -eo pipefail) should fix it.

@phlax

phlax commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

/retest

@phlax
phlax merged commit 85bfd17 into main Oct 8, 2026
27 checks passed
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
Add a `release-images` task to the dependency workflow that updates the
base images pinned in `distribution/docker/Dockerfile-envoy` (the
`BUILD_OS:BUILD_TAG@sha256:BUILD_SHA` args and any pinned `FROM ... AS
envoy-<name>` stage) to the current digest of their tag, and opens a PR
with the result.

The update is done by `ci/dependency/release_images.sh`, which only
needs docker (buildx) and jq, so it can also be run locally.

Signed-off-by: Ryan Northey <[email protected]>

Backport note: the task list has no `lockfiles` and `registry` tasks on this
branch, the new job uses this branch's toolshed actions-v0.4.17 pin, and the
`wip` input it reads (from envoyproxy#48135, the bzlmod registry updater, which is
not on this branch) is added on its own.

(cherry picked from commit b6ce5d1)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
Add a `release-images` task to the dependency workflow that updates the
base images pinned in `distribution/docker/Dockerfile-envoy` (the
`BUILD_OS:BUILD_TAG@sha256:BUILD_SHA` args and any pinned `FROM ... AS
envoy-<name>` stage) to the current digest of their tag, and opens a PR
with the result.

The update is done by `ci/dependency/release_images.sh`, which only
needs docker (buildx) and jq, so it can also be run locally.

Signed-off-by: Ryan Northey <[email protected]>

Backport note: the task list has no `lockfiles` and `registry` tasks on this
branch, the new job uses this branch's toolshed actions-v0.4.17 pin, and the
`wip` input it reads (from envoyproxy#48135, the bzlmod registry updater, which is
not on this branch) is added on its own.

(cherry picked from commit b6ce5d1)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
Add a `release-images` task to the dependency workflow that updates the
base images pinned in `distribution/docker/Dockerfile-envoy` (the
`BUILD_OS:BUILD_TAG@sha256:BUILD_SHA` args and any pinned `FROM ... AS
envoy-<name>` stage) to the current digest of their tag, and opens a PR
with the result.

The update is done by `ci/dependency/release_images.sh`, which only
needs docker (buildx) and jq, so it can also be run locally.

Signed-off-by: Ryan Northey <[email protected]>

Backport note (release/v1.38, as release/v1.39): the task list has no `lockfiles` and `registry` tasks on this
branch, the new job uses this branch's toolshed v0.4.6 pin, and the
`wip` input it reads (from envoyproxy#48135, the bzlmod registry updater, which is
not on this branch) is added on its own.

(cherry picked from commit b6ce5d1)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
Add a `release-images` task to the dependency workflow that updates the
base images pinned in `distribution/docker/Dockerfile-envoy` (the
`BUILD_OS:BUILD_TAG@sha256:BUILD_SHA` args and any pinned `FROM ... AS
envoy-<name>` stage) to the current digest of their tag, and opens a PR
with the result.

The update is done by `ci/dependency/release_images.sh`, which only
needs docker (buildx) and jq, so it can also be run locally.

Signed-off-by: Ryan Northey <[email protected]>

Backport note (release/v1.37 and v1.38, as release/v1.39): the task list has no `lockfiles` and `registry` tasks on this
branch, the new job uses this branch's toolshed pin (v0.4.6 on v1.38, v0.4.1 on v1.37), and the
`wip` input it reads (from envoyproxy#48135, the bzlmod registry updater, which is
not on this branch) is added on its own.

(cherry picked from commit b6ce5d1)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
Add a `release-images` task to the dependency workflow that updates the
base images pinned in `distribution/docker/Dockerfile-envoy` (the
`BUILD_OS:BUILD_TAG@sha256:BUILD_SHA` args and any pinned `FROM ... AS
envoy-<name>` stage) to the current digest of their tag, and opens a PR
with the result.

The update is done by `ci/dependency/release_images.sh`, which only
needs docker (buildx) and jq, so it can also be run locally.

Signed-off-by: Ryan Northey <[email protected]>

Backport note: the task list has no `lockfiles` and `registry` tasks on this
branch, the new job uses this branch's toolshed actions-v0.4.17 pin, and the
`wip` input it reads (from envoyproxy#48135, the bzlmod registry updater, which is
not on this branch) is added on its own.

(cherry picked from commit b6ce5d1)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
Add a `release-images` task to the dependency workflow that updates the
base images pinned in `distribution/docker/Dockerfile-envoy` (the
`BUILD_OS:BUILD_TAG@sha256:BUILD_SHA` args and any pinned `FROM ... AS
envoy-<name>` stage) to the current digest of their tag, and opens a PR
with the result.

The update is done by `ci/dependency/release_images.sh`, which only
needs docker (buildx) and jq, so it can also be run locally.

Signed-off-by: Ryan Northey <[email protected]>

Backport note (release/v1.38, as release/v1.39): the task list has no `lockfiles` and `registry` tasks on this
branch, the new job uses this branch's toolshed v0.4.6 pin, and the
`wip` input it reads (from envoyproxy#48135, the bzlmod registry updater, which is
not on this branch) is added on its own.

(cherry picked from commit b6ce5d1)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
Add a `release-images` task to the dependency workflow that updates the
base images pinned in `distribution/docker/Dockerfile-envoy` (the
`BUILD_OS:BUILD_TAG@sha256:BUILD_SHA` args and any pinned `FROM ... AS
envoy-<name>` stage) to the current digest of their tag, and opens a PR
with the result.

The update is done by `ci/dependency/release_images.sh`, which only
needs docker (buildx) and jq, so it can also be run locally.

Signed-off-by: Ryan Northey <[email protected]>

Backport note (release/v1.37 and v1.38, as release/v1.39): the task list has no `lockfiles` and `registry` tasks on this
branch, the new job uses this branch's toolshed pin (v0.4.6 on v1.38, v0.4.1 on v1.37), and the
`wip` input it reads (from envoyproxy#48135, the bzlmod registry updater, which is
not on this branch) is added on its own.

(cherry picked from commit b6ce5d1)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit that referenced this pull request Nov 17, 2026
Add a `release-images` task to the dependency workflow that updates the
base images pinned in `distribution/docker/Dockerfile-envoy` (the
`BUILD_OS:BUILD_TAG@sha256:BUILD_SHA` args and any pinned `FROM ... AS
envoy-<name>` stage) to the current digest of their tag, and opens a PR
with the result.

The update is done by `ci/dependency/release_images.sh`, which only
needs docker (buildx) and jq, so it can also be run locally.

Signed-off-by: Ryan Northey <[email protected]>

Backport note (release/v1.38, as release/v1.39): the task list has no `lockfiles` and `registry` tasks on this
branch, the new job uses this branch's toolshed v0.4.6 pin, and the
`wip` input it reads (from #48135, the bzlmod registry updater, which is
not on this branch) is added on its own.

(cherry picked from commit b6ce5d1)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
Add a `release-images` task to the dependency workflow that updates the
base images pinned in `distribution/docker/Dockerfile-envoy` (the
`BUILD_OS:BUILD_TAG@sha256:BUILD_SHA` args and any pinned `FROM ... AS
envoy-<name>` stage) to the current digest of their tag, and opens a PR
with the result.

The update is done by `ci/dependency/release_images.sh`, which only
needs docker (buildx) and jq, so it can also be run locally.

Signed-off-by: Ryan Northey <[email protected]>

Backport note (release/v1.37 and v1.38, as release/v1.39): the task list has no `lockfiles` and `registry` tasks on this
branch, the new job uses this branch's toolshed pin (v0.4.6 on v1.38, v0.4.1 on v1.37), and the
`wip` input it reads (from envoyproxy#48135, the bzlmod registry updater, which is
not on this branch) is added on its own.

(cherry picked from commit b6ce5d1)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 18, 2026
Add a `release-images` task to the dependency workflow that updates the
base images pinned in `distribution/docker/Dockerfile-envoy` (the
`BUILD_OS:BUILD_TAG@sha256:BUILD_SHA` args and any pinned `FROM ... AS
envoy-<name>` stage) to the current digest of their tag, and opens a PR
with the result.

The update is done by `ci/dependency/release_images.sh`, which only
needs docker (buildx) and jq, so it can also be run locally.

Signed-off-by: Ryan Northey <[email protected]>

Backport note (release/v1.37 and v1.38, as release/v1.39): the task list has no `lockfiles` and `registry` tasks on this
branch, the new job uses this branch's toolshed pin (v0.4.6 on v1.38, v0.4.1 on v1.37), and the
`wip` input it reads (from envoyproxy#48135, the bzlmod registry updater, which is
not on this branch) is added on its own.

(cherry picked from commit b6ce5d1)
Signed-off-by: Ryan Northey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants