-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[Bug]: hamcrest required in class path in 2.55.0 #30617
Comments
Found that beam-sdks-java-harness jar contained However, beam artifact should not leak third party classes that were not renamed, so previously it should be considered a bug. Fix should be done on Template side |
This is also related to #25806. Some test fixtures depending on hamcrest / junit currently lives in main scope |
also related to #18336 |
There is a miminum example public static void main(String[] argv) {
PipelineOptionsFactory.fromArgs(argv);
} dependencies {
implementation(group: 'org.apache.beam', name: 'beam-sdks-java-io-google-cloud-platform', version: "$beam_version")
} which passes in 2.54.0 but failing in 2.55.0 RC1 |
(commented to wrong Issue) |
The file being in the jar is wrong but dependency not necessarily. I think |
See #18593 |
reopen for cherry pick |
note: even this fixes the minimum work example #30617 (comment) template still need to remove the test scope declaration for org.hamcrest dependency (or remove the explicit declaration altogether), this is due to https://stackoverflow.com/questions/75333105/maven-test-dependency-removes-transitive-compile-dependency-from-uberjar therefore good to add an item to CHANGE.md to remind this |
What happened?
Found during 2.55.0RC1 release validation against Dataflow template
This used to work in Beam 2.54.0
However, in Beam 2.55.0RC1, there is exception thrown (see https://github.com/GoogleCloudPlatform/DataflowTemplates/actions/runs/8251849699?pr=1361):
The interface failed to create is TestBigQueryOptions which extends TestPipelineOptions. In TestPipelineOptions, some methods return org.hamcrest.Matcher:
beam/sdks/java/core/src/main/java/org/apache/beam/sdk/testing/TestPipelineOptions.java
Line 45 in 986f67f
It seems beam actually always requires org.hamcrest present in runtime class path. Indeed, another minimum test fails on both 2.54.0 and 2.55.0:
Issue Priority
Priority: 2 (default / most bugs should be filed as P2)
Issue Components
The text was updated successfully, but these errors were encountered: