Skip to content

bazel/ci: Add registry/module updaters (bzlmod) - #47758

Merged
phlax merged 3 commits into
envoyproxy:mainfrom
phlax:bazel-updater-module
Oct 8, 2026
Merged

phlax merged 3 commits into
envoyproxy:mainfrom
phlax:bazel-updater-module

Conversation

@phlax

@phlax phlax commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

runs registry/module actions against each of the (nested) modules in the repo

@phlax
phlax marked this pull request as draft September 27, 2026 12:19
@phlax
phlax force-pushed the bazel-updater-module branch from 1014d5f to b8a3c57 Compare September 27, 2026 12:23
@phlax phlax changed the title [WIP] bazel/ci: Add registry/module updater (bzlmod) [WIP] bazel/ci: Add registry/module updaters (bzlmod) Sep 27, 2026
@phlax
phlax force-pushed the bazel-updater-module branch from b2a947a to 01225a7 Compare September 27, 2026 15:40
@phlax
phlax force-pushed the bazel-updater-module branch 7 times, most recently from 3bf72b9 to 803481c Compare September 29, 2026 19:50
@phlax phlax changed the title [WIP] bazel/ci: Add registry/module updaters (bzlmod) bazel/ci: Add registry/module updaters (bzlmod) Sep 29, 2026
@phlax
phlax marked this pull request as ready for review September 29, 2026 19:52
@phlax
phlax force-pushed the bazel-updater-module branch 4 times, most recently from cfc380c to 96eb79b Compare October 2, 2026 13:18

@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.

A few things I noticed while reading through. I haven't run any of it locally.

Also: the mobile/MODULE.bazel and docs/MODULE.bazel hunks look like unrelated formatting changes. kwargs and use_repo args are no longer sorted, multi-line calls are collapsed, and blank lines are removed. Were they produced by running update_module? If so, they may be better left out of this PR. It may also be worth running buildifier after the updater writes MODULE.bazel, so each deps.update doesn't cause this kind of churn.

(AI-assisted review)

Comment thread ci/bazel_fun.sh Resolved
Comment thread ci/bazel_fun.sh Outdated
Comment on lines +217 to +220
workspace_bazel_run "$module_dir" update_module -- \
--report \
"--json-out=${report_path}" \
"--markdown-out=${markdown_path}"

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.

run_in_mods calls helpers as "$fn" … || status=$?, which turns off set -e inside the helper. If this bazel run fails, the function still prints an empty == <workspace> == section and returns 0, so deps.report passes. Maybe add || return $?? The same applies to the workspace_bazel_run call in _registry_check_mod (L171). It does fail later because the SHA file is empty, but the error message is misleading.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

status is returned just below

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.

The issue is that status never gets the failure: because the call is on the left of ||, bash turns off set -e for everything inside "$fn". In _deps_report_mod a failed bazel run is skipped, echo/cat succeed, and the function returns 0, so status stays 0. Quick repro:

bash -c 'set -e; f(){ false; echo continued; }; s=0; f || s=$?; echo s=$s'
# continued
# s=0

Adding || return to the workspace_bazel_run calls in _deps_report_mod and _registry_check_mod would fix it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

got it - updating

Comment thread ci/bazel_fun.sh Resolved
Comment thread ci/do_ci.sh Outdated
deps)
echo "dependency metadata ordering..."
bazel test "${BAZEL_BUILD_OPTIONS[@]}" \
bazel test "${BAZEL_GLOBAL_OPTIONS[@]}" \

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.

Switching to BAZEL_GLOBAL_OPTIONS drops BAZEL_BUILD_OPTIONS. That removes the --config=rbe the precheck workflow passes through bazel-extra, plus --verbose_failures and --test_tmpdir. These tests now run without remote execution. They also use different options from the later dependatool run, which still uses BAZEL_BUILD_OPTIONS, so Bazel throws away its analysis cache in between. Was that intended? (Same at L651.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

its repeatedly shut down between these 2 tests - so no additional loss of analysis cache

we do want rbe etc here tho i think so switching back to build options - hoping that works - there was a reason for switching, but not sure if it was correct

@phlax

phlax commented Oct 5, 2026

Copy link
Copy Markdown
Member Author

they may be better left out of this PR. It may also be worth running buildifier after the updater writes MODULE.bazel, so each deps.update doesn't cause this kind of churn.

i think they were produced by running buildifier

@phlax
phlax force-pushed the bazel-updater-module branch from 96eb79b to 951b4db Compare October 8, 2026 07:43
phlax added 2 commits October 8, 2026 13:28
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
@phlax
phlax force-pushed the bazel-updater-module branch from 951b4db to 9968bf2 Compare October 8, 2026 12:29
@phlax
phlax enabled auto-merge (squash) October 8, 2026 12:46
@phlax
phlax merged commit 602b612 into envoyproxy:main Oct 8, 2026
27 checks passed
tomjzzhang pushed a commit to envoyproxy/nighthawk that referenced this pull request Oct 14, 2026
- Update ENVOY_COMMIT in MODULE.bazel to the latest Envoy commit, update bazel_dep versions to envoyproxy/envoy#48143, envoyproxy/envoy#48104, and refresh MODULE.bazel.lock
- Update tools/code_format/config.yaml to envoyproxy/envoy#47183
- Update .github/config.yml to envoyproxy/envoy#48145, envoyproxy/envoy#48134, envoyproxy/envoy#47758
- Update .bazelversion to envoyproxy/envoy#48114
- Update .bazelrc to envoyproxy/envoy#48140, envoyproxy/envoy#48101, envoyproxy/envoy#47957
- Update tools/base/requirements.txt

Signed-off-by: Jason Ye <[email protected]>
tomjzzhang pushed a commit to envoyproxy/nighthawk that referenced this pull request Oct 16, 2026
- Update ci/docker-compose.yml to envoyproxy/envoy#47758, envoyproxy/envoy#47932, envoyproxy/envoy#47314
- Update docs/root/updating_envoy_dependency.md to include syncing ci/docker-compose.yml

---------

Signed-off-by: Jason Ye <[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