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

[Cases] Limit category filter in find cases API #159989

Merged
merged 6 commits into from
Jun 21, 2023

Conversation

adcoelho
Copy link
Contributor

Summary

This PR limits the number of categories by which we can filter calls to the find cases API.

The limit is now 100.

@adcoelho adcoelho added release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Cases Cases feature v8.9.0 labels Jun 20, 2023
@adcoelho adcoelho self-assigned this Jun 20, 2023
@adcoelho adcoelho requested a review from a team as a code owner June 20, 2023 10:15
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops-cases (Feature:Cases)

@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@adcoelho adcoelho force-pushed the limit-rows-find-category-api branch from 9c08624 to 532f240 Compare June 20, 2023 10:17
@adcoelho adcoelho requested a review from a team as a code owner June 20, 2023 11:49
@@ -103,5 +104,15 @@ describe('find', () => {
'Error: Invalid value "foobar" supplied to "searchFields"'
);
});

it(`invalid category array with > ${MAX_CATEGORY_FILTER_LENGTH} items`, async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: it(throws an error when the category array has...)

@@ -349,6 +349,12 @@ export default ({ getService }: FtrProviderContext): void => {
});
});

it('unhappy path - 400s when bad category field supplied', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: it('... 400s when more than the maximum category fields are supplied')

Copy link
Contributor

@lcawl lcawl left a comment

Choose a reason for hiding this comment

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

API docs LGTM, thanks!

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 13 15 +2
securitySolution 411 415 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 14 16 +2
securitySolution 494 498 +4
total +6

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @adcoelho

@adcoelho adcoelho added the bug Fixes for quality problems that affect the customer experience label Jun 21, 2023
@adcoelho adcoelho merged commit 599e231 into elastic:main Jun 21, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting bug Fixes for quality problems that affect the customer experience Feature:Cases Cases feature release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants