-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
proto_lang_toolchain: Add original sources of ProtoInfo to blacklistedProtos #10493
Conversation
Thanks for opening this, @Yannic! I was able to confirm that cleaning/building Envoy Mobile with this patch applied to the bazel binary resolves the issue we're seeing in envoyproxy/envoy-mobile#617 🎉 |
Fixes #617, which resulted in duplicate symbols from protobuf being present in the final Envoy Mobile binary. The [root cause](bazelbuild/bazel#10484) is being [patched in Bazel](bazelbuild/bazel#10493). In the meantime, we can revert these two commits in protobuf ([first](protocolbuffers/protobuf@7b28278), [second](protocolbuffers/protobuf@a03d332)) and apply the diff as a patch until we're able to update Bazel with the fix. More context on the protobuf issue is available [here](protocolbuffers/protobuf#7046). Notes: - This should be reverted after updating Bazel with the fix - The version of protobuf specified in the `http_archive` should be in lockstep with upstream Envoy's version - Upstream Envoy's `@envoy//bazel:protobuf.patch` patch is also included here Signed-off-by: Michael Rebello <[email protected]>
@Yannic any change this could get merged soon so we can make the next cut? |
@Yannic Bump. Great change! This PR resolves an issue that's been blocking gRPC from upgrading its version of protobuf. |
@cushon landed a similar change (01df1e5), but the issue was the difference between direct sources and original direct sources, so I don‘t think the issue is resolved by that commit. This issue is blocking users from upgrading past Protobuf 3.9(?), so it would be great if we could get it merged soon. /cc @laurentlb |
I was about to lament that
Let me try to run this through our internal test battery. |
...aaand, failures :( |
I agree that this is a hack, but Let me know if there's anything I can do to fix the failing tests. |
blacklistedProtos.addTransitive(protoInfo.getTransitiveProtoSources()); | ||
// TODO(yannic): Switch to getTransitiveProtoSources() and remove references to | ||
// original proto sources when ProtoInfo is mandatory. | ||
blacklistedProtos.addAll(protoInfo.getOriginalDirectProtoSources()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using direct instead of transitive sources un-does a change made in 01df1e5 that I think is going to break some uses of proto_lang_toolchain.blacklisted_protos
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, this is exactly what I found out after debugging the aforementioned test failures. Adding both here isn't very nice so I'll try adding the set of transitive original sources (I'd totally ask Yannic to do so, but since the tests that break are internal, he'd be flying blind...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...and it blends! I'm sending this out (+my changes) for internal review.
This PR is causing some breakage in the downstream: Culprit finder result on Envoy: /cc @buchgr |
Suspecting that this shouldn't have been changed to transitive original sources: 4162cc5#diff-42ff97786b96eb7e34507430633100d5L279 This will fail for all |
@Yannic Can you send a fix for this? |
@Yannic Sorry, I'll rollback this change to get our CI green again. |
…dProtos Fixes bazelbuild#10484 Closes bazelbuild#10493. PiperOrigin-RevId: 289411825
Fixes envoyproxy/envoy-mobile#617, which resulted in duplicate symbols from protobuf being present in the final Envoy Mobile binary. The [root cause](bazelbuild/bazel#10484) is being [patched in Bazel](bazelbuild/bazel#10493). In the meantime, we can revert these two commits in protobuf ([first](protocolbuffers/protobuf@7b28278), [second](protocolbuffers/protobuf@a03d332)) and apply the diff as a patch until we're able to update Bazel with the fix. More context on the protobuf issue is available [here](protocolbuffers/protobuf#7046). Notes: - This should be reverted after updating Bazel with the fix - The version of protobuf specified in the `http_archive` should be in lockstep with upstream Envoy's version - Upstream Envoy's `@envoy//bazel:protobuf.patch` patch is also included here Signed-off-by: Michael Rebello <[email protected]> Signed-off-by: JP Simard <[email protected]>
Fixes envoyproxy/envoy-mobile#617, which resulted in duplicate symbols from protobuf being present in the final Envoy Mobile binary. The [root cause](bazelbuild/bazel#10484) is being [patched in Bazel](bazelbuild/bazel#10493). In the meantime, we can revert these two commits in protobuf ([first](protocolbuffers/protobuf@7b28278), [second](protocolbuffers/protobuf@a03d332)) and apply the diff as a patch until we're able to update Bazel with the fix. More context on the protobuf issue is available [here](protocolbuffers/protobuf#7046). Notes: - This should be reverted after updating Bazel with the fix - The version of protobuf specified in the `http_archive` should be in lockstep with upstream Envoy's version - Upstream Envoy's `@envoy//bazel:protobuf.patch` patch is also included here Signed-off-by: Michael Rebello <[email protected]> Signed-off-by: JP Simard <[email protected]>
Fixes #10484