-
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
Eliminate redundant/out-of-sync version from BeamModulePlugin.groovy #28750
Conversation
f38eff9
to
55bd323
Compare
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control |
Codecov Report
@@ Coverage Diff @@
## master #28750 +/- ##
=======================================
Coverage 72.22% 72.22%
=======================================
Files 684 684
Lines 101226 101230 +4
=======================================
+ Hits 73106 73110 +4
Misses 26545 26545
Partials 1575 1575
Flags with carried forward coverage won't be shown. Click here to find out more. see 4 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
run java precommit |
Confirmed that |
@@ -429,7 +429,7 @@ class BeamModulePlugin implements Plugin<Project> { | |||
} | |||
|
|||
def isRelease(Project project) { | |||
return parseBooleanProperty(project, 'isRelease'); | |||
return !project.version.endsWith('-SNAPSHOT') |
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.
Doesn't this remove our ability to run non-release jobs against the RC commit before we're ready to publish the release?
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.
I don't actually understand the question. Can you restate it somehow? I don't understand what these things are:
- "non-release jobs"
- "against the RC commit"
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.
"the RC commit" - the commit that we tag for a release candidate. E.g. https://github.com/apache/beam/tree/v2.51.0-RC1
"non-release jobs" - any job that was previously expecting the version to end in -SNAPSHOT
or has other expectations depending on the isRelease
variable. This expectation is baked in all over the place FWIW - https://github.com/search?q=repo%3Aapache%2Fbeam+isRelease+language%3AGradle&type=code&l=Gradle
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.
Oh yes, I'm aware of it being baked in all over the place, that's why I left it. Builds at the RC commit should always have -PisRelease
or they won't do what we need to do with the RC.
If we have a job that expects the version to end in -SNAPSHOT
that job is probably broken.
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.
I do need to fix the ones that are directly checking hasProperty
instead of calling the method though.
Eventually we should be eliminating this concept, which should probably not exist.
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.
Converted to assigning a boolean, deliberately causing any dependencies on the prior function to break so we can catch them in review.
Ah, I got confused by Reviewing the usage, it has these different purposes which are all included in a release but none require a special
To be clear I'm mostly intending to leave the functionality at status quo, except cleaning up an extraneous flag and an incorrect version manipulation that broke the build of 2.51.0 RC1. I see builds are breaking so I'll iterate on this when I can get back to it, but signing off today. |
62f581c
to
10782ff
Compare
@@ -107,7 +107,7 @@ task validateJavaHome { | |||
} | |||
|
|||
def useBuildx = project.containerPlatforms() != [project.nativeArchitecture()] | |||
def pushContainers = project.rootProject.hasProperty(["isRelease"]) || project.rootProject.hasProperty("push-containers") | |||
def pushContainers = project.rootProject.isRelease || project.rootProject.hasProperty("push-containers") |
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.
I am honestly baffled as to why this causes the error
sdks/java/container/common.gradle': 112: Unexpected input: '{' @ line 112, column 8.
docker {
^
1 error
Having slept on it, I realized a couple things:
I'll just make a new PR since that'll be nearly trivial. |
This addresses the initial complaint in #21302.
It does not fully "fix" it because Python and Go still track the version separately.
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.