Skip to content

Commit

Permalink
Merge branch 'main' into ci-with-security
Browse files Browse the repository at this point in the history
  • Loading branch information
cwperks committed Jan 10, 2025
2 parents 461b8c7 + 3f541ea commit 55f4215
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 39 deletions.
32 changes: 15 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [21]
java: [21, 23]

name: Build job-scheduler Plugin on Linux using Container Image
runs-on: ubuntu-latest
Expand All @@ -27,15 +27,13 @@ jobs:
# this image tag is subject to change as more dependencies and updates will arrive over time
image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }}
# need to switch to root so that github actions can install runner binary on container without permission issues.
options: --user root

# Allow using Node16 actions
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
options: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-options }}

steps:
- name: Run start commands
run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }}
- name: Checkout job-scheduler
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
Expand All @@ -48,11 +46,11 @@ jobs:
su `id -un 1000` -c "./gradlew build && ./gradlew publishToMavenLocal"
- name: Upload Coverage Report
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: linux-JDK${{ matrix.java }}-reports
Expand All @@ -64,15 +62,15 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [21]
java: [21, 23]

name: Build job-scheduler Plugin on MacOS
needs: Get-CI-Image-Tag
runs-on: macos-latest

steps:
- name: Checkout job-scheduler
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v1
Expand All @@ -88,11 +86,11 @@ jobs:
./gradlew publishToMavenLocal
- name: Upload Coverage Report
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: macos-JDK${{ matrix.java }}-reports
Expand All @@ -104,15 +102,15 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ 21 ]
java: [ 21, 23 ]

name: Build job-scheduler Plugin on Windows
needs: Get-CI-Image-Tag
runs-on: windows-latest

steps:
- name: Checkout job-scheduler
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v1
Expand All @@ -128,11 +126,11 @@ jobs:
./gradlew.bat publishToMavenLocal
- name: Upload Coverage Report
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: windows-JDK${{ matrix.java }}-reports
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/delete_backport_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ on:
jobs:
delete-branch:
runs-on: ubuntu-latest
if: startsWith(github.event.pull_request.head.ref,'backport/')
permissions:
contents: write
if: github.repository == 'opensearch-project/job-scheduler' && startsWith(github.event.pull_request.head.ref,'backport/')
steps:
- name: Delete merged branch
uses: SvanBoxel/delete-merged-branch@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Delete branch
uses: actions/github-script@v7
with:
script: |
github.rest.git.deleteRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `heads/${context.payload.pull_request.head.ref}`,
})
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ buildscript {
}

plugins {
id 'com.netflix.nebula.ospackage' version "11.10.0"
id 'com.netflix.nebula.ospackage' version "11.10.1"
id 'java-library'
id "com.diffplug.spotless" version "6.25.0"
}
Expand Down Expand Up @@ -178,7 +178,7 @@ dependencies {
testImplementation group: 'org.mockito', name: 'mockito-core', version: "${versions.mockito}"
javaRestTestImplementation project.sourceSets.main.runtimeClasspath
//spotless
implementation('com.google.googlejavaformat:google-java-format:1.24.0') {
implementation('com.google.googlejavaformat:google-java-format:1.25.2') {
exclude group: 'com.google.guava'
}
opensearchPlugin "org.opensearch.plugin:opensearch-security:${security_plugin_version}@zip"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=9d926787066a081739e8200858338b4a69e837c3a821a33aca9db09dd4a41026
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
22 changes: 12 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down Expand Up @@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
13 changes: 13 additions & 0 deletions release-notes/opensearch-job-scheduler.release-notes-2.18.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Version 2.18.0.0

Compatible with OpenSearch 2.18.0

### Maintenance
* Increment version to 2.18.0 [#676](https://github.com/opensearch-project/job-scheduler/pull/676).
* dependabot: bump org.gradle.test-retry from 1.5.10 to 1.6.0 [(#679)](https://github.com/opensearch-project/job-scheduler/pull/679) [(#681)](https://github.com/opensearch-project/job-scheduler/pull/681).
* dependabot: bump com.google.googlejavaformat:google-java-format [(#684)](https://github.com/opensearch-project/job-scheduler/pull/684) [(#685)](https://github.com/opensearch-project/job-scheduler/pull/685).
* Gradle upgrade to 8.10.2 and run CI checks with JDK 23 [(#688)](https://github.com/opensearch-project/job-scheduler/pull/688) [(#689)](https://github.com/opensearch-project/job-scheduler/pull/689).

### Bug Fixes
* * Return lockService from createComponents [(#670)](https://github.com/opensearch-project/job-scheduler/pull/670) [(#672)](https://github.com/opensearch-project/job-scheduler/pull/672).

2 changes: 1 addition & 1 deletion sample-extension-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ testClusters.integTest {
}

String baseName = "jobSchedulerBwcCluster"
String bwcOpenSearchVersion = "2.18.0"
String bwcOpenSearchVersion = "2.19.0"
String bwcPluginVersion = bwcOpenSearchVersion + ".0"
String bwcFilePath = "src/test/resources/bwc/job-scheduler/"
bwcOpenSearchVersion += "-SNAPSHOT"
Expand Down

0 comments on commit 55f4215

Please sign in to comment.