[Security][OpenAPI generator] add experimentallyImportZodV4#253568
Merged
janmonschke merged 5 commits intoelastic:mainfrom Feb 18, 2026
Merged
Conversation
Contributor
|
Pinging @elastic/kibana-cases (Team:Cases) |
Contributor
⏳ Build in-progress, with failures
Failed CI Steps |
Contributor
Author
|
@alainnahalliday The latest build passed, not sure why there is no updated comment from @elasticmachine |
alainnahalliday
approved these changes
Feb 18, 2026
Contributor
alainnahalliday
left a comment
There was a problem hiding this comment.
Makes sense to me
MykhailoKondrat
approved these changes
Feb 18, 2026
Contributor
|
Starting backport for target branches: 8.19, 9.2, 9.3 https://github.com/elastic/kibana/actions/runs/22152199804 |
Contributor
janmonschke
added a commit
to janmonschke/kibana
that referenced
this pull request
Feb 18, 2026
…c#253568) ## Summary Adds an experimental config flag `experimentallyImportZodV4` that changes the generated zod import to `import { z } from '@kbn/zod/v4';`. This is meant as a quick way to unblock the cases workflow integration because workflow schemas use zod v4. There is some work done to migrate larger parts of the Kibana codebase (and this generator) to v4 but it will not finish in time for the workflows integration (elastic/kibana-team#2589). We recommend removing this flag as part of the zod upgrade work. --------- Co-authored-by: Tiago Costa <tiago.costa@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit df5b635) # Conflicts: # x-pack/platform/plugins/shared/cases/docs/openapi/bundled-types.gen.ts # x-pack/platform/plugins/shared/cases/scripts/openapi_generate.js
Contributor
Author
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
chrisbmar
pushed a commit
to chrisbmar/kibana
that referenced
this pull request
Feb 19, 2026
…c#253568) ## Summary Adds an experimental config flag `experimentallyImportZodV4` that changes the generated zod import to `import { z } from '@kbn/zod/v4';`. This is meant as a quick way to unblock the cases workflow integration because workflow schemas use zod v4. There is some work done to migrate larger parts of the Kibana codebase (and this generator) to v4 but it will not finish in time for the workflows integration (elastic/kibana-team#2589). We recommend removing this flag as part of the zod upgrade work. --------- Co-authored-by: Tiago Costa <tiago.costa@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
ersin-erdal
pushed a commit
to ersin-erdal/kibana
that referenced
this pull request
Feb 19, 2026
…c#253568) ## Summary Adds an experimental config flag `experimentallyImportZodV4` that changes the generated zod import to `import { z } from '@kbn/zod/v4';`. This is meant as a quick way to unblock the cases workflow integration because workflow schemas use zod v4. There is some work done to migrate larger parts of the Kibana codebase (and this generator) to v4 but it will not finish in time for the workflows integration (elastic/kibana-team#2589). We recommend removing this flag as part of the zod upgrade work. --------- Co-authored-by: Tiago Costa <tiago.costa@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Contributor
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
janmonschke
added a commit
that referenced
this pull request
Feb 20, 2026
…253568) (#253792) # Backport This will backport the following commits from `main` to `9.3`: - [[Security][OpenAPI generator] add `experimentallyImportZodV4` (#253568)](#253568) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Jan Monschke","email":"jan.monschke@elastic.co"},"sourceCommit":{"committedDate":"2026-02-18T18:21:55Z","message":"[Security][OpenAPI generator] add `experimentallyImportZodV4` (#253568)\n\n## Summary\n\nAdds an experimental config flag `experimentallyImportZodV4` that\nchanges the generated zod import to `import { z } from '@kbn/zod/v4';`.\nThis is meant as a quick way to unblock the cases workflow integration\nbecause workflow schemas use zod v4.\n\nThere is some work done to migrate larger parts of the Kibana codebase\n(and this generator) to v4 but it will not finish in time for the\nworkflows integration\n(elastic/kibana-team#2589). We recommend\nremoving this flag as part of the zod upgrade work.\n\n---------\n\nCo-authored-by: Tiago Costa <tiago.costa@elastic.co>\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"df5b63519032a0abe2fff0b19f23f956f08a2fa3","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","Team:Cases","v9.4.0"],"title":"[Security][OpenAPI generator] add `experimentallyImportZodV4`","number":253568,"url":"https://github.com/elastic/kibana/pull/253568","mergeCommit":{"message":"[Security][OpenAPI generator] add `experimentallyImportZodV4` (#253568)\n\n## Summary\n\nAdds an experimental config flag `experimentallyImportZodV4` that\nchanges the generated zod import to `import { z } from '@kbn/zod/v4';`.\nThis is meant as a quick way to unblock the cases workflow integration\nbecause workflow schemas use zod v4.\n\nThere is some work done to migrate larger parts of the Kibana codebase\n(and this generator) to v4 but it will not finish in time for the\nworkflows integration\n(elastic/kibana-team#2589). We recommend\nremoving this flag as part of the zod upgrade work.\n\n---------\n\nCo-authored-by: Tiago Costa <tiago.costa@elastic.co>\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"df5b63519032a0abe2fff0b19f23f956f08a2fa3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/253568","number":253568,"mergeCommit":{"message":"[Security][OpenAPI generator] add `experimentallyImportZodV4` (#253568)\n\n## Summary\n\nAdds an experimental config flag `experimentallyImportZodV4` that\nchanges the generated zod import to `import { z } from '@kbn/zod/v4';`.\nThis is meant as a quick way to unblock the cases workflow integration\nbecause workflow schemas use zod v4.\n\nThere is some work done to migrate larger parts of the Kibana codebase\n(and this generator) to v4 but it will not finish in time for the\nworkflows integration\n(elastic/kibana-team#2589). We recommend\nremoving this flag as part of the zod upgrade work.\n\n---------\n\nCo-authored-by: Tiago Costa <tiago.costa@elastic.co>\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"df5b63519032a0abe2fff0b19f23f956f08a2fa3"}}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
janmonschke
added a commit
that referenced
this pull request
Feb 27, 2026
## Summary <img width="1212" height="720" alt="image" src="https://github.com/user-attachments/assets/59397721-4024-4877-8781-d7736b1d3628" /> This PR adds ~~five~~four ~~new~~ enhanced case workflow steps: 1. `cases.createCase`: Does not require user to add optional fields, supports adding a connector, better autocompletion 2. `cases.updateCase`: Does not require user to specify a `version`, eliminating the need to fetch the case in the step before. Better autocompletion. 3. `cases.getCase`: Gets a case by id 4. `cases.addCaseComment`: Adds a comment to a case with better autocompletion 5. `cases.createCaseFromTemplate`: Creates a case from an autocompleted case template. What, 5? I thought it was 4!? Well, yes. Technically there are 5 steps in this PR but only 4 of them are activated. `cases.createCaseFromTemplate` depends on workflow improvements mentioned in #253568 (namely `owner` inspection). Note: **all** steps also support pushing the case after completion by setting the `push-case` property to `true`. ## Testing Add the following to your `kibana.dev.yml`: ```yml uiSettings: overrides: bfetch:disableCompression: true workflows:ui:enabled: true ``` I encourage you to check out the code locally and to play around with the workflow feature to get a feel for the autocompletion and how case steps behave. If you notice anything that should be enhanced, add a comment here. Here's a workflow spec that uses all (enabled) case steps: <details> <summary>Click to reveal yaml file</summary> ```yaml name: Case workflow kitchen sink enabled: false description: Tests all the case stes triggers: - type: manual steps: - name: create_case type: cases.createCase push-case: true connector-id: ba236d8b-67fb-47d6-8df8-bba91381beb1 with: description: "Test description" title: "test title" owner: securitySolution settings: syncAlerts: false - name: update_case type: cases.updateCase with: case_id: "{{steps.create_case.output.case.id}}" updates: status: in-progress title: The title changed - name: add_comment type: cases.addComment with: case_id: "{{steps.update_case.output.case.id}}" comment: "Test comment" - name: get_case type: cases.getCase with: case_id: "{{steps.add_comment.output.case.id}}" include_comments: false ``` </details> ## Notes Reach out to me on Slack for cloud env & connector credentials. ## Meta Depends on: #253568 Partially implements: elastic/security-team#15084 Fixes elastic/security-team#15969 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Mykhailo Kondrat <247111948+mykhailokondrat@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
qn895
pushed a commit
to qn895/kibana
that referenced
this pull request
Mar 11, 2026
## Summary <img width="1212" height="720" alt="image" src="https://github.com/user-attachments/assets/59397721-4024-4877-8781-d7736b1d3628" /> This PR adds ~~five~~four ~~new~~ enhanced case workflow steps: 1. `cases.createCase`: Does not require user to add optional fields, supports adding a connector, better autocompletion 2. `cases.updateCase`: Does not require user to specify a `version`, eliminating the need to fetch the case in the step before. Better autocompletion. 3. `cases.getCase`: Gets a case by id 4. `cases.addCaseComment`: Adds a comment to a case with better autocompletion 5. `cases.createCaseFromTemplate`: Creates a case from an autocompleted case template. What, 5? I thought it was 4!? Well, yes. Technically there are 5 steps in this PR but only 4 of them are activated. `cases.createCaseFromTemplate` depends on workflow improvements mentioned in elastic#253568 (namely `owner` inspection). Note: **all** steps also support pushing the case after completion by setting the `push-case` property to `true`. ## Testing Add the following to your `kibana.dev.yml`: ```yml uiSettings: overrides: bfetch:disableCompression: true workflows:ui:enabled: true ``` I encourage you to check out the code locally and to play around with the workflow feature to get a feel for the autocompletion and how case steps behave. If you notice anything that should be enhanced, add a comment here. Here's a workflow spec that uses all (enabled) case steps: <details> <summary>Click to reveal yaml file</summary> ```yaml name: Case workflow kitchen sink enabled: false description: Tests all the case stes triggers: - type: manual steps: - name: create_case type: cases.createCase push-case: true connector-id: ba236d8b-67fb-47d6-8df8-bba91381beb1 with: description: "Test description" title: "test title" owner: securitySolution settings: syncAlerts: false - name: update_case type: cases.updateCase with: case_id: "{{steps.create_case.output.case.id}}" updates: status: in-progress title: The title changed - name: add_comment type: cases.addComment with: case_id: "{{steps.update_case.output.case.id}}" comment: "Test comment" - name: get_case type: cases.getCase with: case_id: "{{steps.add_comment.output.case.id}}" include_comments: false ``` </details> ## Notes Reach out to me on Slack for cloud env & connector credentials. ## Meta Depends on: elastic#253568 Partially implements: elastic/security-team#15084 Fixes elastic/security-team#15969 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Mykhailo Kondrat <247111948+mykhailokondrat@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
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
Adds an experimental config flag
experimentallyImportZodV4that changes the generated zod import toimport { z } from '@kbn/zod/v4';. This is meant as a quick way to unblock the cases workflow integration because workflow schemas use zod v4.There is some work done to migrate larger parts of the Kibana codebase (and this generator) to v4 but it will not finish in time for the workflows integration (https://github.com/elastic/kibana-team/issues/2589). We recommend removing this flag as part of the zod upgrade work.