Skip to content

[streams][background tasks] gracefully handle non existing stream#254683

Merged
klacabane merged 2 commits intoelastic:mainfrom
klacabane:457-stream-deleted-before-task-starts
Feb 24, 2026
Merged

[streams][background tasks] gracefully handle non existing stream#254683
klacabane merged 2 commits intoelastic:mainfrom
klacabane:457-stream-deleted-before-task-starts

Conversation

@klacabane
Copy link
Copy Markdown
Contributor

Summary

It is possible for a stream to be deleted before a registered background task starts (eg query generation).
This change gracefully handles this case to prevent throwing an error.

@klacabane klacabane requested review from a team as code owners February 24, 2026 10:50
@klacabane klacabane added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. Feature:SigEvents Significant events feature, related to streams and rules/alerts (RnA) labels Feb 24, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/actionable-obs-team (Team:actionable-obs)

@miltonhultgren
Copy link
Copy Markdown
Contributor

Should we add the same check to the onboarding task?

The Insight generation task filters by existing streams so it should be safe.

@klacabane klacabane enabled auto-merge (squash) February 24, 2026 11:14
@klacabane klacabane merged commit 813a0e6 into elastic:main Feb 24, 2026
16 checks passed
@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #1 / discover responsive sidebar search bar customization should not render CustomDataViewPicker
  • [job] [logs] Jest Tests #10 / EndpointScriptEditForm Editing should show file required validation error when fake file picker is removed (and no file is uploaded)

Metrics [docs]

✅ unchanged

History

mbondyra added a commit to rgodfrey-elastic/kibana that referenced this pull request Feb 24, 2026
…ps-config-rebase

* commit 'f135f030951237c5e9b0251931441aee3121b31d': (163 commits)
  [CPS] Support data view requests and do not sanitize project_routing in data plugin/resolve indices  (elastic#253654)
  [One Workflow] Execute workflow from historical (elastic#253396)
  [streams][background tasks] gracefully handle non existing stream (elastic#254683)
  [Lens API] Waffle/Mosaic get green as a default color (elastic#254304)
  [Security Solution] Remove prebuilt rules customization callout on Rule Management page (elastic#254386)
  [Workflows] support passing attachments to run_agent step (elastic#251291)
  [One Discover][Logs UX] Update OpenTelemetry Semantic Conventions (elastic#254367)
  [kbn-es] Add --docker flag to yarn es snapshot (elastic#254306)
  [Workplace AI] Remove Data Source Config (elastic#254521)
  [Entity Store v2] Add CRUD API (elastic#252052)
  [CI] Increase type checking machine (elastic#254676)
  [main] Sync bundled packages with Package Storage (elastic#254232)
  Skip flaky test elastic#254625 (elastic#254662)
  Upgrade `@elastic/elasticsearch` to 9.3.1 (elastic#253660)
  [One Workflow] Migrate http step to new connector (elastic#249004)
  [Entity Store] Store EUID Scripts (elastic#254515)
  [APM] Fix Otel missing fields undefined errors (elastic#254271)
  [Console] Add support for documentation links on Serverless (elastic#254489)
  Create edit ILM flow (elastic#253393)
  [Agent Builder] Mid term: minimal recommended model set elastic#12875 (elastic#254560)
  ...
nreese pushed a commit to nreese/kibana that referenced this pull request Feb 25, 2026
…astic#254683)

## Summary

It is possible for a stream to be deleted before a registered background
task starts (eg query generation).
This change gracefully handles this case to prevent throwing an error.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
qn895 pushed a commit to qn895/kibana that referenced this pull request Mar 11, 2026
…astic#254683)

## Summary

It is possible for a stream to be deleted before a registered background
task starts (eg query generation).
This change gracefully handles this case to prevent throwing an error.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
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:SigEvents Significant events feature, related to streams and rules/alerts (RnA) release_note:skip Skip the PR/issue when compiling release notes Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Streams] Feature identification task should handle deleted streams gracefully

4 participants