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 to Gradle 8.0.2 #348

Merged
merged 3 commits into from
Apr 3, 2023
Merged

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Mar 23, 2023

Description

Starting a draft pull request to understand required efforts for migration to gradle 8. Reference PR from core: opensearch-project/OpenSearch#5666

Issues Resolved

N/A

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

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.

cwperks added 3 commits March 23, 2023 09:41
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
@codecov-commenter
Copy link

codecov-commenter commented Mar 23, 2023

Codecov Report

Merging #348 (6985d61) into main (4649c3d) will decrease coverage by 0.18%.
The diff coverage is 16.66%.

📣 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     #348      +/-   ##
============================================
- Coverage     29.12%   28.94%   -0.18%     
  Complexity       97       97              
============================================
  Files            23       23              
  Lines          1171     1171              
  Branches        109      109              
============================================
- Hits            341      339       -2     
- Misses          809      811       +2     
  Partials         21       21              
Impacted Files Coverage Δ
...ch/jobscheduler/rest/action/RestGetLockAction.java 34.69% <16.66%> (-4.09%) ⬇️

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

@cwperks cwperks marked this pull request as ready for review March 23, 2023 14:25
@cwperks cwperks requested a review from a team March 23, 2023 14:25
Copy link
Member

@dbwiddis dbwiddis left a comment

Choose a reason for hiding this comment

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

Can we set this repo up to do version bumps with Mend Renovate?

@dbwiddis
Copy link
Member

Any reason we're holding off on this merge?

@cwperks
Copy link
Member Author

cwperks commented Mar 28, 2023

I don't have the ability to merge PRs in this repo

@joshpalis
Copy link
Member

@dbwiddis lets hold off on merging until #350 is resolved. Currently 2.x is broken, which is used for 3.0.0 BWC tests. Once the issue is resolved today, I'll merge in this PR to main

@joshpalis
Copy link
Member

Will re-run checks and merge this in once there is a successful 2.7.0 distribution opensearch build. Currently the tests are failing due to :

Could not determine the dependencies of task ':opensearch-job-scheduler-sample-extension:jobSchedulerBwcCluster#fullRestartClusterTask'.
> Server returned HTTP response code: 403 for URL: https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.7.0/7336/linux/x64/tar/builds/opensearch/plugins/opensearch-job-scheduler-2.7.0.0.zip

@dbwiddis
Copy link
Member

dbwiddis commented Apr 2, 2023

If it's going to be a long time until the upgrade, can we at least bump to 7.6+? The current config is 7.5 which is not compatible with JDK 19+.

@joshpalis
Copy link
Member

@dbwiddis Shouldn't take long. 2.7.0 distribution opensearch builds have been failing due to neural search but I see that this issue has been called out and will probably be resolved today. Either way, we won't be able to merge any change in until a successful build has been generated.

@joshpalis joshpalis merged commit 6892ef0 into opensearch-project:main Apr 3, 2023
@opensearch-trigger-bot
Copy link

The backport to 2.x failed:

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

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
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-348-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 6892ef0a27ad40788576404f13944c762dbf9a9d
# Push it to GitHub
git push --set-upstream origin backport/backport-348-to-2.x
# Go back to the original working tree
cd ../..
# 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-348-to-2.x.

@joshpalis
Copy link
Member

@cwperks should we backport this to 2.x?

@cwperks
Copy link
Member Author

cwperks commented Apr 3, 2023

@joshpalis Yes, this should be backported.

@cwperks
Copy link
Member Author

cwperks commented Apr 3, 2023

I can create a manual backport

cwperks added a commit to cwperks/job-scheduler that referenced this pull request Apr 3, 2023
* Update to Gradle 8.0.2

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Add validateNebulaPom.enabled = false back in

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Run spotlessApply

Signed-off-by: Craig Perkins <cwperx@amazon.com>

---------

Signed-off-by: Craig Perkins <cwperx@amazon.com>
(cherry picked from commit 6892ef0)
@cwperks
Copy link
Member Author

cwperks commented Apr 3, 2023

@joshpalis I created a backport PR to 2.x for this change: #357

joshpalis pushed a commit that referenced this pull request Apr 4, 2023
* Update to Gradle 8.0.2

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Add validateNebulaPom.enabled = false back in

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Run spotlessApply

Signed-off-by: Craig Perkins <cwperx@amazon.com>

---------

Signed-off-by: Craig Perkins <cwperx@amazon.com>
(cherry picked from commit 6892ef0)
@joshpalis
Copy link
Member

@cwperks seems that upgrading gradle to 8.0.2 has broken the maven publish snapshots workflow. Snapshots for 3.x and 2.x have not been updated since March 28th

see https://github.com/opensearch-project/job-scheduler/actions/runs/4600506610/jobs/8127183785

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':generatePomFileForPluginZipPublication' (type 'GenerateMavenPom').
  - Gradle detected a problem with the following location: '/home/runner/work/job-scheduler/job-scheduler/build/distributions/opensearch-job-scheduler-3.0.0.0-SNAPSHOT.pom'.
    
    Reason: Task ':publishNebulaPublicationToSnapshotsRepository' uses this output of task ':generatePomFileForPluginZipPublication' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':generatePomFileForPluginZipPublication' as an input of ':publishNebulaPublicationToSnapshotsRepository'.
      2. Declare an explicit dependency on ':generatePomFileForPluginZipPublication' from ':publishNebulaPublicationToSnapshotsRepository' using Task#dependsOn.
      3. Declare an explicit dependency on ':generatePomFileForPluginZipPublication' from ':publishNebulaPublicationToSnapshotsRepository' using Task#mustRunAfter.
    
    Please refer to https://docs.gradle.org/8.0.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.

@cwperks cwperks mentioned this pull request May 8, 2023
5 tasks
prudhvigodithi pushed a commit to prudhvigodithi/job-scheduler that referenced this pull request May 9, 2023
* Update to Gradle 8.0.2

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Add validateNebulaPom.enabled = false back in

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Run spotlessApply

Signed-off-by: Craig Perkins <cwperx@amazon.com>

---------

Signed-off-by: Craig Perkins <cwperx@amazon.com>
(cherry picked from commit 6892ef0)
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
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.

5 participants