-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BEAM-14117] Unvendor bytebuddy dependency #17317
Conversation
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
Codecov Report
@@ Coverage Diff @@
## master #17317 +/- ##
=======================================
Coverage 74.23% 74.23%
=======================================
Files 703 703
Lines 93100 93100
=======================================
Hits 69113 69113
Misses 22720 22720
Partials 1267 1267
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
078f5de
to
d5f3e5c
Compare
run java postcommit |
run flink validatesrunner |
run spark validatesrunner |
run samza validatesrunner |
run dataflow validatesrunner |
R: @kennknowles |
Thread at https://lists.apache.org/thread/sdp7tpvy5n1jlk3g8wqqp40dlyzp5llv did not encounter any major objections. |
The tests are super flaky, but I think Jenkins runs against the HEAD commit of the PR so it will need a rebase to get any recent improvements in test flakiness. Let me investigate a little bit and I'll comment when I have news. |
sdks/java/core/build.gradle
Outdated
@@ -28,12 +28,17 @@ applyJavaNature( | |||
dependencies { | |||
include(dependency("org.apache.commons:.*")) | |||
include(dependency(library.java.antlr_runtime)) | |||
include(dependency(library.java.byte_buddy)) |
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.
I don't think we should bundle bytebuddy in here, right? It should be a residual dependency that is resolved according to everyone's poms?
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.
In other words, it should become "just like any other dependency"
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.
Done, thanks
e2c007f
to
35af3a4
Compare
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.
Perfect!
Now I just want to poke the tests until they are green, rather than ignoring red signals, even if they seem irrelevant. |
Thanks, any suggestions about what the right way to go would be? |
sdks/java/harness/jmh/build.gradle
Outdated
@@ -34,6 +34,7 @@ dependencies { | |||
implementation project(path: ":sdks:java:harness", configuration: "shadow") | |||
implementation project(":runners:java-fn-execution") | |||
runtimeOnly library.java.slf4j_jdk14 | |||
runtimeOnly library.java.byte_buddy |
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.
I'm not sure how the failure occurred, but based on grep and IWYU this should just not be here. I understand you added it in response to an issue. It sounds like there must be an error in some other module's IWYU compliance, and presumably is suppressed? (just a guess; I don't know)
I did some more debugging, and my understanding is that this configuration is effectively removing the beam/sdks/java/core/build.gradle Lines 27 to 35 in f2e41be
because when beam/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy Lines 808 to 810 in f2e41be
Hacking up diff --git a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
index 791277a7e1..30b94333e0 100644
--- a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
@@ -496,6 +496,7 @@ class BeamModulePlugin implements Plugin<Project> {
def testcontainers_version = "1.16.3"
def arrow_version = "5.0.0"
def jmh_version = "1.34"
+ def byte_buddy_version = "1.12.9"
// A map of maps containing common libraries used per language. To use:
// dependencies {
@@ -541,7 +542,7 @@ class BeamModulePlugin implements Plugin<Project> {
aws_java_sdk2_utils : "software.amazon.awssdk:utils:$aws_java_sdk2_version",
bigdataoss_gcsio : "com.google.cloud.bigdataoss:gcsio:$google_cloud_bigdataoss_version",
bigdataoss_util : "com.google.cloud.bigdataoss:util:$google_cloud_bigdataoss_version",
- byte_buddy : "net.bytebuddy:byte-buddy:1.12.9",
+ byte_buddy : "net.bytebuddy:byte-buddy:$byte_buddy_version",
cassandra_driver_core : "com.datastax.cassandra:cassandra-driver-core:$cassandra_driver_version",
cassandra_driver_mapping : "com.datastax.cassandra:cassandra-driver-mapping:$cassandra_driver_version",
cdap_api : "io.cdap.cdap:cdap-api:$cdap_version",
@@ -1063,7 +1064,15 @@ class BeamModulePlugin implements Plugin<Project> {
// This contains many improved annotations beyond javax.annotations for enhanced static checking
// of the codebase. It is runtime so users can also take advantage of them. The annotations themselves
// are MIT licensed (checkerframework is GPL and cannot be distributed)
- implementation "org.checkerframework:checker-qual:$checkerframework_version"
+
+ def implementationDeps = [
+ "org.checkerframework:checker-qual:$checkerframework_version",
+ "net.bytebuddy:byte-buddy:$byte_buddy_version",
+ ]
+
+ implementationDeps.each { dep ->
+ implementation dep
+ }
}
// Defines Targets for sonarqube analysis reporting. What do you recommend? It seems like there are no existing examples of implementation deps that aren't included in the shadow closure. Does it make sense to include it in the shadow closure after all? Is there a more principled change to |
You should declare byte_buddy within the shadow configuration as per
This will make it a compile time dependency for the source set and it will be exposed in the pom.xml file and should become a transitive dependency. |
Thanks so much! Done. |
8ae8744
to
ee7bf73
Compare
This is only for testing.
I think all of the open issues have been resolved:
Let me know if there's any additional feedback! |
Fixes #21519 |
This reverts commit 4b5efc3.
This reverts commit 4b5efc3.
This reverts commit 4b5efc3.
This reverts commit 4b5efc3.
[release-2.41.0] Revert "[BEAM-14117] Unvendor bytebuddy dependency (#17317)"
This change unvendors bytebuddy, as discussed in BEAM-14117
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.