-
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
[#25582] Use a Pathing Jar instead of long command line class paths in Java Boot loader. #26087
Conversation
Run Java PostCommit |
Run Java examples on Dataflow Java 11 |
Run Java Flink PortableValidatesRunner Streaming |
Run Dataflow ValidatesRunner |
Run Java Dataflow V2 ValidatesRunner |
Run Java 11 Examples on Dataflow Runner V2 |
Run Java Examples on Dataflow Runner V2 |
Run Java Spark PortableValidatesRunner Batch |
Assigning reviewers. If you would like to opt out of this review, comment R: @kennknowles for label java. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
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.
LGTM
@@ -48,7 +48,7 @@ jobs: | |||
- name: Delete old coverage | |||
run: "cd sdks/go/pkg && rm -rf .coverage || :" | |||
- name: Run coverage | |||
run: cd sdks/go/pkg && go test -coverprofile=coverage.txt -covermode=atomic ./... | |||
run: cd sdks && go test -coverprofile=coverage.txt -covermode=atomic ./go/pkg/... ./go/container/... ./java/container/... ./python/container/... ./typescript/container/... |
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.
Question: does codecov count uncovered non-go files (e.g. https://github.com/apache/beam/blob/master/sdks/java/container/license_scripts/pull_licenses_java.py)? I'm wondering if it makes sense to run container tests separately outside of the context of codecov (I'm leaning towards thinking that they should be included so this is probably a no-op).
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.
It will ignore those files, because it's unaware of files that don't receive any coverage numbers/changes.
I think we also don't have the covbot enabled for these directories either. But I'm less concerned about that than I am about the unit tests being run at all.
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.
Enabling covbot here would be out of scope for this change I think. The go tests is different because it's otherwise hard to ensure an action will run, without having a change that ensures the action runs and that was fixing a clear gap.
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.
SGTM - was meant to be nonblocking, but I realize now I didn't specify that
sdks/java/container/pathingjar.go
Outdated
zf.Write([]byte("Manifest-Version: 1.0\n")) | ||
zf.Write([]byte("Class-Path: " + strings.Join(classpaths, " "))) |
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.
nit: We could use Created-By: xyz
to be able to trace back from a JAR to this pathing code
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.
Run Java Dataflow V2 ValidatesRunner |
Run Java Spark PortableValidatesRunner Batch |
Run Java Examples on Dataflow Runner V2 |
Run Java Flink PortableValidatesRunner Streaming |
Run Java PostCommit |
Run Java Examples on Dataflow Runner V2 |
Run Java Flink PortableValidatesRunner Streaming |
Run Java Dataflow V2 ValidatesRunner |
Run Java Spark PortableValidatesRunner Batch |
I had misunderstood something in my earlier research: The classpath appends are URIs, not file paths. URIs are in a format like :. In this case since it should be all jar files, the class paths should be prefixed with |
Run Spotless PreCommit |
Apparently line lengths can't exceed 72 bytes. The more you know! Not hard to fix though (and validate in testing). And I was missing some line breaks. |
Run Java Examples on Dataflow Runner V2 |
Run Java Flink PortableValidatesRunner Streaming |
Run Java Spark PortableValidatesRunner Batch |
Run Java Dataflow V2 ValidatesRunner |
Run Java PostCommit |
Jars are recursive! If the manifest of one contains a manifest with a class path attribute, the JVM will load those jars. This gets around long jar sequences that can make an argument list too long.
This PR fixes an unchanged test in the Java boot_test.go, as well as adds a unit test for the pathing jar. Further, adds the container tests to the Go Tests github action, so this error doesn't recur.
Fixes #25582.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
addresses #123
), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>
instead.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.