Skip to content

bazel 7 readiness test - #3171

Open
grandpaul wants to merge 2 commits into
google:mainfrom
grandpaul:paulliu-bazel-7-readiness-test
Open

bazel 7 readiness test#3171
grandpaul wants to merge 2 commits into
google:mainfrom
grandpaul:paulliu-bazel-7-readiness-test

Conversation

@grandpaul

Copy link
Copy Markdown
Collaborator

Hi. I added bazel-7 readiness test. This is based on the Debian package we have in Debian unstable.
The patchset is reduced to only do the readiness test. Also the mock_repos are reduced too.
Please review the commits.
Thanks.

Ying-Chun Liu added 2 commits September 10, 2026 23:27
Signed-off-by: Ying-Chun Liu <liupa@google.com>
We also modify workflows/presubmit.yaml to run this action.

Signed-off-by: Ying-Chun Liu <liupa@google.com>
Comment on lines +1 to +2
--- a/base/cvd/MODULE.bazel 2026-09-10 21:48:00.155816566 +0000
+++ b/base/cvd/MODULE.bazel 2026-09-10 21:48:00.156377436 +0000

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 changes to MODULE.bazel and build_external.MODULE.bazel seem very brittle, like we'll run into merge conflicts with these patches on practically any change to these files. Is there any way to reduce the change surface here?

It's not a quick fix but I was looking at converting some of the git_repository dependencies to bazel_deps in #3172 and #3173 which might align better with the override_module setup in run_bazel_7_readiness_test.sh‎.

COPTS = BUILD_VAR_COPTS
LINKOPTS = BUILD_VAR_LINKOPTS

+def _fallback_macro(inherit_attrs = None, attrs = {}, implementation = None):

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.

Rather than as a patch file, can this be in rules.bzl?

If I understand correctly, https://github.com/bazel-contrib/bazel_features can be used, e.g.

load("@bazel_features//:features.bzl", "bazel_features")
if not bazel_features.globals.macro:
    def ...

Comment on lines +10 to +12
for i in `pwd`/tools/testutils/bazel-7-readiness/patches/*.patch; do
patch -p1 < $i
done

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.

One of the nice things about the bazel 9 readiness test is that it is possible to reproduce issues locally with something like OVERRIDE_BAZEL_VERSION=9.0.0 bazel build <something>, but this script looks a lot more invasive.

What's the intended workflow here if a developer sees a presubmit failure on the github action? Running this script looks like it will make a lot of changes to their local git repository that can only be reset by git restore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants