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] Fix fields query parameter in the _find API #128143

Merged
merged 6 commits into from Mar 23, 2022

Conversation

cnasikas
Copy link
Member

@cnasikas cnasikas commented Mar 21, 2022

Summary

If you pass a single value in the fields query parameter you get a bad request error. This is happening because io-ts expects an array of strings but if a single value is provided is being provided as a single string. This PR fixes this issue.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

Release notes

Fix bug when providing a single value to the fields query parameter of the Cases find API.

@cnasikas cnasikas added bug Fixes for quality problems that affect the customer experience Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Cases Cases feature v8.2.0 v7.17.2 v8.1.2 labels Mar 21, 2022
@cnasikas cnasikas self-assigned this Mar 21, 2022
@cnasikas cnasikas requested a review from a team as a code owner March 21, 2022 12:00
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@cnasikas cnasikas requested a review from academo March 21, 2022 12:01
@cnasikas cnasikas added release_note:fix auto-backport Deprecated: Automatically backport this PR after it's merged labels Mar 21, 2022
@cnasikas
Copy link
Member Author

@elasticmachine merge upstream

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Tested and LGTM

@lcawl
Copy link
Contributor

lcawl commented Mar 23, 2022

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
cases 85.1KB 85.1KB +20.0B

History

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

cc @cnasikas

Copy link
Contributor

@academo academo left a comment

Choose a reason for hiding this comment

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

nice. Thanks for adding that extra test.

@cnasikas cnasikas merged commit 043c40b into elastic:main Mar 23, 2022
@cnasikas cnasikas deleted the fix_fields_in_find_api branch March 23, 2022 08:21
@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
7.17 Backport failed because of merge conflicts
8.1 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 128143

Questions ?

Please refer to the Backport tool documentation

@cnasikas cnasikas added v8.0.2 and removed v7.17.2 labels Mar 23, 2022
@cnasikas cnasikas added backport:skip This commit does not require backporting and removed v8.0.2 v8.1.2 auto-backport Deprecated: Automatically backport this PR after it's merged labels Mar 23, 2022
@cnasikas
Copy link
Member Author

cnasikas commented Mar 23, 2022

I decided to not backport to the previous versions as it is risky and the bug fix is of low importance.

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:fix Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants