Skip to content

Upgrade to Bazel 3.7.1#24981

Merged
lidizheng merged 1 commit intogrpc:masterfrom
lidizheng:bazel-newer
Dec 14, 2020
Merged

Upgrade to Bazel 3.7.1#24981
lidizheng merged 1 commit intogrpc:masterfrom
lidizheng:bazel-newer

Conversation

@lidizheng
Copy link
Copy Markdown
Contributor

@lidizheng lidizheng commented Dec 14, 2020

This PR upgraded our Bazel version from 2.2.0 to 3.7.1. This is needed to upgrade upb to the latest version, which includes converting messages into JSON. Newer Bazel broke two features for upb (bazelbuild/bazel#11584 and bazelbuild/bazel#8118), and made upb incompatible with Bazel 2.x.

So far, the tests are looking good, and none of the new backward incompatibilities affect gRPC.

I was blocked by bazel test .... It couldn't build. Just found out this morning, that the ... works surprisingly as it picks up tests in third_party folder, and those tests assumed different folder structure.

In future, we could have a new target for "all gRPC tests", or somehow exlucde the third_party directory from ....

CC @jtattermusch

@lidizheng lidizheng added lang/other release notes: no Indicates if PR should not be in release notes area/build infra/Bazel labels Dec 14, 2020
@lidizheng lidizheng marked this pull request as ready for review December 14, 2020 18:31
@lidizheng lidizheng requested a review from gnossen December 14, 2020 18:31
@lidizheng lidizheng changed the title [WIP] Upgrade to Bazel 3.7.1 Upgrade to Bazel 3.7.1 Dec 14, 2020
@gnossen
Copy link
Copy Markdown
Contributor

gnossen commented Dec 14, 2020

@lidizheng I think adding a .bazelignore at the project root with third_party/ in it should fix the bazel build ... problem. There are a couple of files in third_party/ that we belong to our codebase, but they're .bzl files, not BUILD files, so the file may need to list individual third_party/foo_project/ directories instead.

Copy link
Copy Markdown
Contributor

@gnossen gnossen left a comment

Choose a reason for hiding this comment

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

👍 in principle.

@lidizheng
Copy link
Copy Markdown
Contributor Author

Known failures: #18111 #24986

@lidizheng lidizheng merged commit 9293ce3 into grpc:master Dec 14, 2020
@veblush
Copy link
Copy Markdown
Contributor

veblush commented Dec 15, 2020

We already have a .bazelignore file so you can add any non-grpc projects to it if they cause problems. As Richards said, we can't simply add third_party there because some belong to gRPC.

Copy link
Copy Markdown
Contributor

@jtattermusch jtattermusch left a comment

Choose a reason for hiding this comment

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

@lidizheng Lots of important pieces are missing in this PR - that's why I asked you to get my feedback first.

A more correct version of this PR is #25000 (hopefully the tests pass otherwise you'd have to revert this change).

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

Labels

area/build infra/Bazel lang/other release notes: no Indicates if PR should not be in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants