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

Added OpenSearch 3.0. #459

Merged
merged 7 commits into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .github/opensearch-cluster/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ services:
opensearch-cluster:
image: ${OPENSEARCH_DOCKER_HUB_PROJECT:-opensearchproject}/opensearch:${OPENSEARCH_VERSION:-latest}${OPENSEARCH_DOCKER_REF}
ports:
- '9200:9200'
- '9600:9600'
- 9200:9200
- 9600:9600
environment:
- 'OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_PASSWORD:-myStrongPassword123!}'
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_PASSWORD:-myStrongPassword123!}
- OPENSEARCH_JAVA_OPTS=${OPENSEARCH_JAVA_OPTS}
- discovery.type=single-node
- path.repo=/tmp/opensearch/repo
Expand Down
24 changes: 20 additions & 4 deletions .github/workflows/test-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,17 @@ jobs:
strategy:
matrix:
entry:
- {version: 1.3.17, admin_password: admin}
- {version: 2.0.0, admin_password: admin}
- {version: 2.15.0}
- version: 1.3.17
admin_password: admin
- version: 2.0.0
admin_password: admin
- version: 2.15.0
- version: 2.16.0
hub: opensearchstaging
ref: '@sha256:50fbfe3b95c41e92a113ada3e80513ba4524dfc8a25dc6aaeff2bbe1e1145d5f'
ref: '@sha256:bcd7f5d5d30231f24f266064248cc8d3306574948190f7bf93016dff29acf17e'
- version: 3.0.0
hub: opensearchstaging
ref: '@sha256:db1918b2b8f7ef6c22dd6ff54a0640877c3d395a392a53864745024933981e3b'

name: test-opensearch-spec (version=${{ matrix.entry.version }}, hub=${{ matrix.entry.hub || 'opensearchproject' }})
runs-on: ubuntu-latest
Expand Down Expand Up @@ -56,13 +61,24 @@ jobs:
working-directory: .github/opensearch-cluster
run: docker compose up -d

- name: Get Container ID
id: container
run: |
echo "CONTAINER_ID=$(docker ps -aqf "ancestor=opensearchproject/opensearch:${{ matrix.entry.version }}")" >> $GITHUB_OUTPUT

- name: Run Tests
run: |
npm run test:spec -- \
--opensearch-insecure \
--opensearch-version=${{ matrix.entry.version }} \
--coverage coverage/test-spec-coverage-${{ matrix.entry.version }}.json

- name: Get Container Logs
if: failure() && steps.container.outputs.CONTAINER_ID
run: |
echo Dumping logs from ${{ steps.container.outputs.CONTAINER_ID }} ...
docker logs ${{ steps.container.outputs.CONTAINER_ID }}

- name: Upload Test Coverage Results
uses: actions/upload-artifact@v4
with:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added a warning on mulitple paths being tested in the same file ([#452](https://github.com/opensearch-project/opensearch-api-specification/pull/452))
- Added `/_plugins/_query/settings` ([#456](https://github.com/opensearch-project/opensearch-api-specification/pull/456))
- Added `/_plugins/_ppl`, `explain` and `stats` ([#460](https://github.com/opensearch-project/opensearch-api-specification/pull/460))
- Added tests against OpenSearch 3.0 ([#459](https://github.com/opensearch-project/opensearch-api-specification/pull/459))

### Changed

Expand Down
3 changes: 3 additions & 0 deletions spec/schemas/nodes._common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,9 @@ components:
$ref: '#/components/schemas/ShardSearchBackpressureTaskResourceTrackerStats'
cancellation_stats:
$ref: '#/components/schemas/ShardSearchBackpressureTaskCancellationStats'
completion_count:
x-version-added: '3.0'
type: number
ShardSearchBackpressureTaskResourceTrackerStats:
type: object
properties:
Expand Down
2 changes: 1 addition & 1 deletion tests/ingest/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ epilogues:
- path: /_ingest/pipeline/books_pipeline
method: DELETE
status: [200, 404]
version: '>= 2.11'
version: '>= 2.11, < 3.0' # TODO: re-enable using a 3.0 build with the neural-search plugin
chapters:
- synopsis: Create ingest pipeline for text embedding.
path: /_ingest/pipeline/{id}
Expand Down
12 changes: 9 additions & 3 deletions tests/sql/close.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ prologues:
method: POST
parameters:
index: books
- id: query_sql
- path: _plugins/_query/settings
method: PUT
request_body:
payload:
transient:
plugins.query.memory_limit: 100%
- id: sql_query
path: /_plugins/_sql
method: POST
request_body:
Expand All @@ -41,6 +47,6 @@ chapters:
method: POST
request_body:
payload:
cursor: ${query_sql.cursor}
cursor: ${sql_query.cursor}
response:
status: 200
status: 200
6 changes: 6 additions & 0 deletions tests/sql/explain.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ prologues:
method: PUT
request_body:
payload: {}
- path: _plugins/_query/settings
method: PUT
request_body:
payload:
transient:
plugins.query.memory_limit: 100%
epilogues:
- path: /books
method: DELETE
Expand Down
6 changes: 6 additions & 0 deletions tests/sql/query.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ prologues:
index: books
request_body:
payload: {}
- path: _plugins/_query/settings
method: PUT
request_body:
payload:
transient:
plugins.query.memory_limit: 100%
epilogues:
- path: /books
method: DELETE
Expand Down
Loading