-
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
Gradle 8 support #28756
Gradle 8 support #28756
Conversation
* Make gradle help --scan green * Replicate defunct com.palantir.docker and docker-run plugins
Codecov Report
@@ Coverage Diff @@
## master #28756 +/- ##
==========================================
- Coverage 72.21% 72.21% -0.01%
==========================================
Files 684 684
Lines 101226 101230 +4
==========================================
+ Hits 73103 73104 +1
Misses 26547 26547
- Partials 1576 1579 +3
Flags with carried forward coverage won't be shown. Click here to find out more. see 13 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Now that 2.51.0 release branch is cut, this should be OK to merge. |
import org.gradle.api.tasks.Exec | ||
|
||
/** | ||
* A gradle plug-in interacting with docker. Originally replicated from |
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.
We have to vendor the following gradle plugins
- com.palantir.docker -> BeamDockerPlugin
- com.palantir.docker-run -> BeamDockerRunPlugin
Due to
- v0.34.0 used gradle internal API that incompatible with gradle 8
- v0.35.0 requries Java11; recompile from src does not work either because the plugin depends on other palantir dependencies which also requires Java11
- palantir/gradle-docker is now marked as
Disclaimer: This Repo is now Defunct
, "although we will keep it working, no new features are accepted"
We can choose another plugin, but it would require substantial change to the code base, and the risk of support stopped on any third party plugin remains
If palantir/gradle-docker still get maintained and beam eventually drops Java 8 support, we can still come back to this plugin.
Fortunately beam only uses moderate functionality in palantir/gradle-docker so vendor is straightforward. The artifact provides 3 plugins
- com.palantir.docker
- com.palantir.docker-run
- com.palantir.docker-compose
beam only uses the first two. The third is the most complicated one and depends on gradle internal APIs; in docker plugin, there is a dockerfileZip
task also involves gradle internal API. Beam uses neither - and they are not included in this PR
The two vendored plugins here then get rid of gradle internal APIs and work with Gradle 8 while keep build with Java 8.
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.
Thank you for the explanation. These plugins seem fairly trivial and it might even be useful to just have our own. Otherwise we could file bugs to migrate to some well-supported plugin later.
the latest commit just fixes comments and causing hadoop io precommit failing. The reason is gradle cache corrupted: https://stackoverflow.com/questions/65645510/cannot-access-script-base-class-org-gradle-kotlin-dsl-kotlinbuildscript |
Thanks, marked this as ready for review |
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control |
import org.gradle.api.tasks.Exec | ||
|
||
/** | ||
* A gradle plug-in interacting with docker. Originally replicated from |
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.
Thank you for the explanation. These plugins seem fairly trivial and it might even be useful to just have our own. Otherwise we could file bugs to migrate to some well-supported plugin later.
Let me run some java11/17 postcommits before merge |
Run Jpms Direct Java 11 PostCommit |
Run Jpms Flink Java 11 PostCommit |
Run Jpms Flink Java 17 PostCommit |
Run Jpms Direct Java 17 PostCommit |
Run Java 17 Examples on Dataflow Runner V2 |
Run Java 11 Examples on Dataflow Runner V2 |
Run Java examples on Dataflow Java 17 |
Run Java examples on Dataflow Java 11 |
The whitespace precommit appears to be failing: https://github.com/apache/beam/actions/runs/6415209350 Because it does things that will be forbidden in Gradle 9. |
Fixes #28127
Make gradle help --scan green
Replicate defunct com.palantir.docker and docker-run plugins
Please add a meaningful description for your change here
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 or the workflows README to see a list of phrases to trigger workflows.