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

Bazel incompatible changes #6995

Closed
keith opened this issue May 17, 2019 · 16 comments
Closed

Bazel incompatible changes #6995

keith opened this issue May 17, 2019 · 16 comments

Comments

@keith
Copy link
Member

keith commented May 17, 2019

This issue tracks incompatible bazel changes that cause upstream bazel CI test failures.

Starting today we have upstream bazel CI building and testing envoy so bazel can catch issues sooner. As part of this we want to try and stay ahead of upcoming breaking bazel changes (more discussion here).

Now that this is enabled I want to take a first pass on trying to get us to incompatible change 0, so future changes are easier to keep up with.

Here's the most recent build showing us which specific changes we aren't compatible with https://buildkite.com/bazel/bazelisk-plus-incompatible-flags/builds/110#72eb6717-c478-44de-833d-b7da832ee58e

From a quick test locally most of these incompatibilities are coming from upstream dependencies. I will submit a series of PRs to update these were applicable and link them to this issue.

cc @htuch @laurentlb

@keith
Copy link
Member Author

keith commented May 17, 2019

I've submitted a PR against protoc-gen-validate with some changes bufbuild/protoc-gen-validate#200

@keith
Copy link
Member Author

keith commented May 17, 2019

We're being hit by bazelbuild/bazel#7849 which I'm not sure what the migration plan is for, but it appears to be affecting protobuf directly as well.

@laurentlb
Copy link
Contributor

Two flags I'd like to flip soon are:

@htuch
Copy link
Member

htuch commented May 20, 2019

CC @lizan @moderation @fcfort. Do we have any Bazel ninjas who can give the fixes for this a shot? Also @rodaine for PGV aspects.

@keith
Copy link
Member Author

keith commented May 20, 2019 via email

@keith
Copy link
Member Author

keith commented May 20, 2019

Ok so when building on macOS, using this branch of protoc-gen-validate, master from rules_foreign_cc, and ignoring this flag bazelbuild/bazel#7260 (comment)

I'm at migration 0. I don't see the issue with --incompatible_disable_deprecated_attr_params, @laurentlb any idea why? If we did have to update grpc, we'd need to wait until their current pre-release was actually released.

@laurentlb
Copy link
Contributor

Repro:

$ bazel build --nobuild --incompatible_disable_deprecated_attr_params test/...
...
	File "/usr/local/google/home/laurentlb/.cache/bazel/_bazel_laurentlb/71d59151158aafb7db935cf8065f6d0c/external/com_lyft_protoc_gen_validate/bazel/protobuf.bzl", line 155, in rule
		attr.label(cfg = "host", default = Label("@co..."), <2 more arguments>)
'single_file' is no longer supported. use allow_single_file instead. You can use --incompatible_disable_deprecated_attr_params=false to temporarily disable this check.

-> Need to update https://github.com/envoyproxy/protoc-gen-validate/blob/master/bazel/protobuf.bzl (running buildifier --lint=fix might be enough)

Repro:

$ bazel build --nobuild --incompatible_depset_is_not_iterable test/...
...
	File "/usr/local/google/home/laurentlb/.cache/bazel/_bazel_laurentlb/71d59151158aafb7db935cf8065f6d0c/external/com_github_grpc_grpc/bazel/generate_cc.bzl", line 10, in generate_cc_impl
		[f for src in ctx.attr.srcs for f in src.proto.transitive_imports]
type 'depset' is not iterable. Use the `to_list()` method to get a list. Use --incompatible_depset_is_not_iterable=false to temporarily disable this check.

This comes from grpc (I haven't checked if/when it was fixed in grpc).

@fcfort
Copy link
Contributor

fcfort commented May 21, 2019

Looks like @keith has fixes for both issues in bufbuild/protoc-gen-validate#198, which are blocked on bufbuild/protoc-gen-validate#200 going in as well.

@keith
Copy link
Member Author

keith commented May 21, 2019

I've submitted the grpc change upstream grpc/grpc#19097 I didn't see that because I was testing against //source/... not //test/...

@hlopko
Copy link
Contributor

hlopko commented May 28, 2019

Hi all, I'm updating all Bazel incompatible flags related issues - the Bazel team is in increased pressure because 0.27 will start a 3 month window of no incompatible changes). We will have to potentially temporarily disable envoy on our downstream pipeline if we cannot get it fixed this week.

@keith
Copy link
Member Author

keith commented May 29, 2019

@hlopko let me know if I can help with any of these!

@hlopko
Copy link
Contributor

hlopko commented May 29, 2019

Both #6968 and #6866 could use somebody with Envoy domain knowledge to push them forward :)

#7058 seems unblocked and will be submitted hopefully soon.

htuch pushed a commit that referenced this issue May 31, 2019
They include fixes for future Bazel changes. In particular, the
repository can now build with --incompatible_depset_is_not_iterable,
which will be included in Bazel 0.27.

Description:
Risk Level: low
Testing: bazel build --nobuild ... --incompatible_depset_is_not_iterable

#6995

Signed-off-by: Laurent Le Brun <laurentlb@gmail.com>
@stale
Copy link

stale bot commented Jun 28, 2019

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Jun 28, 2019
@hlopko
Copy link
Contributor

hlopko commented Jul 1, 2019

Seems this issue could be closed?

@stale stale bot removed the stale stalebot believes this issue/PR has not been touched recently label Jul 1, 2019
@mattklein123
Copy link
Member

Closing, thank you @keith @hlopko for driving this forward!

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

No branches or pull requests

6 participants