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

Bump grpc from 1.26.0 to 1.31.1 #12226

Closed
wants to merge 9 commits into from

Conversation

dmivankov
Copy link
Contributor

Fixes having external dependencies without checksum

  • boringssl (each download was timestamped, but otherwise stable)
  • bazel_skylark was overriden to be master (sic!)

There doesn't seem to be many breaking/big changes up to grpc 1.31.1

  • removal of xds-experimental URI scheme
  • removal of MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL
  • enable TLS 1.3 in the C-core and all wrapped languages
  • some of bazel-related patches got merged in
    https://github.com/grpc/grpc/releases

How to check whether certain dependency has a checksum
bazel query //external:bazel_skylib --output build
bazel query //external:boringssl --output build

How to find (almost?) all problematic dependencies
compare output of
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | ."@name"'
vs
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | select (.string[]."@name" | contains("sha256")) | ."@name"'

Note that it looks for string sha256 and misses dict sha256 for
distdir_tar rules - those are false positive currently.

Fixes having external dependencies without checksum
- boringssl (each download was timestamped, but otherwise stable)
- bazel_skylark was overriden to be master (sic!)

There doesn't seem to be many breaking/big changes up to grpc 1.31.1
- removal of xds-experimental URI scheme
- removal of MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL
- enable TLS 1.3 in the C-core and all wrapped languages
- some of bazel-related patches got merged in
https://github.com/grpc/grpc/releases

How to check whether certain dependency has a checksum
bazel query //external:bazel_skylib --output build
bazel query //external:boringssl --output build

How to find (almost?) all problematic dependencies
compare output of
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | ."@name"'
vs
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | select (.string[]."@name" | contains("sha256")) | ."@name"'

Note that it looks for string sha256 and misses dict sha256 for
distdir_tar rules - those are false positive currently.
@meteorcloudy
Copy link
Member

Nice, thanks for the update! This PR looks good to me.

But we cannot import a PR with changes both inside and outside of the third_party directory, could you please split it into several PRs? We have to do it in a way that won't break Bazel, an example of changes is:
#11807
#12108
#12139

@dmivankov
Copy link
Contributor Author

Thanks, will look into that. Do you have more details on what could break with a single PR? As I see there are bootstrapping and other tests in CI

@meteorcloudy
Copy link
Member

Yeah, basically I meant the presubmit tests should pass. If it's green, we are fine.

@dmivankov
Copy link
Contributor Author

dmivankov commented Oct 8, 2020

I will probably have to add grpc version suffix to
third_party/grpc/BUILD
third_party/grpc/bazel.patch
third_party/grpc/bazel/*
third_party/grpc/compiler/*
otherwise can't simply add new grpc version alongside previous one

@dmivankov
Copy link
Contributor Author

Ah, nice, so all is good with the current state of PR? :)

@meteorcloudy
Copy link
Member

I will probably have to add grpc version suffix to
third_party/grpc/BUILD
third_party/grpc/bazel.patch
third_party/grpc/bazel/*
third_party/grpc/compiler/*
otherwise can't simply add new grpc version alongside previous one

I think the grpc java compiler version doesn't have to exactly match the grpc cpp version. So you probably don't have to do that. It's just the grpc_1.26.0.patch file has to match the version defined in WORKSPACE.
You can do this

  • First add the new patch file grpc_1.31.1.patch and upgrade everything under third_party (bazel/ , compiler/ , grpc jars)
  • Upgrade the grpc version in WORKSPACE to 1.31.1
  • Remove old patch files.

… it came from"

Actually, embedded_tools_src patch comes from
22d7e77: Make it possible to do `bazel query @bazel_tools//...` without errors.

It just patched third_party/grpc/BUILD without updating third_party/grpc/bazel.patch
Now patch is made up to date.

Note: it could be that PR check doesn't test the
`bazel query @bazel_tools//...` case

This reverts commit 3f11beb.
dmivankov added a commit to dmivankov/bazel that referenced this pull request Oct 9, 2020
PART 1: prepare third_party/grpc files for new version
Composed PR: bazelbuild#12226
Note: generate_cc.bzl and protobuf.bzl are modified in place and
already affect the build. But the change seems to be harmless
(adding explicit ProtoInfo load from @rules_proto).

Fixes having external dependencies without checksum
- boringssl (each download was timestamped, but otherwise stable)
- bazel_skylark was overriden to be master (sic!)

There doesn't seem to be many breaking/big changes up to grpc 1.31.1
- removal of xds-experimental URI scheme
- removal of MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL
- enable TLS 1.3 in the C-core and all wrapped languages
- some of bazel-related patches got merged in
https://github.com/grpc/grpc/releases

How to check whether certain dependency has a checksum
bazel query //external:bazel_skylib --output build
bazel query //external:boringssl --output build

How to find (almost?) all problematic dependencies
compare output of
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | ."@name"'
vs
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | select (.string[]."@name" | contains("sha256")) | ."@name"'

Note that it looks for string sha256 and misses dict sha256 for
distdir_tar rules - those are false positive currently.
dmivankov added a commit to dmivankov/bazel that referenced this pull request Oct 9, 2020
PART 2: switch to grpc 1.31.1
Composed PR: bazelbuild#12226

Fixes having external dependencies without checksum
- boringssl (each download was timestamped, but otherwise stable)
- bazel_skylark was overriden to be master (sic!)

There doesn't seem to be many breaking/big changes up to grpc 1.31.1
- removal of xds-experimental URI scheme
- removal of MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL
- enable TLS 1.3 in the C-core and all wrapped languages
- some of bazel-related patches got merged in
https://github.com/grpc/grpc/releases

How to check whether certain dependency has a checksum
bazel query //external:bazel_skylib --output build
bazel query //external:boringssl --output build

How to find (almost?) all problematic dependencies
compare output of
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | ."@name"'
vs
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | select (.string[]."@name" | contains("sha256")) | ."@name"'

Note that it looks for string sha256 and misses dict sha256 for
distdir_tar rules - those are false positive currently.
dmivankov added a commit to dmivankov/bazel that referenced this pull request Oct 9, 2020
PART 3: remove grpc 1.26.0 from third_party/grpc
Composed PR: bazelbuild#12226
Note: bootstrap jars & java_plugin remain to be 1.26.0 though

Fixes having external dependencies without checksum
- boringssl (each download was timestamped, but otherwise stable)
- bazel_skylark was overriden to be master (sic!)

There doesn't seem to be many breaking/big changes up to grpc 1.31.1
- removal of xds-experimental URI scheme
- removal of MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL
- enable TLS 1.3 in the C-core and all wrapped languages
- some of bazel-related patches got merged in
https://github.com/grpc/grpc/releases

How to check whether certain dependency has a checksum
bazel query //external:bazel_skylib --output build
bazel query //external:boringssl --output build

How to find (almost?) all problematic dependencies
compare output of
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | ."@name"'
vs
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | select (.string[]."@name" | contains("sha256")) | ."@name"'

Note that it looks for string sha256 and misses dict sha256 for
distdir_tar rules - those are false positive currently.
@dmivankov
Copy link
Contributor Author

dmivankov commented Oct 9, 2020

@meteorcloudy
Copy link
Member

Thanks, do you plan to upgrade the jars later?

bazel-io pushed a commit that referenced this pull request Oct 9, 2020
PART 1: prepare third_party/grpc files for new version
Composed PR: #12226
Note: generate_cc.bzl and protobuf.bzl are modified in place and
already affect the build. But the change seems to be harmless
(adding explicit ProtoInfo load from @rules_proto).

Fixes having external dependencies without checksum
- boringssl (each download was timestamped, but otherwise stable)
- bazel_skylark was overriden to be master (sic!)

There doesn't seem to be many breaking/big changes up to grpc 1.31.1
- removal of xds-experimental URI scheme
- removal of MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL
- enable TLS 1.3 in the C-core and all wrapped languages
- some of bazel-related patches got merged in
https://github.com/grpc/grpc/releases

How to check whether certain dependency has a checksum
bazel query //external:bazel_skylib --output build
bazel query //external:boringssl --output build

How to find (almost?) all problematic dependencies
compare output of
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | ."@name"'
vs
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | select (.string[]."@name" | contains("sha256")) | ."@name"'

Note that it looks for string sha256 and misses dict sha256 for
distdir_tar rules - those are false positive currently.

Closes #12235
@dmivankov
Copy link
Contributor Author

Bootstrap jars seem to have a good amount of bugfixes, so would be good to bump them https://github.com/grpc/grpc-java/releases
But actually there seem to be netty dependency bump there - would need to double-check version and make it a separate PR

dmivankov added a commit to dmivankov/bazel that referenced this pull request Oct 9, 2020
PART 2: switch to grpc 1.31.1
Composed PR: bazelbuild#12226

Fixes having external dependencies without checksum
- boringssl (each download was timestamped, but otherwise stable)
- bazel_skylark was overriden to be master (sic!)

There doesn't seem to be many breaking/big changes up to grpc 1.31.1
- removal of xds-experimental URI scheme
- removal of MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL
- enable TLS 1.3 in the C-core and all wrapped languages
- some of bazel-related patches got merged in
https://github.com/grpc/grpc/releases

How to check whether certain dependency has a checksum
bazel query //external:bazel_skylib --output build
bazel query //external:boringssl --output build

How to find (almost?) all problematic dependencies
compare output of
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | ."@name"'
vs
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | select (.string[]."@name" | contains("sha256")) | ."@name"'

Note that it looks for string sha256 and misses dict sha256 for
distdir_tar rules - those are false positive currently.
@meteorcloudy
Copy link
Member

Sounds great!

bazel-io pushed a commit that referenced this pull request Oct 9, 2020
PART 3: remove grpc 1.26.0 from third_party/grpc
Composed PR: #12226
Note: bootstrap jars & java_plugin remain to be 1.26.0 though

Fixes having external dependencies without checksum
- boringssl (each download was timestamped, but otherwise stable)
- bazel_skylark was overriden to be master (sic!)

There doesn't seem to be many breaking/big changes up to grpc 1.31.1
- removal of xds-experimental URI scheme
- removal of MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL
- enable TLS 1.3 in the C-core and all wrapped languages
- some of bazel-related patches got merged in
https://github.com/grpc/grpc/releases

How to check whether certain dependency has a checksum
bazel query //external:bazel_skylib --output build
bazel query //external:boringssl --output build

How to find (almost?) all problematic dependencies
compare output of
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | ."@name"'
vs
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | select (.string[]."@name" | contains("sha256")) | ."@name"'

Note that it looks for string sha256 and misses dict sha256 for
distdir_tar rules - those are false positive currently.

Closes #12237
@meteorcloudy
Copy link
Member

split into 3: #12235 (add grpc 1.31.1 patches), #12236 (switch to 1.31.1) and #12237 (drop 1.26.0 patches)

All three PRs have been merged now.

coeuvre pushed a commit to coeuvre/bazel that referenced this pull request Oct 22, 2020
PART 1: prepare third_party/grpc files for new version
Composed PR: bazelbuild#12226
Note: generate_cc.bzl and protobuf.bzl are modified in place and
already affect the build. But the change seems to be harmless
(adding explicit ProtoInfo load from @rules_proto).

Fixes having external dependencies without checksum
- boringssl (each download was timestamped, but otherwise stable)
- bazel_skylark was overriden to be master (sic!)

There doesn't seem to be many breaking/big changes up to grpc 1.31.1
- removal of xds-experimental URI scheme
- removal of MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL
- enable TLS 1.3 in the C-core and all wrapped languages
- some of bazel-related patches got merged in
https://github.com/grpc/grpc/releases

How to check whether certain dependency has a checksum
bazel query //external:bazel_skylib --output build
bazel query //external:boringssl --output build

How to find (almost?) all problematic dependencies
compare output of
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | ."@name"'
vs
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | select (.string[]."@name" | contains("sha256")) | ."@name"'

Note that it looks for string sha256 and misses dict sha256 for
distdir_tar rules - those are false positive currently.

Closes bazelbuild#12235
coeuvre pushed a commit to coeuvre/bazel that referenced this pull request Oct 22, 2020
PART 3: remove grpc 1.26.0 from third_party/grpc
Composed PR: bazelbuild#12226
Note: bootstrap jars & java_plugin remain to be 1.26.0 though

Fixes having external dependencies without checksum
- boringssl (each download was timestamped, but otherwise stable)
- bazel_skylark was overriden to be master (sic!)

There doesn't seem to be many breaking/big changes up to grpc 1.31.1
- removal of xds-experimental URI scheme
- removal of MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL
- enable TLS 1.3 in the C-core and all wrapped languages
- some of bazel-related patches got merged in
https://github.com/grpc/grpc/releases

How to check whether certain dependency has a checksum
bazel query //external:bazel_skylib --output build
bazel query //external:boringssl --output build

How to find (almost?) all problematic dependencies
compare output of
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | ."@name"'
vs
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | select (.string[]."@name" | contains("sha256")) | ."@name"'

Note that it looks for string sha256 and misses dict sha256 for
distdir_tar rules - those are false positive currently.

Closes bazelbuild#12237
coeuvre pushed a commit to coeuvre/bazel that referenced this pull request Oct 22, 2020
PART 1: prepare third_party/grpc files for new version
Composed PR: bazelbuild#12226
Note: generate_cc.bzl and protobuf.bzl are modified in place and
already affect the build. But the change seems to be harmless
(adding explicit ProtoInfo load from @rules_proto).

Fixes having external dependencies without checksum
- boringssl (each download was timestamped, but otherwise stable)
- bazel_skylark was overriden to be master (sic!)

There doesn't seem to be many breaking/big changes up to grpc 1.31.1
- removal of xds-experimental URI scheme
- removal of MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL
- enable TLS 1.3 in the C-core and all wrapped languages
- some of bazel-related patches got merged in
https://github.com/grpc/grpc/releases

How to check whether certain dependency has a checksum
bazel query //external:bazel_skylib --output build
bazel query //external:boringssl --output build

How to find (almost?) all problematic dependencies
compare output of
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | ."@name"'
vs
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | select (.string[]."@name" | contains("sha256")) | ."@name"'

Note that it looks for string sha256 and misses dict sha256 for
distdir_tar rules - those are false positive currently.

Closes bazelbuild#12235
coeuvre pushed a commit to coeuvre/bazel that referenced this pull request Oct 22, 2020
PART 3: remove grpc 1.26.0 from third_party/grpc
Composed PR: bazelbuild#12226
Note: bootstrap jars & java_plugin remain to be 1.26.0 though

Fixes having external dependencies without checksum
- boringssl (each download was timestamped, but otherwise stable)
- bazel_skylark was overriden to be master (sic!)

There doesn't seem to be many breaking/big changes up to grpc 1.31.1
- removal of xds-experimental URI scheme
- removal of MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL
- enable TLS 1.3 in the C-core and all wrapped languages
- some of bazel-related patches got merged in
https://github.com/grpc/grpc/releases

How to check whether certain dependency has a checksum
bazel query //external:bazel_skylib --output build
bazel query //external:boringssl --output build

How to find (almost?) all problematic dependencies
compare output of
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | ."@name"'
vs
bazel query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all)' --output xml | xq '.query.rule[] | select (.string[]."@name" | contains("sha256")) | ."@name"'

Note that it looks for string sha256 and misses dict sha256 for
distdir_tar rules - those are false positive currently.

Closes bazelbuild#12237
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants