From 61351b2478faf28be0d78e2336dbdf0752749b55 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Tue, 16 Jul 2024 16:25:34 -0400 Subject: [PATCH] Update main to 3.0.0 baseline (#64) Signed-off-by: Andriy Redko --- .github/workflows/backport.yml | 40 +++++++++++++++++++ .github/workflows/gradle.yml | 11 ++++- build.gradle | 6 +-- oci-objectstorage-fixture/build.gradle | 14 +++++++ .../oci/OciObjectStoragePluginTests.java | 4 +- 5 files changed, 68 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/backport.yml diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 0000000..2a95177 --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,40 @@ +name: Backport +on: + pull_request_target: + types: + - closed + - labeled + +jobs: + backport: + name: Backport + runs-on: ubuntu-latest + # Only react to merged PRs for security reasons. + # See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target. + if: > + github.event.pull_request.merged + && ( + github.event.action == 'closed' + || ( + github.event.action == 'labeled' + && contains(github.event.label.name, 'backport') + ) + ) + permissions: + contents: write + pull-requests: write + steps: + - name: GitHub App token + id: github_app_token + uses: tibdex/github-app-token@v2.1.0 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.APP_PRIVATE_KEY }} + installation_id: 22958780 + + - name: Backport + uses: VachaShah/backport@v2.2.0 + with: + github_token: ${{ steps.github_app_token.outputs.token }} + head_template: backport/backport-<%= number %>-to-<%= base %> + failure_labels: backport-failed diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 8680965..6cdcad4 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -2,9 +2,16 @@ name: Java CI with Gradle on: push: - branches: [ "main" ] + branches: + - main + - '[0-9]+.[0-9]+' + - '[0-9]+.x' pull_request: - branches: [ "main" ] + branches: + - main + - '[0-9]+.[0-9]+' + - '[0-9]+.x' + permissions: contents: read diff --git a/build.gradle b/build.gradle index 1cb1145..4a333a1 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ repositories { } allprojects { - version = '2.16.0-SNAPSHOT' + version = '3.0.0-SNAPSHOT' // Force using a newer version, due to guava vulnerability CVE-2023-2976. Remove after Gradle upgrades its default version. checkstyle { @@ -35,9 +35,9 @@ subprojects { apply plugin: 'com.diffplug.spotless' ext { - opensearch_version = System.getProperty("opensearch.version", "2.16.0-SNAPSHOT") + opensearch_version = System.getProperty("opensearch.version", "3.0.0-SNAPSHOT") sdk_version = "3.24.0" - jackson_version = "2.17.1" + jackson_version = "2.17.2" } repositories { diff --git a/oci-objectstorage-fixture/build.gradle b/oci-objectstorage-fixture/build.gradle index 41ed2ce..a281207 100644 --- a/oci-objectstorage-fixture/build.gradle +++ b/oci-objectstorage-fixture/build.gradle @@ -1,8 +1,22 @@ +buildscript { + repositories { + mavenLocal() + maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" } + mavenCentral() + maven { url "https://plugins.gradle.org/m2/" } + } + + dependencies { + classpath "org.opensearch.gradle:build-tools:${opensearch_version}" + } +} + plugins { id 'java-library' id 'java' } +apply plugin: 'opensearch.repositories' apply plugin: 'io.freefair.lombok' apply plugin: 'java' apply plugin: 'java-library' diff --git a/oci-repository-plugin/src/test/java/org/opensearch/repositories/oci/OciObjectStoragePluginTests.java b/oci-repository-plugin/src/test/java/org/opensearch/repositories/oci/OciObjectStoragePluginTests.java index 3876133..6b4ac08 100644 --- a/oci-repository-plugin/src/test/java/org/opensearch/repositories/oci/OciObjectStoragePluginTests.java +++ b/oci-repository-plugin/src/test/java/org/opensearch/repositories/oci/OciObjectStoragePluginTests.java @@ -34,7 +34,7 @@ import org.opensearch.plugins.Plugin; import org.opensearch.search.builder.SearchSourceBuilder; import org.opensearch.test.OpenSearchIntegTestCase; -import org.opensearch.transport.Netty4Plugin; +import org.opensearch.transport.Netty4ModulePlugin; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -62,7 +62,7 @@ protected boolean addMockHttpTransport() { @Override protected Collection> nodePlugins() { return Collections.unmodifiableCollection( - Lists.newArrayList(Netty4Plugin.class, OciObjectStoragePlugin.class)); + Lists.newArrayList(Netty4ModulePlugin.class, OciObjectStoragePlugin.class)); } /** ******************************* */ @Test