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

Run Flink tests on Java 17 too #10477

Conversation

findepi
Copy link
Member

@findepi findepi commented Jun 10, 2024

Project supports building with 8, 11 and 17. In most CI scripts we run the jobs on all supported Java versions, let's do same here to ensure the build would work locally too.

@github-actions github-actions bot added the INFRA label Jun 10, 2024
@findepi findepi marked this pull request as draft June 10, 2024 16:00
@findepi findepi force-pushed the findepi/main/run-flink-and-spark3-tests-on-java-17-too-e8f179 branch from 3a37073 to 3af7ab1 Compare June 10, 2024 20:39
@findepi findepi force-pushed the findepi/main/run-flink-and-spark3-tests-on-java-17-too-e8f179 branch from 3af7ab1 to 77fa04a Compare June 11, 2024 08:21
@findepi findepi marked this pull request as ready for review June 11, 2024 08:22
@findepi findepi changed the title Run Flink and Spark3 tests on Java 17 too Run Flink, Spark3 and Hive3 tests on Java 17 too Jun 11, 2024
@findepi findepi force-pushed the findepi/main/run-flink-and-spark3-tests-on-java-17-too-e8f179 branch from 209c5d6 to 77fa04a Compare June 11, 2024 08:59
@findepi findepi changed the title Run Flink, Spark3 and Hive3 tests on Java 17 too Run Flink, Spark3 tests on Java 17 too Jun 11, 2024
@Fokko
Copy link
Contributor

Fokko commented Jun 11, 2024

Thanks for raising this PR @findepi.

Looks like the exclusion isn't working:

image

I'm open to running against Java 17. My only concern is that the Spark/Flink tests take a very long time to run, and adding another item to the test-matrix will consume a lot of CI capacity. For Iceberg 2.0 there seems to be some (I would love to see some more folks jumping in there) consensus to bump Java 11+, maybe that would be the right time to drop Java 8 and add Java 17? Out of curiosity, did you find any issues with JDK17?

@findepi
Copy link
Member Author

findepi commented Jun 11, 2024

I'm open to running against Java 17. My only concern is that the Spark/Flink tests take a very long time to run, and adding another item to the test-matrix will consume a lot of CI capacity.

That's a valid concern.

OTOH, if we don't run the tests, how do we know that the code works under newer Java version?
Of course, who knows, maybe the users never use the Iceberg Spark or Iceberg Flink code with e.g. Java 17 and therefore we don't need to support that -- is this the case?

For Iceberg 2.0 there seems to be some (I would love to see some more folks jumping in there) consensus to bump Java 11+, maybe that would be the right time to drop Java 8 and add Java 17? Out of curiosity, did you find any issues with JDK17?

I thought that Java 17 is already well supported -- the build requires you to use 8, 11 or 17.
I am making this changes, as I am looking what it would take to support 21 for building too (#10474).

@findepi findepi force-pushed the findepi/main/run-flink-and-spark3-tests-on-java-17-too-e8f179 branch from 77fa04a to 78ae15b Compare June 11, 2024 11:37
@findepi
Copy link
Member Author

findepi commented Jun 11, 2024

flink-scala-2-12-tests (8, 1.17) failed, not sure why.

@findepi findepi closed this Jun 11, 2024
@findepi findepi reopened this Jun 11, 2024
@findepi
Copy link
Member Author

findepi commented Jun 11, 2024

This time the build was green, including flink-scala-2-12-tests (8, 1.17)

@findepi findepi requested review from singhpk234, stevenzwu and Fokko and removed request for singhpk234 June 11, 2024 19:59
@stevenzwu
Copy link
Contributor

flink-scala-2-12-tests (8, 1.17) failed, not sure why.

@pvary is your fix applicable to this flakiness?

@pvary
Copy link
Contributor

pvary commented Jun 12, 2024

flink-scala-2-12-tests (8, 1.17) failed, not sure why.

@pvary is your fix applicable to this flakiness?

The fix should be there. So probably not 😢

@@ -69,7 +69,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
jvm: [8, 11]
jvm: [8, 11, 17]
Copy link
Contributor

Choose a reason for hiding this comment

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

17 exercised by spark-3x-java-17-tests

it works for both 2.12 and 2.13, if you want we can merge the last one into this single runs

Copy link
Member Author

Choose a reason for hiding this comment

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

i think the person writing those jobs didn't know about matrix excludes/includes (or didn't want to use them).
we should be able to merge the jobs and remove duplication.
would prefer for such changes to be considered as a follow-up though

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 on removing spark-3x-java-17-tests and including 17 into the matrix for testing Spark

Copy link
Member Author

Choose a reason for hiding this comment

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

done in #10513.
changes in this file backed out for this PR

thank you @singhpk234 @nastra !

Copy link
Contributor

Choose a reason for hiding this comment

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

looks like the changes in this file disappeared. It would actually be good to clean this up in the scope of this PR

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, it disappeared because it was a result of my misunderstanding.
it is being cleaned up in #10513

@stevenzwu
Copy link
Contributor

stevenzwu commented Jun 13, 2024

Of course, who knows, maybe the users never use the Iceberg Spark or Iceberg Flink code with e.g. Java 17 and therefore we don't need to support that -- is this the case?

I know a lot of Spark and Flink users run on Java 17. this was not an issue, probably because code compiled with old Java typically runs fine on newer version JVMs. Hence we choose the older Java version for released binary. Here is a related discussion from a year ago: https://lists.apache.org/thread/obpdrfgg3spzqrnd0rnghpygdhc8vb9q

I would also echo @Fokko 's concern on CI resources. it will be great if we can drop Java 8 from CI matrix.

@findepi
Copy link
Member Author

findepi commented Jun 14, 2024

I know a lot of Spark and Flink users run on Java 17.

this is valuable feedback!

this was not an issue, probably because code compiled with old Java typically runs fine on newer version JVMs.

of course! but apparently there often are issues as was pointed out in #10477 (comment)

Hence we choose the older Java version for released binary.

We can use newer JDK and utilize --target to create release binary compatible with older Java version, or continue to use older Java version for producing the release. Both approaches have pros and cons and here I don't want to change how we do releases.

I would also echo @Fokko 's concern on CI resources. it will be great if we can drop Java 8 from CI matrix.

Re dropping 8 -- i am fully supportive, but not my call.
Re resources -- yes, obviously, and I agree. Is this a "blocker concern" or "i wish there were no downsides" type of concern?

Project supports building with 8, 11 and 17. In most CI scripts we run
the jobs on all supported Java versions, let's do same here to ensure
the build would work locally too.
@findepi findepi force-pushed the findepi/main/run-flink-and-spark3-tests-on-java-17-too-e8f179 branch from 78ae15b to 68bb762 Compare June 17, 2024 10:19
@findepi findepi changed the title Run Flink, Spark3 tests on Java 17 too Run Flink tests on Java 17 too Jun 17, 2024
Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

Re dropping 8 -- i am fully supportive, but not my call.
Re resources -- yes, obviously, and I agree. Is this a "blocker concern" or "i wish there were no downsides" type of concern?

I sent out a mail earlier this year on the devlist. There wasn't as much as response as I hoped. Probably there are still a lot of folks on Hadoop, which is not easy to update, but I'm happy to start this discussion again for Iceberg 2.0.0.

LGTM, thanks for working on this @findepi

@findepi
Copy link
Member Author

findepi commented Jun 17, 2024

re: dropping 8 -- i started some work on a side for this: #10518
Let me know when time comes to ship the changes.

@findepi
Copy link
Member Author

findepi commented Jun 18, 2024

Thanks @singhpk234 @stevenzwu @pvary @nastra @Fokko for your reviews and thank you @nastra @Fokko for approvals.
Is there anything I need to change here?

@BsoBird
Copy link

BsoBird commented Jun 19, 2024

I sent out a mail earlier this year on the devlist. There wasn't as much as response as I hoped. Probably there are still a lot of folks on Hadoop, which is not easy to update, but I'm happy to start this discussion again for Iceberg 2.0.0.

@Fokko Sir.Since hadoop 3.4.1, the hadoop community will also drop support for java8. (I think support for java8 will be removed in 3.5.X at the latest.) . So it's only a matter of time before java8 is abandoned.
see https://hadoop.apache.org/docs/r3.4.0/index.html "Protobuf Compatibility"

@Fokko Fokko merged commit cbd11d7 into apache:main Jun 19, 2024
10 checks passed
@Fokko
Copy link
Contributor

Fokko commented Jun 19, 2024

Thanks for the context there @BsoBird, good to see that also Hadoop is moving on 👍

@findepi findepi deleted the findepi/main/run-flink-and-spark3-tests-on-java-17-too-e8f179 branch June 19, 2024 09:35
jasonf20 pushed a commit to jasonf20/iceberg that referenced this pull request Aug 4, 2024
Project supports building with 8, 11 and 17. In most CI scripts we run
the jobs on all supported Java versions, let's do same here to ensure
the build would work locally too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants