Skip to content

Update gradle wrapper to 7.4#81963

Merged
breskeby merged 7 commits intoelastic:masterfrom
breskeby:update-gradle-74
Feb 14, 2022
Merged

Update gradle wrapper to 7.4#81963
breskeby merged 7 commits intoelastic:masterfrom
breskeby:update-gradle-74

Conversation

@breskeby
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

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

* constructor can write to it.
*/
@InputFiles
@IgnoreEmptyDirectories
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 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
Copy Markdown
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
@breskeby breskeby deleted the update-gradle-74 branch December 10, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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