Skip to content

Align Automatic Migrations connector resolution with Assistant and Agent Builder#259840

Open
logeekal wants to merge 2 commits intoelastic:mainfrom
logeekal:fix/connector_id_spec_change
Open

Align Automatic Migrations connector resolution with Assistant and Agent Builder#259840
logeekal wants to merge 2 commits intoelastic:mainfrom
logeekal:fix/connector_id_spec_change

Conversation

@logeekal
Copy link
Contributor

@logeekal logeekal commented Mar 26, 2026

Summary

Aligns Automatic Migrations (SIEM Migrations) with the same connector resolution scheme used by Assistant and Agent Builder.

After #258530, Automatic Migrations was still using the old connector loading path (loadAllActions from triggers-actions-ui), which returns preconfigured connector YAML keys (e.g., Anthropic-Claude-Opus-4-6) as connector IDs. This meant the connectorId passed to naturalLanguageToEsql was a model_id (old scheme) instead of the inference_id, resulting in a Saved object [action/.anthropic-claude-4.6-opus-chat_completion] not found error.

This PR switches Automatic Migrations to use the inference plugin's connector resolution (same as Assistant and Agent Builder), which returns inference_id-based connector IDs.

Changes

  • Frontend: Replaced useAIConnectors / loadAiConnectors with useLoadConnectors / loadConnectorsForFeature from @kbn/inference-connectors (scoped to featureId: 'siem_migrations')
  • Backend: Replaced actionsClient.get() with inferenceClient.getConnectorById() in rules and dashboards start routes
  • @kbn/inference-connectors: Extracted loadConnectorsForFeature as a reusable stateless function from useLoadConnectors

Test plan

  • Select a preconfigured inference connector in the SIEM Migrations onboarding card
  • Start a rule migration — should succeed without "saved object not found" error
  • Start a dashboard migration — same
  • Verify connector selection persists across modal reopens (via localStorage)

--
Made with Cursor

…ent Builder

Switch SIEM Migrations from the old loadAllActions connector loading path
(which returns preconfigured YAML keys as IDs) to the inference plugin's
connector resolution (which returns inference_id-based connector IDs),
fixing "Saved object not found" errors with preconfigured inference connectors.

Made-with: Cursor
@logeekal logeekal requested a review from sphilipse March 26, 2026 17:26
@logeekal logeekal added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting v9.4.0 labels Mar 26, 2026
@logeekal logeekal marked this pull request as ready for review March 26, 2026 17:55
@logeekal logeekal requested review from a team as code owners March 26, 2026 17:55
@elasticmachine
Copy link
Contributor

elasticmachine commented Mar 26, 2026

⏳ Build in-progress, with failures

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #31 / @ess @serverless SecuritySolution Automatic Migrations @ess @serverless SecuritySolution Automatic Rule Migrations Start Migration error scenarios should reject if connector_id is incorrect
  • [job] [logs] FTR Configs #178 / @ess @serverless SecuritySolution Automatic Migrations @ess @serverless SecuritySolution Automatic Rule Migrations Start Migration error scenarios should reject if connector_id is incorrect
  • [job] [logs] FTR Configs #31 / @ess @serverless SecuritySolution Automatic Migrations @ess @serverless SecuritySolution Automatic Rule Migrations Start Migration error scenarios should reject if connector_id is incorrect
  • [job] [logs] FTR Configs #178 / @ess @serverless SecuritySolution Automatic Migrations @ess @serverless SecuritySolution Automatic Rule Migrations Start Migration error scenarios should reject if connector_id is incorrect

History

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 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants