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

Remove deprecated org.gradle.util.DistributionLocator usage #6212

Merged
merged 9 commits into from
Feb 17, 2023

Conversation

dbwiddis
Copy link
Member

@dbwiddis dbwiddis commented Feb 7, 2023

Description

The org.gradle.util.DistributionLocator class is deprecated and will be removed in Gradle 9.0.

This PR replaces that usage in build.gradle with wrapper.getDistributionUrl() which implements the identical logic internally (and is not deprecated).

Also added a new line to the min version generation so linelint doesn't complain. :-)

Initial commit only changed build.gradle. Testing the repro case in the linked issue below also upgraded the minimum gradle version to 7.6, which is a good thing as it is required for JDK19+ compatibility.

Issues Resolved

Fixes #5494

Check List

  • All tests pass
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.geo.search.aggregations.bucket.GeoTileGridIT.testGeoShapes

@codecov-commenter
Copy link

codecov-commenter commented Feb 7, 2023

Codecov Report

Merging #6212 (91700c7) into main (7914c04) will decrease coverage by 0.04%.
The diff coverage is 50.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##               main    #6212      +/-   ##
============================================
- Coverage     70.73%   70.70%   -0.04%     
+ Complexity    59024    58968      -56     
============================================
  Files          4800     4799       -1     
  Lines        282453   282421      -32     
  Branches      40718    40717       -1     
============================================
- Hits         199799   199691     -108     
- Misses        66259    66330      +71     
- Partials      16395    16400       +5     
Impacted Files Coverage Δ
...tore/remote/directory/RemoteSnapshotDirectory.java 3.12% <0.00%> (ø)
...arch/index/store/remote/utils/TransferManager.java 3.03% <ø> (ø)
...dex/store/remote/file/OnDemandBlockIndexInput.java 73.01% <100.00%> (ø)
...adonly/AddIndexBlockClusterStateUpdateRequest.java 0.00% <0.00%> (-75.00%) ⬇️
...readonly/TransportVerifyShardIndexBlockAction.java 9.75% <0.00%> (-58.54%) ⬇️
.../java/org/opensearch/node/NodeClosedException.java 50.00% <0.00%> (-50.00%) ⬇️
...ch/transport/ReceiveTimeoutTransportException.java 50.00% <0.00%> (-50.00%) ⬇️
.../action/admin/indices/flush/ShardFlushRequest.java 50.00% <0.00%> (-50.00%) ⬇️
.../java/org/opensearch/search/dfs/AggregatedDfs.java 51.61% <0.00%> (-41.94%) ⬇️
...ava/org/opensearch/search/dfs/DfsSearchResult.java 47.87% <0.00%> (-39.37%) ⬇️
... and 475 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.geo.search.aggregations.bucket.GeoTileGridIT.testGeoShapes

@dbwiddis
Copy link
Member Author

dbwiddis commented Feb 7, 2023

  • TEST FAILURES:
      1 org.opensearch.geo.search.aggregations.bucket.GeoTileGridIT.testGeoShapes

#6187

build.gradle Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@reta
Copy link
Collaborator

reta commented Feb 16, 2023

@dbwiddis could you rebase please? the Gradle's wrapper bits are not needed anymore (we are on 8.0 now), but the dropping DistributionLocator is still valid, thank you.

Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Daniel Widdis <widdis@gmail.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Daniel Widdis <widdis@gmail.com>
@dbwiddis
Copy link
Member Author

@dbwiddis could you rebase please? the Gradle's wrapper bits are not needed anymore (we are on 8.0 now), but the dropping DistributionLocator is still valid, thank you.

Done!

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Daniel Widdis <widdis@gmail.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.indices.replication.SegmentReplicationStatsIT.testSegmentReplicationStatsResponse

@reta reta merged commit 36f5cfe into opensearch-project:main Feb 17, 2023
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-6212-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 36f5cfe807584177dd4842810734e04a5f7bd4ae
# Push it to GitHub
git push --set-upstream origin backport/backport-6212-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-6212-to-2.x.

@reta
Copy link
Collaborator

reta commented Feb 17, 2023

@dbwiddis backport to 2.x failed :( could you please do it manually? thank you!

@dbwiddis dbwiddis deleted the distribution-locator branch February 20, 2023 09:06
dbwiddis added a commit to dbwiddis/OpenSearch that referenced this pull request Feb 20, 2023
…ch-project#6212)

* Remove deprecated org.gradle.util.DistributionLocator usage

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Update gradle wrapper version to test no deprecation warning

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Change log

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add newline so linelint doesn't complain.

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Remove remove typo typo

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Use wrapper getDistributionUrl method

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Restore license header removed by autogeneration

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Gradle 8

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Revert minimumGradleVersion change

Signed-off-by: Daniel Widdis <widdis@gmail.com>

---------

Signed-off-by: Daniel Widdis <widdis@gmail.com>
(cherry picked from commit 36f5cfe)
reta pushed a commit that referenced this pull request Feb 20, 2023
…6377)

* Remove deprecated org.gradle.util.DistributionLocator usage

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Update gradle wrapper version to test no deprecation warning

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Change log

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Add newline so linelint doesn't complain.

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Remove remove typo typo

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Use wrapper getDistributionUrl method

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Restore license header removed by autogeneration

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Gradle 8

Signed-off-by: Daniel Widdis <widdis@gmail.com>

* Revert minimumGradleVersion change

Signed-off-by: Daniel Widdis <widdis@gmail.com>

---------

Signed-off-by: Daniel Widdis <widdis@gmail.com>
(cherry picked from commit 36f5cfe)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Gradle task :wrapper fails with org.gradle.util.DistributionLocator deprecated
5 participants