-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Upgrade bazelbuild rules_go to latest release: 0.13.0 #3949
Conversation
@zanes2016 thank you. Please check CI and DCO. |
Thanks @mattklein123 , see the pending PR bufbuild/protoc-gen-validate#86 for the dependency fix. |
Once bufbuild/protoc-gen-validate#87 is merged, then the CI should pass |
IssueRepeated Failures: Any idea what needs to be done about this failure? Is it an issue with the Bazel OutputsBUILD
stderr
File
|
bufbuild/protoc-gen-validate#87 has merged and I thought I'd try this PR. With my local compilation I get the following errors:
These are different errors than those that @zanes2016 posted above I suspect as I'm compiling out a lot of the extensions including Mongo. |
@moderation It looks like you're seeing the same type of error: I suspect that the Bazel rule dependencies from It seems to complain by whatever source is in the
@mattklein123 Do you have any ideas? |
@zanes2016 I have no idea. @jmillikin-stripe @htuch might know. |
Where is that error "proto package names should not be mixed in the same directory" coming from? There is no such rule in protobuf, and it's very common for a single |
The "proto package names should not be mixed in the same directory" error is coming from protoc-gen-star, which PVG builds on: https://github.com/lyft/protoc-gen-star/blob/f3b83fca61817e55058744eb1a3c8e2e95a0dada/gatherer.go#L114 |
If I test this on ppc64le, I get I see that bufbuild/protoc-gen-validate#87 is merged. Does something need to be bumped here? |
@moderation -- Indeed! I thought I had all those commits, but that link got me to the same place you're at. Thanks! |
@jmillikin-stripe How do you recommend we proceed? Should a PR be created to add an optional flag/config to PGV that skips the above check? Do you know where PGV is actually imported/triggered? |
I don't think PGV should be doing that check at all. Why does the validation code need to care about file layout? Not very familiar with Envoy's custom protobuf setup, but as I understand it the validation stuff is plumbed into |
I don't know anything about this. I would open an issue in PGV and discuss. @rodaine can help you. |
So for context, protoc-gen-validate (PGV) is written on the protoc-gen-star (PG*) framework that currently leans heavily on protoc-gen-go (PGG). This check stems from existing logic in PGG that does not allow inconsistent package names between the files being run as PGG is much stricter about directory structure (as is Go, see this issue on the subject). All that said, there's work happening to remove the PGG dependency altogether from the PG* core, so this issue will be resolved at that time. You should expect PGV updated within the week. |
bufbuild/protoc-gen-validate#92 has merged. Updating the sha and using the changes to WORKSPACE outlined at https://github.com/envoyproxy/envoy/pull/3949/files generates a bunch of errors like:
I suspect further changes are required in WORKSPACE but I haven't worked that out yet. cc @rodaine |
@moderation The PGV proto generation rule signatures have changed, which is causing the duplicate 'srcs' keyword error. You'll need to update the rule here to point the envoy/api/bazel/api_build_system.bzl Line 125 in 0cf947f
Try changing |
@moderation the current version of PGV doesn't work with Envoy -- it will fail with:
After that is fixed (lyft/protoc-gen-star#28, I think), and after bufbuild/protoc-gen-validate#94 is merged, we plan to PR the bump to PGV into Envoy (we've already worked out most of the changes required) |
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
This pull request has been automatically closed because it has not had activity in the last 14 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
Can this be revisited? |
@clnperez now that my dependency PR is in I'd like to look at this this week. I believe the critical blocker in PGV has been resolved so this in theory this should be possible. |
@moderation Did you get a chance to take a look at this? |
@zanes2016 I have not had a chance to look at this. Traveling for work all this week so will be tough. May be possible to do some testing later today. |
I tried to update to the latest commit sha for PGV and tried my previously working diff at #3786 (comment) however there have been enough changes that these modifications now longer work. I'll ping @akonradi in Slack. #3786 is not merged either but not sure if this is required /cc @sesmith177 |
#3786 shouldn't be required. I suspect bufbuild/protoc-gen-validate#89 is likely to still be an issue since it doesn't look like PGV has been updated with the latest protoc-gen-star yet |
Chiming in here: the diff below fixes the invocation of
|
Working on this currently; I have it building with just the Go toolchain and trying to get the BUILD files appropriately updated. Right now, I'm blocked with gazelle generating erroneous targets, and I've been unsuccessful with a fix for them. Once I get a free second this week, I'll push the code up to hopefully get help triaging what I'm doing wrong. |
@rodaine Happy to help with BUILD files. I haven't used gazelle but it sounds like it was designed for code that follows the Go package directory layout, which PVG doesn't. |
Is there anyone else who could take a crack at this? It's currently the only thing left before we can have simple builds for envoy on other architectures. I hate to ask other people for things in an OSS community, but, this one's just out of my wheel house. :) |
@clnperez this is already complete. In master this commit is circa 0.15 - https://github.com/envoyproxy/envoy/blob/master/bazel/repository_locations.bzl#L169-L174. I'm actually running io_bazel_rules_go = dict(
- sha256 = "d1ad521fbd0997df53161e29df0964468157fc9c6ee16265db37cc6daaf334ef",
- strip_prefix = "rules_go-3d966375ff7971d43b863f785f495c7dcd6923da",
- # 2018-10-02
- urls = ["https://github.com/bazelbuild/rules_go/archive/3d966375ff7971d43b863f785f495c7dcd6923da.tar.gz"],
+ sha256 = "d0e51353639cd6ea43e614d80c29d3f7f318e88dbbc28c4d8c07b129b46e20c0",
+ strip_prefix = "rules_go-0.16.0",
+ urls = ["https://github.com/bazelbuild/rules_go/archive/0.16.0.tar.gz"],
), |
I've sent a PR to take the short hop from the current 0.15-ish version to 0.16: #4836 |
oh hey! i had no idea. i was watching this pr. thanks @moderation and @jmillikin-stripe |
There have been some new features and significant improvements since release 0.11.0 that should be picked up.