Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix CI after bazel 8 release #2492

Merged
merged 21 commits into from
Dec 11, 2024
Merged

Conversation

aignas
Copy link
Collaborator

@aignas aignas commented Dec 10, 2024

Summary:

  • Remove the old 7.x config from all .bazelrc.
  • Drop bazel 6 from example testing/support. The .bazelrc
    for enabling WORKSPACE cannot work across bazel 6,7,8.
  • Add missing BUILD.bazel file for integration tests.
  • Remove an integration test runner for bazel 6.x.
  • RBE test for bazel 8 is still not working.
  • bump rules_java for internal WORKSPACE dependencies to
    a version that supports 8.x.
  • start running bazel-in-bazel integration tests using bazel 8.x.
  • until fix: add sh_library loads for bazel 8.x support bazel-contrib/rules_bazel_integration_test#414 is merged,
    we need to use bazel 7 for the delete_packagese pre-commit hook,
    not sure about how to track this as the cgrindel/bazel-lib needs
    a new version.

Fixes #2378

@aignas aignas requested a review from rickeylev as a code owner December 10, 2024 04:41
@aignas aignas marked this pull request as draft December 10, 2024 10:20
@aignas
Copy link
Collaborator Author

aignas commented Dec 10, 2024

Didn't have time to finish this. Tried doing:

  • Bumping minimum tested version of bazel to 7.4.1
  • Remove the 7.x config from bazelrc
  • Add --enable_workspace to workspace only examples (actually, should we move them to internal or somewhere, so that they don't advertise WORKSPACE support anymore?).

The build is failing with rules_java and it seems that it might be defined somewhere early in the process for the WORKSPACE builds.

@aignas
Copy link
Collaborator Author

aignas commented Dec 11, 2024

Reverted the changes and trying a more minimal stop-gap solution.

@rickeylev
Copy link
Collaborator

The build is failing with rules_java ...
ERROR: Error computing the main repository mapping: cannot load '@@rules_java//java:rules_java_deps.bzl': no such file

Ugh, that error. I've seen that a ton while trying to get Bazel 9 workspace working. From what I've been able to tell, it means rules_java needs to be upgraded.

Ah, I see we have CI coverage for bazel 8 bzlmod, but not workspace 🤦 .

@rickeylev
Copy link
Collaborator

This is what I have in some WIP stuff for bazel 9:

    http_archive(
        name = "rules_java",
        urls = [
            "https://github.com/bazelbuild/rules_java/releases/download/8.6.2/rules_java-8.6.2.tar.gz",
        ],
        sha256 = "a64ab04616e76a448c2c2d8165d836f0d2fb0906200d0b7c7376f46dd62e59cc",
    )

There may also be a change to the rules_java_dependencies() call in internal_dev_setup.bzl needed -- load("@rules_java//java:deps.bzl", "rules_java_dependencies") might be needed. (not entirely sure)

@aignas aignas marked this pull request as ready for review December 11, 2024 01:03
@aignas aignas enabled auto-merge December 11, 2024 01:04
@aignas aignas marked this pull request as draft December 11, 2024 08:20
auto-merge was automatically disabled December 11, 2024 08:20

Pull request was converted to draft

WORKSPACE Show resolved Hide resolved
@aignas aignas marked this pull request as ready for review December 11, 2024 09:01
.bazelci/presubmit.yml Outdated Show resolved Hide resolved
.bazelci/presubmit.yml Show resolved Hide resolved
.pre-commit-config.yaml Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
WORKSPACE Show resolved Hide resolved
@rickeylev rickeylev enabled auto-merge December 11, 2024 17:03
@rickeylev rickeylev added this pull request to the merge queue Dec 11, 2024
Merged via the queue into bazelbuild:main with commit 444ca88 Dec 11, 2024
4 checks passed
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.

Support Bazel 8
2 participants