Skip to content

[One Workflow] Deprecate legacy Cases step types in workflow authoring#262070

Merged
Kiryous merged 8 commits intoelastic:mainfrom
Kiryous:workflows-step-deprecation-followup
Apr 14, 2026
Merged

[One Workflow] Deprecate legacy Cases step types in workflow authoring#262070
Kiryous merged 8 commits intoelastic:mainfrom
Kiryous:workflows-step-deprecation-followup

Conversation

@Kiryous
Copy link
Copy Markdown
Contributor

@Kiryous Kiryous commented Apr 8, 2026

Closes https://github.com/elastic/security-team/issues/16736

Summary

Hide the legacy kibana.* Cases steps from workflow authoring surfaces and warn when existing workflows still use them.
Keep deprecated step metadata shared so the editor and agent tooling can steer users toward the cases.* replacements consistently.

Screenshots

kibana.createCase marked as deprecated

Screenshot 2026-04-08 at 16 44 43

Agent Builder

Listing cases steps Showing the step as deprecated
Screenshot 2026-04-08 at 23 13 34 Screenshot 2026-04-08 at 16 57 09

Kiryous added 3 commits April 8, 2026 19:43
Add deprecation metadata to shared workflow step contracts and cache the merged lookup so authoring surfaces can reason about legacy steps consistently. This keeps replacement guidance in one place while preserving schema-level metadata for downstream consumers.

Made-with: Cursor
Filter deprecated step types out of picker and autocomplete results while keeping existing workflows valid. Add a dedicated deprecated-step warning and suppress duplicate alias hover text so users see one clear migration message.

Made-with: Cursor
Hide deprecated steps from default step-definition discovery while still returning them for exact legacy lookups or explicit includeDeprecated requests. This steers agent authoring toward preferred step types without breaking maintenance flows for existing workflows.

Made-with: Cursor
@Kiryous Kiryous added Team:One Workflow Team label for One Workflow (Workflow automation) release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Apr 8, 2026
@Kiryous Kiryous self-assigned this Apr 8, 2026
@Kiryous Kiryous requested a review from Copilot April 8, 2026 16:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR deprecates and hides legacy kibana.* Cases step types from workflow authoring surfaces by default, while still surfacing deprecation metadata (message + replacement step type) for exact lookups and legacy workflow maintenance.

Changes:

  • Add shared deprecation metadata + message generation for step types (connectors, built-ins, and legacy aliases).
  • Exclude deprecated steps from broad discovery/autocomplete/actions-menu results unless explicitly requested.
  • Add client-side YAML validation + hover behavior to warn on deprecated step usage and avoid hover duplication noise.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/platform/plugins/shared/workflows_management/server/agent_builder/tools/get_step_definitions_tool.ts Adds deprecation metadata to step definitions and filters deprecated steps from discovery unless included explicitly.
src/platform/plugins/shared/workflows_management/server/agent_builder/tools/get_step_definitions_tool.test.ts Tests default exclusion + explicit inclusion and exact lookup behavior for deprecated steps.
src/platform/plugins/shared/workflows_management/server/agent_builder/skills/workflow_authoring_skill.ts Documents how to query deprecated steps for legacy workflow maintenance.
src/platform/plugins/shared/workflows_management/server/agent_builder/attachments/workflow_yaml_attachment.ts Updates attachment authoring guidance to account for deprecated-step discovery behavior.
src/platform/plugins/shared/workflows_management/public/widgets/workflow_yaml_editor/lib/monaco_providers/unified_hover_provider.ts Suppresses hover fall-through near deprecated-step validation markers.
src/platform/plugins/shared/workflows_management/public/widgets/workflow_yaml_editor/lib/monaco_providers/unified_hover_provider.test.ts Adds coverage for deprecated-step hover deduplication behavior.
src/platform/plugins/shared/workflows_management/public/widgets/workflow_yaml_editor/lib/autocomplete/get_completion_item_provider.ts Filters deprecated step types from autocomplete using shared metadata map.
src/platform/plugins/shared/workflows_management/public/widgets/workflow_yaml_editor/lib/autocomplete/get_completion_item_provider.test.ts Tests deprecated-step filtering for both workflow and YAML provider suggestions.
src/platform/plugins/shared/workflows_management/public/features/validate_workflow_yaml/model/types.ts Introduces a deprecated-step validation result type + marker owner.
src/platform/plugins/shared/workflows_management/public/features/validate_workflow_yaml/lib/validate_deprecated_step_types.ts Adds validation that emits warnings for deprecated step types in YAML.
src/platform/plugins/shared/workflows_management/public/features/validate_workflow_yaml/lib/validate_deprecated_step_types.test.ts Tests deprecated-step validation warnings and non-deprecated behavior.
src/platform/plugins/shared/workflows_management/public/features/validate_workflow_yaml/lib/use_yaml_validation.ts Wires deprecated-step validation into the existing validation pipeline.
src/platform/plugins/shared/workflows_management/public/features/actions_menu_popover/lib/get_action_options.ts Hides deprecated connectors from the actions menu using shared metadata map.
src/platform/plugins/shared/workflows_management/public/features/actions_menu_popover/lib/get_action_options.test.ts Tests that deprecated connectors are not shown in the actions menu.
src/platform/plugins/shared/workflows_management/common/step_schemas.ts Adds caching for deprecated-step metadata computed from connectors/built-ins.
src/platform/plugins/shared/workflows_management/common/schema.ts Computes and caches a unified deprecated-step metadata map.
src/platform/packages/shared/kbn-workflows/types/v1.ts Extends connector contracts with optional deprecation metadata.
src/platform/packages/shared/kbn-workflows/spec/step_definition_types.ts Extends base step definitions with optional deprecation metadata field.
src/platform/packages/shared/kbn-workflows/spec/lib/get_workflow_json_schema.kibana.test.ts Verifies shared deprecation messaging is used in generated schema for alias types.
src/platform/packages/shared/kbn-workflows/spec/lib/generate_yaml_schema_from_connectors.ts Uses shared deprecation messaging for legacy alias schema descriptions.
src/platform/packages/shared/kbn-workflows/spec/kibana/index.ts Ensures Kibana connectors include deprecation metadata (from shared map if missing).
src/platform/packages/shared/kbn-workflows/spec/deprecated_step_metadata.ts Adds shared deprecation metadata + message builder utilities.
src/platform/packages/shared/kbn-workflows/index.ts Re-exports deprecated step metadata utilities for downstream consumers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/platform/plugins/shared/workflows_management/common/schema.ts Outdated
Kiryous added 2 commits April 8, 2026 23:12
Resolve deprecated Kibana step aliases to their canonical connector type so editor decorations and hover details stay consistent, while avoiding duplicate deprecation copy and stray tech preview badges.

Made-with: Cursor
Freeze cached deprecated step metadata, defer deprecated marker lookups until after custom hover handling, and include the manual duplicate-header cleanup from the deprecated step validation test.

Made-with: Cursor
@Kiryous Kiryous marked this pull request as ready for review April 8, 2026 19:38
@Kiryous Kiryous requested a review from a team as a code owner April 8, 2026 19:38
@elasticmachine
Copy link
Copy Markdown
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

cc @Kiryous

…ation-followup

# Conflicts:
#	src/platform/plugins/shared/workflows_management/server/agent_builder/attachments/workflow_yaml_attachment.ts
Copy link
Copy Markdown
Contributor

@semd semd left a comment

Choose a reason for hiding this comment

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

Tested locally
LGTM! 🚀

@Kiryous Kiryous added backport:version Backport to applied version labels v9.4.0 and removed backport:skip This PR does not require backporting labels Apr 14, 2026
@Kiryous Kiryous merged commit 15d8c4a into elastic:main Apr 14, 2026
22 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.4

https://github.com/elastic/kibana/actions/runs/24402035645

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 14, 2026
elastic#262070)

Closes elastic/security-team#16736

## Summary
Hide the legacy `kibana.*` Cases steps from workflow authoring surfaces
and warn when existing workflows still use them.
Keep deprecated step metadata shared so the editor and agent tooling can
steer users toward the `cases.*` replacements consistently.

## Screenshots
### `kibana.createCase` marked as deprecated
<img width="884" height="237" alt="Screenshot 2026-04-08 at 16 44 43"
src="https://github.com/user-attachments/assets/ae137fb8-4d2e-4053-a528-79ec5ce0e976"
/>

### Agent Builder
| Listing cases steps | Showing the step as deprecated |
|--------|--------|
| <img width="657" height="1132" alt="Screenshot 2026-04-08 at 23 13 34"
src="https://github.com/user-attachments/assets/dda3523a-f305-43ce-841a-2191d0dbad39"
/> | <img width="380" height="573" alt="Screenshot 2026-04-08 at 16 57
09"
src="https://github.com/user-attachments/assets/5c962eec-adcd-4590-acd2-1f5f08248201"
/> |

(cherry picked from commit 15d8c4a)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
9.4

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

mbondyra added a commit to mbondyra/kibana that referenced this pull request Apr 14, 2026
* commit '11ed3645c5ededae2a6e29f2a79b31f52208b441': (157 commits)
  remove sync register uiAction methods (elastic#254590)
  [performance] Apply minimal auth to the search route (elastic#257497)
  [ES|QL] Reports correctly the controls server side errors (elastic#263020)
  [SecuritySolution][Navigation] Enable classic nav updates (elastic#262358)
  [Inference] Use pretty name and logo on feature settings page (elastic#262531)
  [Security Solution] fix AT-AB cypress test (elastic#262991)
  [SigEvents] Seed sigevents env script (elastic#261172)
  Adjust conditions for validating no refetch for expanded row (elastic#262978)
  [Agent Builder] update copy for the announcement modal (elastic#263034)
  [Search] Hide index management links for users without privileges (elastic#262627)
  Simplify OAS schema for GET `/api/spaces/space` query params (elastic#260831)
  Fix fleet output OAS regressions: SSL type explosion and Kafka union wrappers (elastic#260842)
  [Dashboards in chat] fix agent confusing the axes in a horizontal chat (elastic#263064)
  [One Workflow] Add alert state checkbox UI for workflow connector (elastic#259770)
  [One Workflow] Deprecate legacy Cases step types in workflow authoring (elastic#262070)
  skip failing test suite (elastic#248090)
  fix flaky test: MonitorDetails filter apply button not enabled (elastic#260788)
  fix: propagate AbortSignal to executeAsReasoningAgent for task cancellation (elastic#262811)
  [Security Solution][Alert KPI] Fix white space bug in alert KPIs (elastic#260803)
  [Streams] Move helpers and format_size_unit to utils folder (elastic#262550)
  ...

# Conflicts:
#	x-pack/platform/plugins/shared/dashboard_agent/public/attachment_types/canvas_integration/dashboard_canvas_content.test.tsx
#	x-pack/platform/plugins/shared/dashboard_agent/public/attachment_types/canvas_integration/dashboard_canvas_content.tsx
#	x-pack/platform/plugins/shared/dashboard_agent/public/attachment_types/canvas_integration/use_register_canvas_action_buttons.ts
#	x-pack/platform/plugins/shared/dashboard_agent/public/attachment_types/index.test.tsx
#	x-pack/platform/plugins/shared/dashboard_agent/public/attachment_types/index.tsx
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Apr 15, 2026
@kibanamachine
Copy link
Copy Markdown
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.
cc: @Kiryous

@kibanamachine
Copy link
Copy Markdown
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.
cc: @Kiryous

kibanamachine added a commit that referenced this pull request Apr 17, 2026
…thoring (#262070) (#263084)

# Backport

This will backport the following commits from `main` to `9.4`:
- [[One Workflow] Deprecate legacy Cases step types in workflow
authoring (#262070)](#262070)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Kirill
Chernakov","email":"yakiryous@gmail.com"},"sourceCommit":{"committedDate":"2026-04-14T13:35:34Z","message":"[One
Workflow] Deprecate legacy Cases step types in workflow authoring
(#262070)\n\nCloses
https://github.com/elastic/security-team/issues/16736\n\n##
Summary\nHide the legacy `kibana.*` Cases steps from workflow authoring
surfaces\nand warn when existing workflows still use them.\nKeep
deprecated step metadata shared so the editor and agent tooling
can\nsteer users toward the `cases.*` replacements consistently.\n\n##
Screenshots\n### `kibana.createCase` marked as deprecated\n<img
width=\"884\" height=\"237\" alt=\"Screenshot 2026-04-08 at 16 44
43\"\nsrc=\"https://github.com/user-attachments/assets/ae137fb8-4d2e-4053-a528-79ec5ce0e976\"\n/>\n\n###
Agent Builder\n| Listing cases steps | Showing the step as deprecated
|\n|--------|--------|\n| <img width=\"657\" height=\"1132\"
alt=\"Screenshot 2026-04-08 at 23 13
34\"\nsrc=\"https://github.com/user-attachments/assets/dda3523a-f305-43ce-841a-2191d0dbad39\"\n/>
| <img width=\"380\" height=\"573\" alt=\"Screenshot 2026-04-08 at 16
57\n09\"\nsrc=\"https://github.com/user-attachments/assets/5c962eec-adcd-4590-acd2-1f5f08248201\"\n/>
|","sha":"15d8c4ade2a96a38b68d7db4e415ecbb71aa27db","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","Team:One
Workflow","v9.4.0","v9.5.0"],"title":"[One Workflow] Deprecate legacy
Cases step types in workflow
authoring","number":262070,"url":"https://github.com/elastic/kibana/pull/262070","mergeCommit":{"message":"[One
Workflow] Deprecate legacy Cases step types in workflow authoring
(#262070)\n\nCloses
https://github.com/elastic/security-team/issues/16736\n\n##
Summary\nHide the legacy `kibana.*` Cases steps from workflow authoring
surfaces\nand warn when existing workflows still use them.\nKeep
deprecated step metadata shared so the editor and agent tooling
can\nsteer users toward the `cases.*` replacements consistently.\n\n##
Screenshots\n### `kibana.createCase` marked as deprecated\n<img
width=\"884\" height=\"237\" alt=\"Screenshot 2026-04-08 at 16 44
43\"\nsrc=\"https://github.com/user-attachments/assets/ae137fb8-4d2e-4053-a528-79ec5ce0e976\"\n/>\n\n###
Agent Builder\n| Listing cases steps | Showing the step as deprecated
|\n|--------|--------|\n| <img width=\"657\" height=\"1132\"
alt=\"Screenshot 2026-04-08 at 23 13
34\"\nsrc=\"https://github.com/user-attachments/assets/dda3523a-f305-43ce-841a-2191d0dbad39\"\n/>
| <img width=\"380\" height=\"573\" alt=\"Screenshot 2026-04-08 at 16
57\n09\"\nsrc=\"https://github.com/user-attachments/assets/5c962eec-adcd-4590-acd2-1f5f08248201\"\n/>
|","sha":"15d8c4ade2a96a38b68d7db4e415ecbb71aa27db"}},"sourceBranch":"main","suggestedTargetBranches":["9.4"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/262070","number":262070,"mergeCommit":{"message":"[One
Workflow] Deprecate legacy Cases step types in workflow authoring
(#262070)\n\nCloses
https://github.com/elastic/security-team/issues/16736\n\n##
Summary\nHide the legacy `kibana.*` Cases steps from workflow authoring
surfaces\nand warn when existing workflows still use them.\nKeep
deprecated step metadata shared so the editor and agent tooling
can\nsteer users toward the `cases.*` replacements consistently.\n\n##
Screenshots\n### `kibana.createCase` marked as deprecated\n<img
width=\"884\" height=\"237\" alt=\"Screenshot 2026-04-08 at 16 44
43\"\nsrc=\"https://github.com/user-attachments/assets/ae137fb8-4d2e-4053-a528-79ec5ce0e976\"\n/>\n\n###
Agent Builder\n| Listing cases steps | Showing the step as deprecated
|\n|--------|--------|\n| <img width=\"657\" height=\"1132\"
alt=\"Screenshot 2026-04-08 at 23 13
34\"\nsrc=\"https://github.com/user-attachments/assets/dda3523a-f305-43ce-841a-2191d0dbad39\"\n/>
| <img width=\"380\" height=\"573\" alt=\"Screenshot 2026-04-08 at 16
57\n09\"\nsrc=\"https://github.com/user-attachments/assets/5c962eec-adcd-4590-acd2-1f5f08248201\"\n/>
|","sha":"15d8c4ade2a96a38b68d7db4e415ecbb71aa27db"}}]}] BACKPORT-->

Co-authored-by: Kirill Chernakov <yakiryous@gmail.com>
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Apr 17, 2026
@Kiryous Kiryous added backport:skip This PR does not require backporting and removed backport:version Backport to applied version labels labels Apr 17, 2026
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 release_note:skip Skip the PR/issue when compiling release notes Team:One Workflow Team label for One Workflow (Workflow automation) v9.4.0 v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants