Skip to content

Commit

Permalink
Merge branch 'main' into replication-namespace
Browse files Browse the repository at this point in the history
Signed-off-by: Niyazbek Torekeldi <[email protected]>
  • Loading branch information
Tokesh authored Nov 17, 2024
2 parents 1c671fc + bf35601 commit a2bc5f7
Show file tree
Hide file tree
Showing 68 changed files with 1,707 additions and 547 deletions.
45 changes: 32 additions & 13 deletions .github/workflows/test-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,32 @@ jobs:
admin_password: admin
- version: 2.0.0
admin_password: admin
- version: 2.16.0
- version: 2.16.0
- version: 2.18.0
- version: 2.18.0
tests: plugins/index_state_management
- version: 2.16.0
- version: 2.18.0
tests: plugins/ml
- version: 2.16.0
- version: 2.18.0
tests: routing
- version: 2.16.0
- version: 2.18.0
tests: snapshot
- version: 2.16.0
tests: plugins/replication
url: http://localhost:9200
- version: 2.17.0
- version: 2.18.0
tests: plugins/streaming
- version: 2.17.0
- version: 2.18.0
tests: plugins/notifications
- version: 2.17.0
- version: 2.18.0
tests: plugins/query_insights
- version: 2.17.0
- version: 2.18.0
tests: plugins/workload-management
- version: 2.18.0
tests: plugins/analysis
- version: 2.19.0
hub: opensearchstaging
ref: '@sha256:57a1cd1142d68c203e2e4aa0666d9a691e1e409a5d14aa4a8f5044036f05cf06'
ref: '@sha256:4da23e0137b2b67206d23b36fcf0914cc39b3bf19310c782f536e4934b86f6cc'
- version: 3.0.0
hub: opensearchstaging
ref: '@sha256:727643acdfebed77bfdb26362dbcff536b7ea02a0cc4ae2da2521729171333de'
Expand Down Expand Up @@ -80,12 +83,16 @@ jobs:
working-directory: tests/${{ matrix.entry.tests || 'default' }}
run: docker compose up -d

- name: Generate Test Files Hash
id: tests
run: echo "hash=${{ matrix.entry.version }}-${{ hashFiles(format('tests/{0}', matrix.entry.tests || 'default')) }}" >> $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 }}-${{ matrix.entry.tests || 'default' }}.json \
--coverage coverage/test-spec-coverage-${{ steps.tests.outputs.hash }}.json \
--opensearch-url=${{ matrix.entry.url || 'https://localhost:9200'}} \
--tests=tests/${{ matrix.entry.tests || 'default' }}
Expand All @@ -100,12 +107,11 @@ jobs:
- name: Upload Test Coverage Results
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.entry.version }}-${{ hashFiles(format('tests/{0}', matrix.entry.tests || 'default')) }}
path: coverage/test-spec-coverage-${{ matrix.entry.version }}-${{ matrix.entry.tests || 'default' }}.json
name: coverage-${{ matrix.entry.version }}-${{ steps.tests.outputs.hash }}
path: coverage/test-spec-coverage-${{ steps.tests.outputs.hash }}.json

merge-coverage:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
needs: test-opensearch-spec
steps:
- uses: actions/checkout@v4
Expand All @@ -115,6 +121,17 @@ jobs:
with:
path: coverage

- name: Display Missing Test Paths
run: |
jq -sc '
(map(.operations) | add | unique) as $all |
(map(.evaluated_operations) | add | unique) as $evaluated |
$all-$evaluated |
sort_by(.path) |
.[] |
"\(.method) \(.path)"
' $(find ./ -name "test-spec-coverage-*.json")
- name: Combine Test Coverage Data
shell: bash -eo pipefail {0}
run: |
Expand All @@ -130,6 +147,7 @@ jobs:
cat ./coverage/coverage.json
- name: Construct Comment Data Payload
if: github.event_name == 'pull_request'
shell: bash -eo pipefail {0}
run: |
jq \
Expand All @@ -150,6 +168,7 @@ jobs:

- name: Upload PR Comment Payload
uses: actions/upload-artifact@v4
if: github.event_name == 'pull_request'
with:
name: pr-comment
path: pr-comment.json
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,18 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added Python and Ruby spec validators ([#646](https://github.com/opensearch-project/opensearch-api-specification/pull/646))
- Added verbose output of the story being evaluated ([#646](https://github.com/opensearch-project/opensearch-api-specification/pull/646))
- Added `_search` with `sort: direction` ([#658](https://github.com/opensearch-project/opensearch-api-specification/pull/658))
- Added `_common.mapping:FlatObjectProperty` ([#661](https://github.com/opensearch-project/opensearch-api-specification/pull/661))
- Added `HEAD /{index}/_doc/{id}` returning `404` ([#670](https://github.com/opensearch-project/opensearch-api-specification/pull/670))
- Added `_common.mapping:IcuCollationKeywordProperty` ([#666](https://github.com/opensearch-project/opensearch-api-specification/pull/666))
- Added `/_cluster/stats/{metric}/nodes/{node_id}` and `/_cluster/stats/{metric}/{index_metric}/nodes/{node_id}` ([#639](https://github.com/opensearch-project/opensearch-api-specification/pull/639))
- Added `PhoneAnalyzer` from `analysis-phonenumber` plugin ([#609](https://github.com/opensearch-project/opensearch-api-specification/pull/609))
- Added `/_list/indices` & `/_list/shards` api specs ([#613](https://github.com/opensearch-project/opensearch-api-specification/pull/613))

### Removed
- Removed unsupported `_common.mapping:SourceField`'s `mode` field and associated `_common.mapping:SourceFieldMode` enum ([#652](https://github.com/opensearch-project/opensearch-api-specification/pull/652))
- Removed unsupported `_common.mapping:DenseVectorProperty`, `_common.mapping:SparseVectorProperty`, and `_common.mapping:FlattenedProperty` ([#666](https://github.com/opensearch-project/opensearch-api-specification/pull/666))
- Removed unsupported time series dimension properties and types ([#666](https://github.com/opensearch-project/opensearch-api-specification/pull/666))
- Removed unsupported runtime field properties (`script`/`on_script_error`) on `NumberPropertyBase` ([#666](https://github.com/opensearch-project/opensearch-api-specification/pull/666))

### Fixed
- Spec passes OpenAPI 3.1.0 validations ([#646](https://github.com/opensearch-project/opensearch-api-specification/pull/646))
Expand All @@ -22,6 +31,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fixed incorrect `style` in `indices.get_mapping::query.index` ([#646](https://github.com/opensearch-project/opensearch-api-specification/pull/646))
- Removed invalid `required` from `ppl` responses ([#646](https://github.com/opensearch-project/opensearch-api-specification/pull/646))
- Added schema for security API error responses ([#646](https://github.com/opensearch-project/opensearch-api-specification/pull/646))
- Fixed `/{index}/_create/{id}` returning `201` ([#669](https://github.com/opensearch-project/opensearch-api-specification/pull/669))
- Fixed `ml._common.yaml#SearchModelsResponse` and `SearchModelsHitsHit` ([#672](https://github.com/opensearch-project/opensearch-api-specification/pull/672))

## [0.1.0] - 2024-10-25

Expand Down
2 changes: 1 addition & 1 deletion TESTING_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Remember to set the `OPENSEARCH_PASSWORD` or `AWS_ACCESS_KEY_ID` and `AWS_SECRET
#### FORBIDDEN/10/cluster create-index blocked (api)
The cluster is most likely hitting a disk watermark threshold. This example sets the disk watermark thresholds to 1500MB low, 100MB high, and 500MB flood stage, allowing the cluster to create indices even if the disk is almost full.
The cluster is most likely hitting a disk watermark threshold. This example sets the disk watermark thresholds to 1500MB low, 100MB high, and 500MB flood stage, allowing the cluster to create indexes even if the disk is almost full.
```bash
curl -k -X PUT --user "admin:${OPENSEARCH_PASSWORD}" https://localhost:9200/_cluster/settings -H 'Content-Type: application/json' -d'
Expand Down
Loading

0 comments on commit a2bc5f7

Please sign in to comment.