[Cases] Narrow attachment shape in bulk create - #290934
Draft
christineweng wants to merge 5 commits into
Draft
christineweng wants to merge 5 commits into
christineweng wants to merge 5 commits into
Conversation
|
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
Contributor
💔 Build Failed
Failed CI StepsMetrics [docs]Page load bundle
History |
Collapses the client/service/route/workflow layer onto unified-only attachment requests (AttachmentRequestV2 / BulkCreateAttachmentsRequestV2), adds BulkCreateUnifiedAttachmentsRequestRt / BulkGetUnifiedAttachmentsResponseRt, and removes the now-unused BulkGetAttachmentsResponseRtV2 and legacy decode path. Co-authored-by: Cursor <cursoragent@cursor.com>
Split attachment/v2.ts into: - v2.ts: unified-only types (BulkCreateUnifiedAttachmentsRequest, etc.) - v2_union.ts: v1-legacy union types (AttachmentRequestV2, etc.), exposed as the attachmentApiV2Union namespace. Also migrate base_response_actions_client.ts to the unified-only client type, matching cases_connector_executor.ts/add_alerts.ts.
8 tasks
christineweng
force-pushed
the
cases-bulk-create-attachments-cleanup
branch
from
September 14, 2026 18:14
57f51ab to
ded8dd8
Compare
christineweng
added a commit
that referenced
this pull request
Sep 15, 2026
…sts (#290961) ## Summary Context: During cases attachment v2 work, all the v2 types (such as `AttachmentRequestV2`) are unions of v1 and v2 for backward compatibility. After #287729, all public routes perform v1 -> v2 conversion before sending to cases client, hence union shape is no longer necessary. This PR migrates the client/service layer to accept unified-only attachment payloads internally. **Major changes** - Replaced `....V2` (v1+v2 union) type with `...Unified` (v2 only) - To prevent naming confusion, split `common/types/api/attachment/v2.ts` into:`v2.ts` and `v2_union.ts` - Removed redundant decode calls - Renamed utils like `validateRegisteredAttachments` to `validateUnifiedAttachments` No wire-shape changes in this PR. Follow-up PR #290934 removes the legacy wire shape from the bulk-create route. Made with [Cursor](https://cursor.com) ### Checklist - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/docs/extend/kibana/contributing/workflow/how-we-use-github#release-notes) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. --------- Co-authored-by: Cursor <cursoragent@cursor.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Dependency: #290961 to be merged first
This PR narrows internal cases route
bulk_createattachments to always receive v2 unified attachment types. It used to allow v1 and v2 for migration compatibility, since migration is complete and all production callers pass unified shape, this PR tighten it to accept v2 only.Major code changes:
BulkCreateAttachmentsRequestRtV2(v1+v2 union) withBulkCreateUnifiedAttachmentsRequestRtChecklist
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*labels.This PR is assisted by Cursor and Claude Sonnet 5