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 gradle wrapper to 7.4 #81963

Merged
merged 7 commits into from
Feb 14, 2022
Merged

Conversation

breskeby
Copy link
Contributor

@breskeby breskeby commented Dec 20, 2021

Update local Gradle wrapper to 7.4. We fix some deprecations on the way for ignoring empty directories
as task inputs when using @SkipWhenEmpty

Required more work on tweaking third party plugin ForbiddenApisPrecommitPlugin

@breskeby breskeby added >enhancement :Delivery/Build Build or test infrastructure v8.0.0 Team:Delivery Meta label for Delivery team v8.1.0 build-benchmark Trigger build benchmark job v7.17.0 labels Dec 20, 2021
@breskeby breskeby self-assigned this Dec 20, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

@@ -68,6 +69,7 @@ public LicenseHeadersTask() {
* constructor can write to it.
*/
@InputFiles
@IgnoreEmptyDirectories
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the deprecation exactly? When is the annotation required?

Copy link
Contributor Author

@breskeby breskeby Feb 9, 2022

Choose a reason for hiding this comment

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

The exact deprecation is "Relying on FileTrees for ignoring empty directories when using @SkipWhenEmpty has been deprecated" and here you can see how it affected our build when I initially tested 7.4-rc-1

https://gradle-enterprise.elastic.co/s/johhiz7bfeq7c/deprecations#0

Copy link
Contributor

Choose a reason for hiding this comment

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

I read that documentation about 10 times and I'm still confused 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My understanding is, that this fileTree is considered empty when @SkipWhenEmpty is used:

dir
|__emptyDir1
|__emptyDir2

but for non empty fileTree inputs like

dir
|__emptyDir1
|__someFile.txt

and

dir
|__emptyDir1
|__emptyDir2
|__someFile.txt

those two would not considered equal as they have different empty dirs in it. This in combination with @SkipWhenEmpty is deprecated. Adding @IgnoreEmptyDirectories makes both fileTrees considered to be identical by gradle when calculating inputs / outputs

@breskeby breskeby added auto-backport-and-merge Automatically create backport pull requests and merge when ready v8.1.0 and removed v8.0.0 labels Feb 14, 2022
@breskeby breskeby merged commit ccc18d7 into elastic:master Feb 14, 2022
breskeby added a commit to breskeby/elasticsearch that referenced this pull request Feb 14, 2022
* Make ForbiddenApisPrecommitPlugin plugin Gradle 8.0 compatible
* Fix deprecations on ignoring empty folders for task inputs
* Update Gradle wrapper to 7.4 GA
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.1
7.17 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 81963

elasticsearchmachine pushed a commit that referenced this pull request Feb 14, 2022
* Make ForbiddenApisPrecommitPlugin plugin Gradle 8.0 compatible
* Fix deprecations on ignoring empty folders for task inputs
* Update Gradle wrapper to 7.4 GA
breskeby added a commit to breskeby/elasticsearch that referenced this pull request Feb 14, 2022
* Make ForbiddenApisPrecommitPlugin plugin Gradle 8.0 compatible
* Fix deprecations on ignoring empty folders for task inputs
* Update Gradle wrapper to 7.4 GA
# Conflicts:
#	build-tools-internal/performance/elasticsearch-build-tool-update.scenarios
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/precommit/ForbiddenApisPrecommitPlugin.java
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/rest/compat/RestCompatTestTransformTask.java
breskeby added a commit that referenced this pull request Feb 15, 2022
* Make ForbiddenApisPrecommitPlugin plugin Gradle 8.0 compatible
* Fix deprecations on ignoring empty folders for task inputs
* Update Gradle wrapper to 7.4 GA
breskeby added a commit to breskeby/elasticsearch that referenced this pull request Mar 2, 2022
* Make ForbiddenApisPrecommitPlugin plugin Gradle 8.0 compatible
* Fix deprecations on ignoring empty folders for task inputs
* Update Gradle wrapper to 7.4 GA
# Conflicts:
#	build-tools-internal/performance/elasticsearch-build-tool-update.scenarios
#	build-tools-internal/src/main/resources/minimumGradleVersion
breskeby added a commit that referenced this pull request Mar 3, 2022
* Make ForbiddenApisPrecommitPlugin plugin Gradle 8.0 compatible
* Fix deprecations on ignoring empty folders for task inputs
* Update Gradle wrapper to 7.4 GA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport-and-merge Automatically create backport pull requests and merge when ready build-benchmark Trigger build benchmark job :Delivery/Build Build or test infrastructure >enhancement >non-issue Team:Delivery Meta label for Delivery team v7.17.1 v8.1.0 v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants