Skip to content

[Query Rules] Update Query Rules API for 8.15 #2639

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 5 commits into from
Jun 25, 2024

Conversation

kderusso
Copy link
Member

The following changes are going live in 8.15 for query rules:

This comment was marked as outdated.

This comment has been minimized.

@pquentin pquentin requested a review from a team June 24, 2024 12:56
@l-trotta l-trotta self-assigned this Jun 24, 2024
@l-trotta
Copy link
Contributor

the spec is missing the Always criteria type, and if I got this correctly metadata here should be optional.

@l-trotta
Copy link
Contributor

QueryRulesetListItem probably has to be updated as well, server, current spec

This comment was marked as outdated.

@kderusso
Copy link
Member Author

@l-trotta thanks for the review!

the spec is missing the Always criteria type, and if I got this correctly metadata here should be optional.

Thanks for the catch, fixed!

QueryRulesetListItem probably has to be updated as well, server, current spec

Updated!

@l-trotta
Copy link
Contributor

one last thing! in QueryRulesetListItem, rules_count should be rule_total_count and rule_criteria_type_counts should be rule_criteria_types_counts

@pquentin
Copy link
Member

(I sound like a broken record, but those would be easier to catch if we could collect the Query Rules YAML tests.)

@kderusso
Copy link
Member Author

(I sound like a broken record, but those would be easier to catch if we could collect the Query Rules YAML tests.)

I know, I promise it's on my list to look into!

Copy link
Contributor

Following you can find the validation results for the APIs you have changed.

API Status Request Response
query_rule.delete Missing test Missing test
query_rule.get Missing test Missing test
query_rule.put Missing test Missing test
query_ruleset.delete Missing test Missing test
query_ruleset.get Missing test Missing test
query_ruleset.list Missing test Missing test
query_ruleset.put Missing test Missing test

You can validate these APIs yourself by using the make validate target.

Copy link
Contributor

@l-trotta l-trotta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kderusso kderusso merged commit 14af7cf into main Jun 25, 2024
6 checks passed
@kderusso kderusso deleted the kderusso/update-query-rule-client branch June 25, 2024 12:38
kderusso added a commit that referenced this pull request Jun 25, 2024
* Mark existing query rules APIs as GA

* Add individual CRUD API calls

* Linting

* PR feedback

* PR feedback
kderusso added a commit that referenced this pull request Jun 26, 2024
…n for text_expansion and weighted_tokens queries (#2642)

* Add sparse_vector query to client specification

* Fix error and update contrib

* PR feedback

* Populate endpoint deprecation from request definition (#2640)

* Update specification output

* Wrap ts-morph errors to provide helpful error (#2644)

* wrap ts-morph errors to provide helpful error

* improve after lint

* Bump braces from 3.0.2 to 3.0.3 in /typescript-generator (#2645)

Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [Query Rules] Update Query Rules API for 8.15 (#2639)

* Mark existing query rules APIs as GA

* Add individual CRUD API calls

* Linting

* PR feedback

* PR feedback

* Update specification output

* Update output

* Update output

* Fix variant annotations for SparseVectorQuery

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Florian Bernd <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Laurent Saint-Félix <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
pquentin added a commit that referenced this pull request Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants