Skip to content

[Cases] Use the bulk create attachment endpoint on the UI#130124

Merged
cnasikas merged 8 commits intoelastic:mainfrom
cnasikas:use_bulk_api
Apr 14, 2022
Merged

[Cases] Use the bulk create attachment endpoint on the UI#130124
cnasikas merged 8 commits intoelastic:mainfrom
cnasikas:use_bulk_api

Conversation

@cnasikas
Copy link
Copy Markdown
Member

Fix mapping## Summary

This PR changes the UI to use the new bulk create attachment internal API.

Depends on: #129092

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@cnasikas cnasikas added Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// Feature:Cases Cases feature v8.3.0 labels Apr 13, 2022
@cnasikas cnasikas self-assigned this Apr 13, 2022
@cnasikas cnasikas added the release_note:skip Skip the PR/issue when compiling release notes label Apr 13, 2022
@cnasikas cnasikas marked this pull request as ready for review April 14, 2022 08:06
@cnasikas cnasikas requested a review from a team as a code owner April 14, 2022 08:06
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@elasticmachine
Copy link
Copy Markdown
Contributor

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

@cnasikas cnasikas requested a review from academo April 14, 2022 08:06
Comment thread x-pack/plugins/cases/public/components/create/form_context.tsx Outdated
Comment thread x-pack/plugins/cases/public/containers/use_bulk_create_attachments.tsx Outdated
Copy link
Copy Markdown
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.

I really liked how you made the change to be a drop-in replacement. Only missing a small validation to prevent a wrong API call.

Something I'd like to change but you don't have to because it will be a lot of work, is to remove the "bulk" from the name to simply createAttachments as the name already implies plural.

If you feel like doing it, go for it, but I won't hold the PR for that.

@cnasikas cnasikas requested a review from academo April 14, 2022 11:00
Copy link
Copy Markdown
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.

Thanks for the renaming!

@kibana-ci
Copy link
Copy Markdown

💛 Build succeeded, but was flaky

Test Failures

  • [job] [logs] Cases Cypress Tests on Security Solution / Alerts timeline Privileges: can crud should allow a user with crud privileges to attach alerts to cases

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
cases 283.8KB 283.8KB +7.0B

Page load bundle

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

id before after diff
cases 90.7KB 90.7KB +86.0B

History

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

cc @cnasikas

@cnasikas cnasikas merged commit 0ed2f5b into elastic:main Apr 14, 2022
@cnasikas cnasikas deleted the use_bulk_api branch April 14, 2022 12:32
@kibanamachine kibanamachine added the backport:skip This PR does not require backporting label Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:Cases Cases feature release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v8.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants