-
Notifications
You must be signed in to change notification settings - Fork 245
DRIVERS-2549: add search index management helpers #1423
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
59d54ff
add index management spec tests
baileympearson 8ec19ab
update unified test format
baileympearson 89f3b21
sync tests
baileympearson 3fd818d
add stricter assertions
baileympearson 130fe64
fix schema failure
baileympearson f6429f8
fix schema failure
baileympearson 78dc884
fix schema failure
baileympearson 2a405d2
update workflow
baileympearson e6fe40c
add dummy options interfces
baileympearson 2ee53c5
Updates from PR review pt 1
baileympearson 0a715a5
add options to search index view API
baileympearson 0b2f74f
mention the index view API is optional
baileympearson f44e0ed
add comment explaining expectError to yml files
baileympearson 8928584
explain reformatting of UTR arguments for createSearchIndex
baileympearson 84f4152
Apply suggestions from code review
baileympearson d276fb7
apply misc formatting changes to unified tests
baileympearson 2ec9795
add new commands to FLE whitelist
baileympearson 5f70591
sync changes to test from Kevin's review
baileympearson cdbbcbd
lower schema version to 1.3
baileympearson d40f08f
rename options to aggregationOptions
baileympearson 48b56d8
dropSearchIndexes -> dropSearchIndex
baileympearson 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,134 @@ | ||
{ | ||
"description": "createSearchIndex", | ||
"schemaVersion": "1.4", | ||
"createEntities": [ | ||
{ | ||
"client": { | ||
"id": "client0", | ||
"useMultipleMongoses": false, | ||
"observeEvents": [ | ||
"commandStartedEvent" | ||
] | ||
} | ||
}, | ||
{ | ||
"database": { | ||
"id": "database0", | ||
"client": "client0", | ||
"databaseName": "database0" | ||
} | ||
}, | ||
{ | ||
"collection": { | ||
"id": "collection0", | ||
"database": "database0", | ||
"collectionName": "collection0" | ||
} | ||
} | ||
], | ||
"runOnRequirements": [ | ||
{ | ||
"minServerVersion": "7.0.0", | ||
"topologies": [ | ||
"replicaset", | ||
"load-balanced", | ||
"sharded" | ||
], | ||
"serverless": "forbid" | ||
} | ||
], | ||
"tests": [ | ||
{ | ||
"description": "no name provided for an index definition", | ||
"operations": [ | ||
{ | ||
"name": "createSearchIndex", | ||
"object": "collection0", | ||
"arguments": { | ||
"model": { | ||
"definition": { | ||
"mappings": { | ||
"dynamic": true | ||
} | ||
} | ||
} | ||
}, | ||
"expectError": { | ||
"isError": true | ||
} | ||
} | ||
], | ||
"expectEvents": [ | ||
{ | ||
"client": "client0", | ||
"events": [ | ||
{ | ||
"commandStartedEvent": { | ||
"command": { | ||
"createSearchIndexes": "collection0", | ||
"indexes": [ | ||
{ | ||
"definition": { | ||
"mappings": { | ||
"dynamic": true | ||
} | ||
} | ||
} | ||
], | ||
"$db": "database0" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"description": "name provided for an index definition", | ||
"operations": [ | ||
{ | ||
"name": "createSearchIndex", | ||
"object": "collection0", | ||
"arguments": { | ||
"model": { | ||
"definition": { | ||
"mappings": { | ||
"dynamic": true | ||
} | ||
}, | ||
"name": "test index" | ||
} | ||
}, | ||
"expectError": { | ||
"isError": true | ||
} | ||
} | ||
], | ||
"expectEvents": [ | ||
{ | ||
"client": "client0", | ||
"events": [ | ||
{ | ||
"commandStartedEvent": { | ||
"command": { | ||
"createSearchIndexes": "collection0", | ||
"indexes": [ | ||
{ | ||
"definition": { | ||
"mappings": { | ||
"dynamic": true | ||
} | ||
}, | ||
"name": "test index" | ||
} | ||
], | ||
"$db": "database0" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.
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.
happy to revert these changes. the changes here and in the workflow file make validating UTR schemas as simple as
npm i -g ys-yaml ajv-cli && bash .github/workflows/check_schema_version.sh
. Before,js-yaml
needed to be installed as an npm library and ajv-cli as a runnable npm package.