-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Switch from buildSrc/version.properties
to Gradle version catalog (gradle/libs.versions.toml
) to enable dependabot to perform automated upgrades on common libs
#16284
Conversation
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
❌ Gradle check result for 724db17: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
I recommend switching from Dependabot to using Mend Renovate. I've outlined several reasons that it's a preferred choice in opensearch-project/.github#97 and added a section to the Maintainer Responsibilities guide here. One of the options of this configuration is to enable auto-merging for a subset of dependencies. I have done so on my own project here. |
@peternied Has created something similar for dependabot and opensearch-trigger-bot PRs on the security repo. See the automatic-merges workflow here |
… windows had gradle wrapper path Signed-off-by: Craig Perkins <cwperx@amazon.com>
Thanks @dbwiddis
If I am not mistaken, this is out of scope of version catalogs BUT is in scope of the individual modules: it all depends on how the module import the dependency (runtime, compile, ...)
I believe the
Yes! That's the end goal! |
🎉 |
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Sync'ed with main to resolve conflicts and ensured the latest versions on main for version.properties are copied to libs.versions.toml |
❌ Gradle check result for ef776e2: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
@reta Is this same error appearing on main?
|
Signed-off-by: Craig Perkins <cwperx@amazon.com>
My bad, I did not update the bytebuddy or mockito versions to the latest on main. Its fully reconciled now. |
Signed-off-by: Daniel (dB.) Doubrovkine <dblock@amazon.com>
❕ Gradle check result for 51e3d5b: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-16284-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 af7a067e04583d2870af684d70612015e883b63c
# Push it to GitHub
git push --set-upstream origin backport/backport-16284-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x Then, create a pull request where the |
@cwperks apologies, mind please taking |
Yes, I am looking into in now. 1 min |
…rsion catalog (`gradle/libs.versions.toml`) to enable dependabot to perform automated upgrades on common libs (#16284) (#16508) * Switch from `buildSrc/version.properties` to Gradle version catalog (`gradle/libs.versions.toml`) to enable dependabot to perform automated upgrades on common libs (#16284) * WIP on lib toml Signed-off-by: Craig Perkins <cwperx@amazon.com> * SpotlessApply Signed-off-by: Craig Perkins <cwperx@amazon.com> * Remove unnecessary lines Signed-off-by: Craig Perkins <cwperx@amazon.com> * Specify time when dependabot runs Signed-off-by: Craig Perkins <cwperx@amazon.com> * Refer to version from libs.versions.toml Signed-off-by: Craig Perkins <cwperx@amazon.com> * Use version Signed-off-by: Craig Perkins <cwperx@amazon.com> * Specify version catalog Signed-off-by: Craig Perkins <cwperx@amazon.com> * Call .get() Signed-off-by: Craig Perkins <cwperx@amazon.com> * Define version catalog Signed-off-by: Craig Perkins <cwperx@amazon.com> * Use libraries Signed-off-by: Craig Perkins <cwperx@amazon.com> * Downgrade purposefully Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add mavenCentral Signed-off-by: Craig Perkins <cwperx@amazon.com> * Try w/o libraries section Signed-off-by: Craig Perkins <cwperx@amazon.com> * reinstate Signed-off-by: Craig Perkins <cwperx@amazon.com> * Remove version.properties Signed-off-by: Craig Perkins <cwperx@amazon.com> * Update syntax Signed-off-by: Craig Perkins <cwperx@amazon.com> * Change back to weekly Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add grpc Signed-off-by: Craig Perkins <cwperx@amazon.com> * Get relative to project root. Relative path not working on windows bc windows had gradle wrapper path Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add minimal version.properties with only opensearch version to accommodate external references Signed-off-by: Craig Perkins <cwperx@amazon.com> * singularize version.properties Signed-off-by: Craig Perkins <cwperx@amazon.com> * Get rootDir Signed-off-by: Craig Perkins <craig5008@gmail.com> * Fix issue loading snapshot Signed-off-by: Craig Perkins <craig5008@gmail.com> * Limit logic to generating version.properties file within buildSrc Signed-off-by: Craig Perkins <cwperx@amazon.com> * Remove unused exports Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add import Signed-off-by: Craig Perkins <cwperx@amazon.com> * Remove unused code Signed-off-by: Craig Perkins <cwperx@amazon.com> * Remove mavenCentral from publication section Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add to CHANGELOG Signed-off-by: Craig Perkins <cwperx@amazon.com> * Update reactor-netty version Signed-off-by: Craig Perkins <cwperx@amazon.com> * Only keep versions section in toml Signed-off-by: Craig Perkins <cwperx@amazon.com> * Replaces versions catalog TOML parsing with Gradle's VersionCatalogsExtension Signed-off-by: Andriy Redko <andriy.redko@aiven.io> * Update bundled_jdk Signed-off-by: Craig Perkins <cwperx@amazon.com> * Update bytebuddy and mockito Signed-off-by: Craig Perkins <cwperx@amazon.com> --------- Signed-off-by: Craig Perkins <cwperx@amazon.com> Signed-off-by: Craig Perkins <craig5008@gmail.com> Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Signed-off-by: Daniel (dB.) Doubrovkine <dblock@amazon.com> Co-authored-by: Andriy Redko <andriy.redko@aiven.io> Co-authored-by: Daniel (dB.) Doubrovkine <dblock@amazon.com> (cherry picked from commit af7a067) * Update os version in libs.versions.toml Signed-off-by: Craig Perkins <cwperx@amazon.com> * tdigest 3.2 Signed-off-by: Craig Perkins <cwperx@amazon.com> * Update libs.versions.toml Signed-off-by: Andriy Redko <andriy.redko@aiven.io> * Update libs.versions.toml Signed-off-by: Andriy Redko <andriy.redko@aiven.io> --------- Signed-off-by: Craig Perkins <cwperx@amazon.com> Signed-off-by: Andriy Redko <andriy.redko@aiven.io> Co-authored-by: Andriy Redko <andriy.redko@aiven.io> Co-authored-by: Andriy Redko <drreta@gmail.com>
Description
Opening this PR in draft to explore what it will take to enable dependabot to perform automated upgrades on the dependency versions listed in
buildSrc/version.properties
.This issue came up for discussion on my very first PR on the project: #3772.
Dependabot works on version catalogs: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#gradle
To test this I pushed to the main branch of my fork and used Dependabot CLI to run dependabot in a dry-run mode where it displays what PRs would be created without actually creating a PR.
To test, I created a sample dependabot configuration like this:
And ran it with
~/go/bin/dependabot update -f ./.github/dependabot_server.yml
See joda update in the output:
Related Issues
Resolves #3782
Check List
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.