From df65ffcc87a0c9c9adb87ddf9cedc1d5544e64dc Mon Sep 17 00:00:00 2001 From: AWSHurneyt Date: Thu, 10 Mar 2022 10:49:37 -0800 Subject: [PATCH 1/3] Added support for JDK 8 and 14. (#335) * Added support for JDK 8 and 14. Signed-off-by: AWSHurneyt * Added support for JDK 8 and 14. Signed-off-by: AWSHurneyt --- .github/workflows/test-workflow.yml | 2 +- .../kotlin/org/opensearch/alerting/AlertingRestTestCase.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-workflow.yml b/.github/workflows/test-workflow.yml index cce7f9adb..ffb87287a 100644 --- a/.github/workflows/test-workflow.yml +++ b/.github/workflows/test-workflow.yml @@ -12,7 +12,7 @@ jobs: build: strategy: matrix: - java: [14] + java: [8, 11, 14] # Job name name: Build Alerting with JDK ${{ matrix.java }} # This job runs on Linux diff --git a/alerting/src/test/kotlin/org/opensearch/alerting/AlertingRestTestCase.kt b/alerting/src/test/kotlin/org/opensearch/alerting/AlertingRestTestCase.kt index 786331672..c73c8a9a2 100644 --- a/alerting/src/test/kotlin/org/opensearch/alerting/AlertingRestTestCase.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/AlertingRestTestCase.kt @@ -35,6 +35,7 @@ import org.opensearch.client.Request import org.opensearch.client.Response import org.opensearch.client.RestClient import org.opensearch.client.WarningFailureException +import org.opensearch.common.io.PathUtils import org.opensearch.common.settings.Settings import org.opensearch.common.unit.TimeValue import org.opensearch.common.xcontent.LoggingDeprecationHandler @@ -51,7 +52,6 @@ import org.opensearch.rest.RestStatus import org.opensearch.search.SearchModule import java.net.URLEncoder import java.nio.file.Files -import java.nio.file.Path import java.time.Instant import java.time.ZonedDateTime import java.time.format.DateTimeFormatter @@ -1020,7 +1020,7 @@ abstract class AlertingRestTestCase : ODFERestTestCase() { false ) proxy.getExecutionData(false)?.let { - val path = Path.of("$jacocoBuildPath/integTest.exec") + val path = PathUtils.get("$jacocoBuildPath/integTest.exec") Files.write(path, it) } } From 13d81615b154f8a4a8db5ce2df56928e180bae0e Mon Sep 17 00:00:00 2001 From: AWSHurneyt Date: Thu, 10 Mar 2022 10:50:35 -0800 Subject: [PATCH 2/3] Added 1.3 release notes. (#336) * Added 1.3 release notes. Signed-off-by: AWSHurneyt * Added 1.3 release notes. Signed-off-by: AWSHurneyt --- .../opensearch-alerting.release-notes-1.3.0.0.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 release-notes/opensearch-alerting.release-notes-1.3.0.0.md diff --git a/release-notes/opensearch-alerting.release-notes-1.3.0.0.md b/release-notes/opensearch-alerting.release-notes-1.3.0.0.md new file mode 100644 index 000000000..100561091 --- /dev/null +++ b/release-notes/opensearch-alerting.release-notes-1.3.0.0.md @@ -0,0 +1,14 @@ +## Version 1.3.0.0 2022-03-09 + +Compatible with OpenSearch 1.3.0 + +### Maintenance +* Bumps to version 1.3. ([#248](https://github.com/opensearch-project/alerting/pull/248)) +* Update GitHub Actions to run on all branches. ([#256](https://github.com/opensearch-project/alerting/pull/256)) +* Added support for JDK 8 and 14. ([#335](https://github.com/opensearch-project/alerting/pull/335)) + +### Bug Fixes +* Fix running Alerting security tests in GitHub Actions. ([#252](https://github.com/opensearch-project/alerting/pull/252)) + +### Documentation +* Added 1.3 release notes. ([#336](https://github.com/opensearch-project/alerting/pull/336)) \ No newline at end of file From 944d1fa6602f5460f3485cde9400a342a8d60684 Mon Sep 17 00:00:00 2001 From: Annie Lee Date: Thu, 10 Mar 2022 11:52:56 -0800 Subject: [PATCH 3/3] Add backport and auto delete workflow (#339) Signed-off-by: Annie Lee --- .github/workflows/backport.yml | 29 ++++++++++++++++++++ .github/workflows/delete_backport_branch.yml | 15 ++++++++++ DEVELOPER_GUIDE.md | 7 ++++- 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/backport.yml create mode 100644 .github/workflows/delete_backport_branch.yml diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 000000000..e3f96a44f --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,29 @@ + +name: Backport +on: + pull_request_target: + types: + - closed + - labeled + +jobs: + backport: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + name: Backport + steps: + - name: GitHub App token + id: github_app_token + uses: tibdex/github-app-token@v1.5.0 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.APP_PRIVATE_KEY }} + installation_id: 22958780 + + - name: Backport + uses: VachaShah/backport@v1.1.4 + with: + github_token: ${{ steps.github_app_token.outputs.token }} + branch_name: backport/backport-${{ github.event.number }} diff --git a/.github/workflows/delete_backport_branch.yml b/.github/workflows/delete_backport_branch.yml new file mode 100644 index 000000000..f24f022b0 --- /dev/null +++ b/.github/workflows/delete_backport_branch.yml @@ -0,0 +1,15 @@ +name: Delete merged branch of the backport PRs +on: + pull_request: + types: + - closed + +jobs: + delete-branch: + runs-on: ubuntu-latest + if: 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 }} diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index 282d23e93..7e2574fad 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -105,4 +105,9 @@ You can do this by running `./gradlew :alerting:run -PnumNodes=` You can also debug a multi-node cluster, by using a combination of above multi-node and debug steps. -But, you must set up debugger configurations to listen on each port starting from `5005` and increasing by 1 for each node. +But, you must set up debugger configurations to listen on each port starting from `5005` and increasing by 1 for each node. + +### Backport + +- [Link to backport documentation](https://github.com/opensearch-project/opensearch-plugins/blob/main/BACKPORT.md) +