-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add support to test against multiple versions of OpenSearch #228
Merged
VachaShah
merged 3 commits into
opensearch-project:main
from
VachaShah:test-multiple-versions
May 3, 2022
Merged
Changes from 2 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Integration for Compatibility | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
integration-test-compatibility: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
entry: | ||
- { version: '1.1.0', secured: 'true' } | ||
- { version: '1.1.0', secured: 'false' } | ||
- { version: '1.2.0', secured: 'true' } | ||
- { version: '1.2.0', secured: 'false' } | ||
- { version: '1.2.1', secured: 'true' } | ||
- { version: '1.2.1', secured: 'false' } | ||
- { version: '1.2.2', secured: 'true' } | ||
- { version: '1.2.2', secured: 'false' } | ||
- { version: '1.2.3', secured: 'true' } | ||
- { version: '1.2.3', secured: 'false' } | ||
- { version: '1.2.4', secured: 'true' } | ||
- { version: '1.2.4', secured: 'false' } | ||
- { version: '1.3.0', secured: 'true' } | ||
- { version: '1.3.0', secured: 'false' } | ||
- { version: '1.3.1', secured: 'true' } | ||
- { version: '1.3.1', secured: 'false' } | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Configure sysctl limits | ||
run: | | ||
sudo swapoff -a | ||
sudo sysctl -w vm.swappiness=1 | ||
sudo sysctl -w fs.file-max=262144 | ||
sudo sysctl -w vm.max_map_count=262144 | ||
|
||
- name: Runs OpenSearch cluster | ||
run: | | ||
export OPENSEARCH_VERSION=${{ matrix.entry.version }} | ||
export SECURE_INTEGRATION=${{ matrix.entry.secured }} | ||
make cluster.clean cluster.opensearch.build cluster.opensearch.start | ||
|
||
- name: Use Node.js 16.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Install | ||
run: | | ||
npm install | ||
|
||
- name: Integration test without security | ||
if: ${{ matrix.entry.secured == 'false'}} | ||
run: | | ||
npm run test:integration:helpers | ||
|
||
- name: Integration test with security | ||
if: ${{ matrix.entry.secured == 'true'}} | ||
run: | | ||
npm run test:integration:helpers-secure | ||
|
||
- name: Stop the OpenSearch cluster | ||
run: | | ||
make cluster.opensearch.stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
- [Compatibility with OpenSearch](#compatibility-with-opensearch) | ||
|
||
## Compatibility with OpenSearch | ||
|
||
The below matrix shows the compatibility of the [`opensearch-js`](https://www.npmjs.com/package/@opensearch-project/opensearch) with versions of [`OpenSearch`](https://opensearch.org/downloads.html#opensearch). | ||
|
||
| OpenSearch Version | Client Version | | ||
| --- | --- | | ||
| 1.0.0 | 1.0.0 | | ||
| 1.0.1 | 1.0.0 | | ||
| 1.1.0 | 1.1.0 | | ||
| 1.2.0 | 1.1.0 | | ||
| 1.2.1 | 1.1.0 | | ||
| 1.2.2 | 1.1.0 | | ||
| 1.2.3 | 1.1.0 | | ||
| 1.2.4 | 1.1.0 | | ||
| 1.3.0 | 1.1.0 | | ||
| 1.3.1 | 1.1.0 | |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be Im totally off, I see we are replicating few pieces of code (workflows, compatibility etc ) in all client repositories.
Is there a way we can define these in a single place (May be opensearch-clients) which is the source of truth and consume it in all our client repos?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you found a really nice way to do this in https://github.com/opensearch-project/opensearch-py/pull/163/files @VachaShah - want to update it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dblock Updated the workflow matrix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saratvemulapalli Do you mean like having a template in
opensearch-clients
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont know what a template is :/.
I was looking for a single place where common code can live. Lets take compatibility as an example:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh got it! Yeah we are trying to keep it as consistent as possible across the client repos but I will keep this in mind if we can place common code. My current thought is having a single place might be difficult since the clients can be on different versions with different compatibility, their CIs are written differently etc. But will explore this once the breaking changes are done.