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

Backport #1438 to 2.x #1439

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
6130d6f
Correctly updating the followerCheckpoint in stats api (#438)
gbbafna Jul 4, 2022
08ad60b
Changing leader_cluster to leader_alias in readme file (#453)
Rishikesh1159 Jul 18, 2022
27898e2
Use the published zip for security plugin (#455)
ankitkala Jul 19, 2022
db5029a
Staging for version increment automation (#449)
prudhvigodithi Jul 27, 2022
93b43f4
Adding Index Settings validation before starting replication (#461)
gbbafna Aug 3, 2022
db1b226
Changes to support replication plugin on OpenSearch v2.2.0 (#469)
saikaranam-amazon Aug 4, 2022
a1d17d3
Modified security artifacts to fetch from latest build version (#474)
saikaranam-amazon Aug 5, 2022
a859596
Added release notes for v2.2.0 release (#477)
saikaranam-amazon Aug 9, 2022
4470a77
Updating filters as well during Alias update (#491)
gbbafna Aug 24, 2022
0bad307
Modified _stop replication API to remove any stale replication settin…
saikaranam-amazon Aug 24, 2022
8f0a55c
Add lastExecutionTime for autofollow coroutine (#508)
ankitkala Aug 26, 2022
805f686
Fix for missing ShardReplicationTasks on new nodes (#497)
ankitkala Aug 26, 2022
81c2002
For segrep enabled indices, use NRTReplicationEngine for replica shar…
dreamer-89 Aug 29, 2022
5ac1023
Bumped snakeyaml version to address CVE-2022-25857 (#537)
amkhar Sep 2, 2022
967f833
Added support for integTest remote on Remote clusters
monusingh-1 Sep 5, 2022
9e646bd
Fixed missing '}'
monusingh-1 Sep 5, 2022
fea3958
Re
monusingh-1 Sep 6, 2022
58dd330
Re1
monusingh-1 Sep 6, 2022
22c8758
Re2
monusingh-1 Sep 6, 2022
336337b
Made changes to allow running IntegTestRemote for both single or mult…
monusingh-1 Sep 9, 2022
659122e
Created seperate gradle target for single cluster and multi cluster i…
monusingh-1 Sep 9, 2022
7e66919
Created seperate gradle target for single cluster and multi cluster i…
monusingh-1 Sep 9, 2022
ab3f9d4
Created seperate gradle target for single cluster and multi cluster i…
monusingh-1 Sep 9, 2022
c1b16f4
fix#921-README-forum-link-CCRepli (#548)
cwillum Sep 22, 2022
e1dc511
use proper gradle dep. to fetch security plugin (#566)
rursprung Sep 26, 2022
39376f2
Created helper function to check if tests are being run for remote cl…
monusingh-1 Sep 28, 2022
bf7ac76
Upgrade Snakeyml and Jackson
soosinha Oct 4, 2022
8fa868b
Support to send transport port as well
monusingh-1 Oct 4, 2022
2542853
Merge branch 'opensearch-project:main' into main
monusingh-1 Oct 5, 2022
3bdfd1d
Endpoint correction
monusingh-1 Oct 6, 2022
f8b500c
Added support to pass endpoints as dict
monusingh-1 Oct 7, 2022
33571ca
added groupId to pluginzip publication (#568)
sricharanvuppu Oct 12, 2022
719cf93
add group = org.opensearch.plugin
prudhvigodithi Oct 12, 2022
0211b78
Merge branch 'opensearch-project:main' into main
monusingh-1 Oct 13, 2022
0f84428
Update integtest.sh
monusingh-1 Oct 13, 2022
cbf9689
Bump the main to 3.0
ankitkala Sep 13, 2022
b4279ed
Use the new method to fetch the changes from pluggable translog
ankitkala Sep 13, 2022
4bdf13e
update build.gradle
monusingh-1 Oct 14, 2022
5882c09
Merge pull request #589 from prudhvigodithi/main
sricharanvuppu Oct 14, 2022
81a82a9
Merge branch 'opensearch-project:main' into main
monusingh-1 Oct 17, 2022
2624c42
Update integtest.sh
monusingh-1 Oct 17, 2022
d02a6a8
Added configurable parameter to use 50% of heap memory for CCR perfor…
mohitamg Oct 19, 2022
0ec98b1
Updated jackson databind version to 2.13.4.2 (#596)
mohitamg Oct 20, 2022
d12271a
Add windows & mac build (#591)
ankitkala Oct 26, 2022
67a7073
Include default index settings during leader setting validation (#601)
ankitkala Oct 26, 2022
e59cafc
Added check to skip a test when run by integTestRemote
monusingh-1 Oct 27, 2022
16039fb
Remove the reference to the deprecated BaseNodeRequest class
ankitkala Oct 27, 2022
603e7e4
Upgrade to to Apache HttpClient / Core 5.x (#4459)
ankitkala Oct 28, 2022
d75d376
Merge branch 'main' into 3.0_bump
ankitkala Oct 31, 2022
7669785
Merge branch 'ankitkala-3.0_bump'
ankitkala Oct 31, 2022
b8e52ee
Merge pull request #543 from monu-aws/main
monusingh-1 Nov 3, 2022
77074c4
Github-Issue-544:Replication auto pauses on follower cluster having w…
priyatsh Nov 2, 2022
47c4649
Github-issue-544: Added integ tests to verify the wait_for_active_sha…
priyatsh Nov 9, 2022
f3fee90
Modified minsupportedversion to OS-2.0 for metadata based on OS-3.0 c…
saikaranam-amazon Nov 10, 2022
80cccf7
Corrected integ tests to check for default value of the wait_for_acti…
priyatsh Nov 11, 2022
2384c38
Merge branch 'opensearch-project:main' into main
priyatsh Nov 14, 2022
2fba1f7
Merge pull request #624 from priyatsh/main
priyatsh Nov 17, 2022
2d83e42
Updated follower port in Readme (#629)
monusingh-1 Nov 22, 2022
ad8e8de
stopReplication API removed from integ test cases and stopAllReplicat…
sricharanvuppu Nov 29, 2022
5f4b5bc
Handeled clean-up of stale index task during cancellation (#645)
saikaranam-amazon Dec 12, 2022
02b9f7b
Fixed build failure due to dependency conflicts.
priyatsh Dec 26, 2022
9c141a1
Merge pull request #669 from priyatsh/main
priyatsh Dec 27, 2022
e7a9be6
release notes for 1.3.7.0 (#664)
sricharanvuppu Dec 27, 2022
c45fe26
release notes for 2.4.1 (#663)
sricharanvuppu Dec 27, 2022
f99f1be
Added toList import statement for java 11 version (#670)
saikaranam-amazon Dec 27, 2022
b08b58e
Removed jackson-databind dependency from build-gradle that now comes …
priyatsh Jan 6, 2023
de94355
Merge pull request #675 from priyatsh/main
priyatsh Jan 6, 2023
1af1a0a
Updated MAINTAINERS.md to match recommended opensearch-project format…
dblock Jan 9, 2023
b09c706
Updating the maintainer list for the repo (#678)
ankitkala Jan 10, 2023
4d12d6c
Updating multi-field mapping at follower (#671)
sricharanvuppu Jan 10, 2023
b17376d
Revert "Removed jackson-databind dependency from build-gradle that no…
ryanbogan Jan 11, 2023
cafc069
Revert "Updating the maintainer list for the repo (#678)" (#681)
ankitkala Jan 11, 2023
5c48ca6
Build Fix: Update Strings.toString to pass the JSON XContentType (#699)
ankitkala Feb 3, 2023
8f6141a
Created untriaged issue workflow. (#705)
dblock Feb 21, 2023
1a470d0
Add github workflow for auto release (#712)
ankitkala Feb 21, 2023
c3fddb6
Update release notes file path in auto release workflow (#726)
ankitkala Feb 28, 2023
d29f886
Update imports from org.opensearch.common.xcontent to org.opensearch.…
ankitkala Mar 1, 2023
22dfffa
Baselining the maintainer list (#730)
ankitkala Mar 1, 2023
be023e4
Modified autofollow stats to rely on single source for failed indices…
saikaranam-amazon Mar 6, 2023
7ce444f
Modified security github workflow to run based on plugin availability…
saikaranam-amazon Mar 21, 2023
db28924
Update test to wait for 60 seconds
monusingh-1 Mar 22, 2023
f9746e5
Merge pull request #745 from opensearch-project/monu-aws-patch-1
monusingh-1 Mar 23, 2023
c3fcd00
Add autofollow_stats to HANDBOOK.md
monusingh-1 Mar 24, 2023
ffd90c8
Merge pull request #755 from monu-aws/monu-aws-patch-1
monusingh-1 Mar 27, 2023
5ccb7b7
Updated plugin code based on OpenSearch-3.0 upstream changes (#766)
saikaranam-amazon Apr 4, 2023
c5d4cdc
Handled batch requests for replication metadata update under cluster …
saikaranam-amazon Apr 6, 2023
501bd28
handling null pointer exception in multi-filed mapping (#757)
sricharanvuppu Apr 14, 2023
fcbbfb7
Adding a proxy mode connection setup for CCR (#786)
ishankka Apr 14, 2023
7380597
Add release notes for v2.7.0
saikaranam-amazon Apr 17, 2023
c3aa9e4
Merge pull request #799 from saikaranam-amazon/2.7-release-notes
monusingh-1 Apr 17, 2023
55b6968
Add setting to use document replication for system indices. (#802)
Rishikesh1159 Apr 18, 2023
641c5f7
BWC fix: Changed version to 2.6 and disabled rolling upgrade tests (#…
ankitkala Apr 18, 2023
58501b0
FIx to use List instead of ImmutableOpenMap (#811)
monusingh-1 Apr 24, 2023
3b43e55
Allow knn index to be used with ccr (#760)
monusingh-1 Apr 24, 2023
49e8781
Open Upgrade gradle version and remove remaining use of ImmutableOpe…
monusingh-1 May 10, 2023
9408b3d
Extract number of nodes (#826)
monusingh-1 May 16, 2023
dacfd78
Update to set remoteTranslogEnabled=false (#834)
monusingh-1 May 19, 2023
cbc2c96
Update UpdateIndexHandler.kt to use org.opensearch.core.common.Strings;
monusingh-1 May 19, 2023
f738ecc
Add retention lease with followerClusterUUID (#833)
monusingh-1 May 22, 2023
e3256eb
Update snakeyaml to version 2.0
monusingh-1 May 23, 2023
3e3787d
Handle serialization issues with UpdateReplicationStateDetailsRequest…
ankitkala May 23, 2023
f5c94f7
Modify autofollow retry scheduler logic check to account for complete…
saikaranam-amazon May 26, 2023
3e55af4
Add release notes for 2.8 release
monusingh-1 May 29, 2023
14b9268
Handling exception in getAssignment method (#881)
nisgoel-amazon May 31, 2023
8347844
Add monusingh-1 as a maintainer (#929)
ankitkala May 31, 2023
59b5543
Update MAINTAINERS.md (#931)
monusingh-1 May 31, 2023
596a07e
Update CODEOWNERS (#935)
ankitkala Jun 1, 2023
ba7d1fa
Initialize the leaderCheckpoint with follower shard's localCheckpoint…
ankitkala Jun 2, 2023
bc9b61a
Remove any stale replication tasks from cluster state (#905)
monusingh-1 Jun 2, 2023
93205a1
Use strong password in integ test (#987)
soosinha Jun 7, 2023
232818a
Update CODEOWNERS (#947)
monusingh-1 Jun 20, 2023
d66a721
Refresh dependencies (#899)
monusingh-1 Jun 20, 2023
448e7a7
Handling OpenSearchRejectExecuteException Exception (#1004)
sricharanvuppu Jun 28, 2023
66d126e
Avoid use of indicesService in Resume replicaiton flow (#1030)
monusingh-1 Jul 5, 2023
ea077a8
Update TranslogSequencer.kt (#1057)
monusingh-1 Jul 10, 2023
96299ef
Add release notes for 2.9.0 (#1063)
monusingh-1 Jul 11, 2023
324b103
adding missing checkpoint and correcting follower stats test case (#1…
sricharanvuppu Jul 12, 2023
fa7b9c5
Move from common to core.common (#1087)
monusingh-1 Jul 21, 2023
bcf1144
Change use of XContentType.fromMediaType to MediaType.fromMediaType (…
monusingh-1 Jul 25, 2023
0e6ad7a
Refactor for CircuitBreaker and Lifecycle (#1096)
monusingh-1 Aug 2, 2023
7385ade
Move to core.common.Strings (#1098)
monusingh-1 Aug 8, 2023
505e242
Refactor for upstream changes from PR import 9082 (#1102)
monusingh-1 Aug 16, 2023
81b37ba
Fix test for single node and consume numNodes (#1091)
monusingh-1 Aug 17, 2023
9750b78
Revert "Add setting to use document replication for system indices. (…
monusingh-1 Aug 22, 2023
f00ac43
update requirements to use latest version of request (#1106)
monusingh-1 Sep 1, 2023
b6d1b56
Implement abstract methods of Repository (#1111)
monusingh-1 Sep 1, 2023
426a2de
Removed timeout excessive logging in case of index is idle in replica…
mohitamg Sep 4, 2023
4273a19
Create opensearch-cross-cluster-replication.release-notes-2.10.0.0.md…
mohitamg Sep 6, 2023
0fbe5a7
Implement abstract methods (#1121)
monusingh-1 Sep 7, 2023
c19dcba
Remove numNodes parameter in security tests (#991)
soosinha Sep 11, 2023
633ef8b
Create opensearch-cross-cluster-replication.release-notes-2.11.0.md
mohitamg Oct 4, 2023
24b48c6
Rename opensearch-cross-cluster-replication.release-notes-2.11.0.md t…
mohitamg Oct 12, 2023
0bd703b
Container image (#1249)
monusingh-1 Oct 17, 2023
e1d2596
CCR: Route requests to primary for remote store enabled leader clusters
ankitkala Oct 18, 2023
12ebd7e
Fix build failure (#1281)
monusingh-1 Oct 27, 2023
abb41a9
Add 2.11.1.0 release notes (#1285)
monusingh-1 Nov 22, 2023
577fd62
Add support for SystemIndex (#1290)
monusingh-1 Dec 6, 2023
be24bfa
Correct error message when field are not passed when starting replica…
monusingh-1 Dec 7, 2023
8258ac5
Use latest version of ipaddress Library (#1302)
monusingh-1 Jan 2, 2024
532a57f
Ignoring update of final type settings in updateSettings function (#1…
nisgoel-amazon Jan 3, 2024
3ea239b
Remove references to admin:admin (#1298)
derek-ho Jan 19, 2024
043a788
Fix build failures (#1315)
monusingh-1 Feb 2, 2024
720e080
Create opensearch-cross-cluster-replication.release-notes-2.12.0.0.md…
mohitamg Feb 6, 2024
b011467
Updates integTest behavior to accept the version and set the password…
DarshitChanpura Feb 5, 2024
581cff0
Updates credentials
DarshitChanpura Feb 5, 2024
2612f57
Updates credentials to be admin
DarshitChanpura Feb 5, 2024
341e067
Forces HTTP1 version policy for local clusters
DarshitChanpura Feb 8, 2024
d703887
Adds more comments
DarshitChanpura Feb 9, 2024
3f4f216
Updates 2.12 release notes (#1329)
DarshitChanpura Feb 12, 2024
74dfcd1
Fixes base64 encoded hardcoded admin credentials (#1331)
DarshitChanpura Feb 15, 2024
bfbfdc6
Fix for CVE-2023-50570(Bumping up to latest version of ipaddress libr…
mohitamg Feb 29, 2024
da8746f
Update Lucene snapshot location (#1351)
monusingh-1 Mar 18, 2024
3e35b09
Added release notes for OS-cross-cluster-replication_2.13.0 (#1353)
mohitamg Mar 19, 2024
90fcb8b
Release notes for opensearch-cross-cluster-replication 1.3.16 (#1366)
mohitamg Apr 16, 2024
ff42012
Adding support to fetch changes from Lucene store while migrating fro…
astute-decipher Apr 23, 2024
d404742
Handle respone for deletion of non-existing autofollow replication ru…
skumarp7 Apr 23, 2024
12d285b
Add release notes for 2.14 (#1376)
soosinha May 2, 2024
d287aa2
Disabling docrep to remote store migration test for integTestRemote (…
astute-decipher May 3, 2024
94e2dd9
Updating security reachout email
varun-lodaya May 29, 2024
32f28cc
Added release notes for OS-cross-cluster-replication_2.15.0 (#1399)
mohitamg Jun 14, 2024
d6e7636
Fixing remote integ test for windows by using awk instead of python
nisgoel-amazon May 3, 2024
754ffd6
Update PULL_REQUEST_TEMPLATE to include an API spec change in the che…
dblock Jul 8, 2024
94cd53e
Handle exception for the updation of a replication rule
skumarp7 Jun 24, 2024
63fcd31
indendation fix
skumarp7 Jun 24, 2024
2b57327
Exclusion of 'test operations are fetched from lucene when leader is …
skumarp7 Jun 25, 2024
ee4e03f
Exclusion of tests in integTest
skumarp7 Jun 25, 2024
2da2034
revert changes for exclusion of tests
skumarp7 Jul 18, 2024
434d31a
Added validations for indexPattern in autofollow API
skumarp7 Mar 22, 2024
06e6bd3
rebased commit
skumarp7 Apr 23, 2024
6022720
empty commit
skumarp7 Jul 17, 2024
802ae78
Resolvinfg Merge conflicts
nandnkum Sep 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This should match the owning team set up in https://github.com/orgs/opensearch-project/teams
* @opensearch-project/replication
# This list should match with the maintainters list.
* @krishna-ggk @ankitkala @saikaranam-amazon @soosinha @gbbafna @monusingh-1
17 changes: 9 additions & 8 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
### Description
[Describe what this change achieves]

### Issues Resolved
[List any issues this PR will resolve]


### Related Issues
Resolves #[Issue number to be closed when this PR is merged]
<!-- List any other related issues here -->

### 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
- [ ] API changes companion pull request [created](https://github.com/opensearch-project/opensearch-api-specification/blob/main/DEVELOPER_GUIDE.md).
- [ ] Commits are signed per the DCO using `--signoff`.
- [ ] Public documentation issue/PR [created](https://github.com/opensearch-project/documentation-website/issues/new/choose).

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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).
For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/cross-cluster-replication/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).
19 changes: 19 additions & 0 deletions .github/workflows/add-untriaged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Apply 'untriaged' label during issue lifecycle

on:
issues:
types: [opened, reopened, transferred]

jobs:
apply-label:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['untriaged']
})
29 changes: 29 additions & 0 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Releases

on:
push:
tags:
- '*'

jobs:

build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: GitHub App token
id: github_app_token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
installation_id: 22958780
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- uses: actions/checkout@v2
- uses: ncipollo/release-action@v1
with:
github_token: ${{ steps.github_app_token.outputs.token }}
bodyFile: release-notes/opensearch-cross-cluster-replication.release-notes-${{steps.tag.outputs.tag}}.md
62 changes: 62 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CCR Test Workflow
# This workflow is triggered on pull requests to main branch
on:
pull_request:
branches:
- '*'
push:
branches:
- '*'

# We build for all combinations but run tests only on one combination (linux & latest java)
jobs:
Get-CI-Image-Tag:
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
with:
product: opensearch

build-test-linux:
strategy:
matrix:
java: [11, 17]

name: Build CCR Plugin on Linux using Container Image
runs-on: ubuntu-latest
needs: Get-CI-Image-Tag
container:
# using the same image which is used by opensearch-build team to build the OpenSearch Distribution
# 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

steps:
- name: Checkout CCR
uses: actions/checkout@v2
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}

- name: Run build
# switching the user, as OpenSearch cluster can only be started as root/Administrator on linux-deb/linux-rpm/windows-zip.
run: |
chown -R 1000:1000 `pwd`
su `id -un 1000` -c 'whoami && java -version && ./gradlew --refresh-dependencies clean release -D"build.snapshot=true"'
- name: Upload failed logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: logs
path: |
build/testclusters/integTest-*/logs/*
build/testclusters/leaderCluster-*/logs/*
build/testclusters/followCluster-*/logs/*
- name: Create Artifact Path
run: |
mkdir -p cross-cluster-replication-artifacts
cp ./build/distributions/*.zip cross-cluster-replication-artifacts
- name: Upload Coverage Report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
32 changes: 10 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test and Build Workflow
name: Build Replication plugin
# This workflow is triggered on pull requests to main branch
on:
pull_request:
Expand All @@ -8,16 +8,21 @@ on:
branches:
- '*'

# We build for other platforms except linux which is already covered in build-and-test.
# Also, We're not running tests here as those are already covered with linux build.
jobs:
build:
continue-on-error: true
strategy:
matrix:
java:
- 11
- 17
os:
- windows-latest
- macos-latest
# Job name
name: Build Replication plugin
runs-on: ubuntu-latest
name: Java ${{ matrix.java }} On ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK ${{ matrix.java }}
Expand All @@ -29,21 +34,4 @@ jobs:
uses: actions/checkout@v2
- name: Build and run Replication tests
run: |
./gradlew clean release -Dbuild.snapshot=true
- name: Upload failed logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: logs
path: |
build/testclusters/integTest-*/logs/*
build/testclusters/leaderCluster-*/logs/*
build/testclusters/followCluster-*/logs/*
- name: Create Artifact Path
run: |
mkdir -p cross-cluster-replication-artifacts
cp ./build/distributions/*.zip cross-cluster-replication-artifacts
- name: Uploads coverage
with:
fetch-depth: 2
uses: codecov/[email protected]
./gradlew --refresh-dependencies clean release -D"build.snapshot=true" -x test -x IntegTest
3 changes: 1 addition & 2 deletions .github/workflows/bwc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ jobs:
- name: Build and run Replication tests
run: |
echo "Running backwards compatibility tests ..."
./gradlew clean release -Dbuild.snapshot=true -x test -x IntegTest
./gradlew mixedClusterTask --stacktrace
./gradlew --refresh-dependencies clean release -Dbuild.snapshot=true -x test -x IntegTest
./gradlew fullRestartClusterTask --stacktrace
- name: Upload failed logs
uses: actions/upload-artifact@v2
Expand Down
140 changes: 140 additions & 0 deletions .github/workflows/security-knn-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
name: Security and knn tests
# This workflow is triggered on pull requests to main branch
on:
pull_request:
branches:
- '*'
push:
branches:
- '*'

jobs:
Get-CI-Image-Tag:
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
with:
product: opensearch

req:
# Job name
name: plugin check
runs-on: ubuntu-latest
outputs:
isSecurityPluginAvailable: ${{ steps.plugin-availability-check.outputs.isSecurityPluginAvailable }}
isKnnPluginAvailable: ${{ steps.plugin-availability-check.outputs.isKnnPluginAvailable }}
steps:
# This step uses the checkout Github action: https://github.com/actions/checkout
- name: Checkout Branch
uses: actions/checkout@v2
- id: plugin-availability-check
name: "plugin check"
run: |
opensearch_version=$(grep "System.getProperty(\"opensearch.version\", \"" build.gradle | grep '\([0-9]\|[.]\)\{5\}' -o)
opensearch_version=$opensearch_version".0-SNAPSHOT"
# we publish build artifacts to the below url
sec_plugin_url="https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/plugin/opensearch-security/"$opensearch_version"/"
sec_st=$(curl -s -o /dev/null -w "%{http_code}" $sec_plugin_url)
if [ "$sec_st" = "200" ]; then
echo "isSecurityPluginAvailable=True" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
else
echo "isSecurityPluginAvailable=False" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
fi
knn_plugin_url="https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/plugin/opensearch-knn/"$opensearch_version"/"
knn_st=$(curl -s -o /dev/null -w "%{http_code}" $knn_plugin_url)
if [ "$knn_st" = "200" ]; then
echo "isKnnPluginAvailable=True" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
else
echo "isKnnPluginAvailable=False" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
fi

build-linux:
needs: [req, Get-CI-Image-Tag]
if: ${{ 'True' == needs.req.outputs.isSecurityPluginAvailable }}
# Job name
name: Build and Run Security tests
runs-on: ubuntu-latest
container:
# using the same image which is used by opensearch-build team to build the OpenSearch Distribution
# 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

steps:
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
# This step uses the checkout Github action: https://github.com/actions/checkout
- name: Checkout Branch
uses: actions/checkout@v2
- name: Build and run Replication tests
run: |
chown -R 1000:1000 `pwd`
ls -al src/test/resources/security/plugin
su `id -un 1000` -c "whoami && java -version && ./gradlew --refresh-dependencies clean release -Dbuild.snapshot=true -Psecurity=true"
- name: Upload failed logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: logs
path: |
build/testclusters/integTest-*/logs/*
build/testclusters/leaderCluster-*/logs/*
build/testclusters/followCluster-*/logs/*
- name: Create Artifact Path
run: |
mkdir -p cross-cluster-replication-artifacts
cp ./build/distributions/*.zip cross-cluster-replication-artifacts
- name: Uploads coverage
with:
fetch-depth: 2
uses: codecov/[email protected]

knn-build-linux:
needs: [req, Get-CI-Image-Tag]
if: ${{ 'True' == needs.req.outputs.isKnnPluginAvailable }}
# Job name
name: Build and Run Knn tests
runs-on: ubuntu-latest
container:
# using the same image which is used by opensearch-build team to build the OpenSearch Distribution
# 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

steps:
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
# This step uses the checkout Github action: https://github.com/actions/checkout
- name: Checkout Branch
uses: actions/checkout@v2
- name: Build and run Replication tests
run: |
chown -R 1000:1000 `pwd`
su `id -un 1000` -c 'whoami && java -version && ./gradlew --refresh-dependencies clean release -Dbuild.snapshot=true -PnumNodes=1 -Dtests.class=org.opensearch.replication.BasicReplicationIT -Dtests.method="test knn index replication" -Pknn=true'
- name: Upload failed logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: logs
path: |
build/testclusters/integTest-*/logs/*
build/testclusters/leaderCluster-*/logs/*
build/testclusters/followCluster-*/logs/*
- name: Create Artifact Path
run: |
mkdir -p cross-cluster-replication-artifacts
cp ./build/distributions/*.zip cross-cluster-replication-artifacts
- name: Uploads coverage
with:
fetch-depth: 2
uses: codecov/[email protected]
Loading
Loading