Repository navigation
bazel/ci: Add registry/module updaters (bzlmod) - #47758
Conversation
1014d5f to
b8a3c57
Compare
b2a947a to
01225a7
Compare
3bf72b9 to
803481c
Compare
cfc380c to
96eb79b
Compare
jwendell
left a comment
There was a problem hiding this comment.
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)
| workspace_bazel_run "$module_dir" update_module -- \ | ||
| --report \ | ||
| "--json-out=${report_path}" \ | ||
| "--markdown-out=${markdown_path}" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
status is returned just below
There was a problem hiding this comment.
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.
| deps) | ||
| echo "dependency metadata ordering..." | ||
| bazel test "${BAZEL_BUILD_OPTIONS[@]}" \ | ||
| bazel test "${BAZEL_GLOBAL_OPTIONS[@]}" \ |
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
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
i think they were produced by running buildifier |
96eb79b to
951b4db
Compare
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
951b4db to
9968bf2
Compare
- 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]>
- 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]>
runs registry/module actions against each of the (nested) modules in the repo