[BEAM-4584] Migrate build_rules.gradle to buildSrc plugin#5683
[BEAM-4584] Migrate build_rules.gradle to buildSrc plugin#5683kennknowles merged 1 commit intoapache:masterfrom
Conversation
|
Yea, I'm pretty certain I've introduced an infinite loop w/ allocation here. |
|
Hmm, well Jenkins passed without any odd behavior though I had some unhappiness locally with heap space. It could be that I have simply never run a full Java - 34 minutes |
|
OK I did some more fixups until |
|
The The gpg errors could because you have not setup a gpg agent correctly. Likely that your signing key requires a password and you haven't setup something to intercept the password request and prompt you for it or don't have a signing key. |
|
Can the task exist but not be part of |
|
(anyhow yea I probably don't have |
|
To my knowledge, it did still break it for some reason. Not enough investigation was done though and disabling parallel was the easiest. With |
|
run java postcommit |
|
run dataflow postrelease |
|
So, we have a job we can trigger "Run Gradle Publish" but that seems like something that should not exist. I guess if it is just a snapshot that will be wiped out it could be useful for PRs just like this one. But anyhow PTAL as I think this is pretty much alright and it is better to get it moving along as soon as possible after 2.5.0 |
lukecwik
left a comment
There was a problem hiding this comment.
The tabs are really annoying
buildSrc/build.gradle
Outdated
|
|
||
| // Plugins for configuring _this build_ of the module | ||
| plugins { | ||
| id 'groovy' |
There was a problem hiding this comment.
nit: please use spaces instead of tabs
There was a problem hiding this comment.
Agreed. Gross. Done. Noting that this is all autoformat.
|
|
||
| /** This plugin adds methods to configure a module with Beam's defaults, called "natures". | ||
| * | ||
| * The natures available: |
| // A class defining the set of configurable properties accepted by applyJavaNature | ||
| class JavaNatureConfiguration { | ||
| double javaVersion = 1.8 | ||
| // Controls the JDK source language and target compatibility |
There was a problem hiding this comment.
move comments to the line before instead of after
|
|
||
| // A class defining the set of configurable properties accepted by containerImageName. | ||
| class ContainerImageNameConfiguration { | ||
| String root = null // Sets the docker repository root (optional). |
There was a problem hiding this comment.
nit: null is the default already so we don't need to explicitly set it
There was a problem hiding this comment.
I like it explicit, but also this is a non-diff from build_rules.gradle.
There was a problem hiding this comment.
Its just noise since groovy/java developers know what the default values for unassigned variables are.
| /** ***********************************************************************************************/ | ||
| // Apply common properties/repositories and tasks to all projects. | ||
|
|
||
| project.group = 'org.apache.beam' |
There was a problem hiding this comment.
In a follow-up PR consider using
project.with {
group = 'org.apache.beam'
...
}
|
Only thing that is worth investigating is the in the |
|
It looks like |
|
Good catch. The issue was that I had changed into The whole first arg was a map that was being toStringed (or in some cases a map having a closure wrapping it being toStringed). The correct syntax is: And that is why we like types. I wonder if we can make this Kotlin without too much pain. |
bef6791 to
59ef085
Compare
|
Checkstyle failure in Flink runner. I'll update and merge the new build_rules changes in. |
|
Precommit failure due to Dataflow quota. I have tested |
|
run java precommit |
|
We've established that Dataflow is having an outage for the |
|
I now see errors like:
A problem occurred evaluating project ':beam-sdks-python-container'.
This is causing failures in https://builds.apache.org/job/beam_PostCommit_Go_GradleBuild and https://builds.apache.org/job/beam_PostCommit_Py_ValCont @kennknowles Can you take a look? |
|
This broke the |
…e to buildSrc plugin
This is a direct move of the code from
build_rules.gradleto a binary plugin in thebuildSrcdirectory. A proxybuild_rules.gradleis left in place, but should be migrated away from on a module-by-module basis.I deliberately did not do anything to refactor the logic. Making this a plugin might make it more natural to do refactors later. Personally, I think each "nature" is probably a natural choice for a separate plugin, and it should be very straightforward to do that.
NOTE: All I did was ensure that
./gradlew buildran. There are some failures (prior description underestimated them due to masking). I didn't yet run the publishing bits that are hidden behind conditionals. Those likely still need someproject.added, etc. Just putting this up for early review.Follow this checklist to help us incorporate your contribution quickly and easily:
[BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replaceBEAM-XXXwith the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.R: @lukecwik
CC: @yifanzou @alanmyrvold @pabloem