Skip to content
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

Update default Dataflow add-open opts for Java 17+ #5537

Merged
merged 3 commits into from
Dec 20, 2024
Merged

Conversation

clairemcginty
Copy link
Contributor

@clairemcginty clairemcginty commented Dec 19, 2024

Match all the add-opens required by Kryo

tested in Dataflow


sys.props("java.version") match {
case javaVersionRe(version)
if version.toInt >= 17 && dataflowPipelineOpts.getJdkAddOpenModules == null =>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this is also a bugfix PR for Java 21 users 😬

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 61.44%. Comparing base (532e915) to head (2b14afd).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...potify/scio/runners/dataflow/DataflowContext.scala 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5537      +/-   ##
==========================================
+ Coverage   61.43%   61.44%   +0.01%     
==========================================
  Files         312      312              
  Lines       11106    11105       -1     
  Branches      750      776      +26     
==========================================
+ Hits         6823     6824       +1     
+ Misses       4283     4281       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RustedBones
Copy link
Contributor

We should add it there too for the tests

dataflowPipelineOpts.setJdkAddOpenModules(
List("java.base/java.util=ALL-UNNAMED", "java.base/java.lang.invoke=ALL-UNNAMED").asJava
)
val javaVersionRe = "^(\\d+)\\..*".r
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This regex would give 1 for java 8 (version is set as 1.8....).
Let's use the same def as for the build

System.getProperty("java.version").stripPrefix("1.").takeWhile(_.isDigit).toInt

@clairemcginty clairemcginty merged commit d4b1ced into main Dec 20, 2024
12 checks passed
@clairemcginty clairemcginty deleted the 17-default-opts branch December 20, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants