Repository navigation
bazel/ci: Add CI for registry/module updater (bzlmod) - #48135
Conversation
|
/retest flakey github |
2fb46e5 to
5cb7f7a
Compare
|
/retest |
jwendell
left a comment
There was a problem hiding this comment.
Thanks @phlax, nice consolidation. A few things I think need addressing before this lands (details inline):
steps.update.outputs.changesis never actually set, so the "no changes" gating doesn't work and no-op runs will fail atgit commit.- The
bazeltask derives the version only from the rootMODULE.bazel. - The report step can mask
deps.reportfailures.
Review drafted with AI assistance (GitHub Copilot).
| 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" |
There was a problem hiding this comment.
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"
fiand gate on steps.changes.outputs.changes == 'true'.
| OUTPUT=$(git diff -- ':(glob)**/MODULE.bazel.lock' | sha256sum | cut -c1-7) | ||
| fi | ||
| else | ||
| OUTPUT=$(git diff -U0 -- MODULE.bazel \ |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
|
/retest |
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
No description provided.