Skip to content

[Background search] Enable by default#242105

Merged
AlexGPlay merged 9 commits intoelastic:mainfrom
AlexGPlay:236543-enable-bgs
Dec 5, 2025
Merged

[Background search] Enable by default#242105
AlexGPlay merged 9 commits intoelastic:mainfrom
AlexGPlay:236543-enable-bgs

Conversation

@AlexGPlay
Copy link
Contributor

@AlexGPlay AlexGPlay commented Nov 6, 2025

Summary

Closes #236543

Enables by default background search in all the environments.

With this we get access by default to the background search feature, this allows users to run long running queries asynchronously while they continue using Kibana normally.

image

Users can also access their backgrounded searches and see the current status of each of them or open them once they are completed.

image (1) image

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Unit or functional tests were updated or added to match the most common scenarios
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.
@AlexGPlay AlexGPlay self-assigned this Nov 6, 2025
@AlexGPlay AlexGPlay added the ci:cloud-deploy Create or update a Cloud deployment label Nov 10, 2025
@AlexGPlay AlexGPlay force-pushed the 236543-enable-bgs branch 2 times, most recently from 9f2ddae to 3f002ce Compare November 13, 2025 08:08
@AlexGPlay AlexGPlay added the ci:project-deploy-observability Create an Observability project label Nov 13, 2025
@github-actions
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@AlexGPlay AlexGPlay added ci:project-deploy-security Create a Security Serverless Project and removed ci:project-deploy-observability Create an Observability project labels Nov 13, 2025
@kibanamachine
Copy link
Contributor

Cloud deployment initiated, see credentials at: https://buildkite.com/elastic/kibana-deploy-cloud-from-pr/builds/559

@AlexGPlay AlexGPlay added ci:project-deploy-observability Create an Observability project and removed ci:project-deploy-security Create a Security Serverless Project labels Nov 19, 2025
@github-actions
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@AlexGPlay
Copy link
Contributor Author

/oblt-deploy

@AlexGPlay
Copy link
Contributor Author

Confirmed with the oblt serverless deploy + cloud deploy that it's enabled with this changes

import type { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services';
import type { SavedObjectsFindResponse } from '@kbn/core/server';
import { FtrService } from '@kbn/test-suites-src/functional/ftr_provider_context';
import { FtrService } from '../ftr_provider_context';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i've moved this from the x-pack functional services folder to the base functional services so I can reuse it in the serverless tests - happy to do it in some other way if this is not ideal

'svlCommonPage',
]);

describe('Discover background search', function () {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i can't do a real test of storing/recovering a background search because delay can't be used in ESQL in this tests and stall_time_seconds can be used in classic either so i'm just adding some basic tests to ensure that the feature is present

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, makes sense... this is a real bummer, maybe we can bring this up to the team and see if there are any options here.

Copy link
Member

Choose a reason for hiding this comment

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

To quickly follow up, we might get support from ES side here, so we should be able to treat serverless and stateful the same way

@AlexGPlay AlexGPlay added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Project:AsyncSearch Background search, partial results, async search services. Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// Feature:BackgroundSearch Background search feature used in Discover, Dashboard, etc. labels Nov 20, 2025
@AlexGPlay AlexGPlay marked this pull request as ready for review November 20, 2025 10:00
@AlexGPlay AlexGPlay requested review from a team as code owners November 20, 2025 10:00
@AlexGPlay AlexGPlay requested review from a team as code owners November 20, 2025 10:00
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@kertal
Copy link
Member

kertal commented Nov 20, 2025

🥳 @AlexGPlay I think with this PR we should do another round of testing then @ninoslavmiskovic @lukasolson, also checking for serverless

@jeramysoucy jeramysoucy self-requested a review November 24, 2025 12:09
Copy link
Contributor

@jeramysoucy jeramysoucy left a comment

Choose a reason for hiding this comment

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

Kibana security changes LGTM

Copy link
Contributor

@lukasolson lukasolson left a comment

Choose a reason for hiding this comment

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

LGTM, did some testing on the provided instance but it was limited for the same reason we are missing a functional test here to verify actual saving/loading. Let's bring this up with the team and see if there are any other options.

/src/platform/test/functional/services/field_editor.ts @elastic/kibana-data-discovery
/src/platform/test/functional/services/embedding.ts @elastic/appex-qa
/src/platform/test/functional/services/data_grid.ts @elastic/kibana-data-discovery
/src/platform/test/functional/services/search_sessions.ts @elastic/search-kibana
Copy link
Contributor

Choose a reason for hiding this comment

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

This is odd, shouldn't this be our team? I don't know why it was search before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, that seemed weird - i can reassign that to us if it makes sense

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I think it makes sense to reassign to us


for (const privilege of subFeaturesPrivileges.values()) {
if (privilege.id === 'store_search_session') expect(privilege.disabled).not.toBe(true);
else expect(privilege.disabled).toBe(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this an explicit decision we made to show this privilege? It probably makes sense, just wanted to make sure.

'svlCommonPage',
]);

describe('Discover background search', function () {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, makes sense... this is a real bummer, maybe we can bring this up to the team and see if there are any options here.

Copy link
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

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

config/serverless.yaml LGTM

Copy link
Member

@pheyos pheyos left a comment

Choose a reason for hiding this comment

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

Test service relocation and serverless test config changes LGTM

@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 4, 2025

⏳ Build in-progress

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #129 / integrations For each artifact list under management "after all" hook in "For each artifact list under management"

History

cc @AlexGPlay

Copy link
Contributor

@ninoslavmiskovic ninoslavmiskovic left a comment

Choose a reason for hiding this comment

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

LGTM

@AlexGPlay AlexGPlay merged commit 64f3946 into elastic:main Dec 5, 2025
12 checks passed
wildemat pushed a commit to wildemat/kibana that referenced this pull request Dec 5, 2025
## Summary

Closes elastic#236543

Enables by default background search in all the environments.

With this we get access by default to the background search feature,
this allows users to run long running queries asynchronously while they
continue using Kibana normally.

<img width="1875" height="971" alt="image"
src="https://github.com/user-attachments/assets/fe34fd9d-cc2c-45c8-84d7-4fc76f62f16f"
/>

Users can also access their backgrounded searches and see the current
status of each of them or open them once they are completed.

<img width="1875" height="971" alt="image (1)"
src="https://github.com/user-attachments/assets/8113b476-4719-4bc1-88b3-bddbc224091d"
/>

<img width="1878" height="972" alt="image"
src="https://github.com/user-attachments/assets/25af3be3-e88e-4e51-aca6-fc21cf1660f2"
/>


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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
- [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/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
JordanSh pushed a commit to JordanSh/kibana that referenced this pull request Dec 9, 2025
## Summary

Closes elastic#236543

Enables by default background search in all the environments.

With this we get access by default to the background search feature,
this allows users to run long running queries asynchronously while they
continue using Kibana normally.

<img width="1875" height="971" alt="image"
src="https://github.com/user-attachments/assets/fe34fd9d-cc2c-45c8-84d7-4fc76f62f16f"
/>

Users can also access their backgrounded searches and see the current
status of each of them or open them once they are completed.

<img width="1875" height="971" alt="image (1)"
src="https://github.com/user-attachments/assets/8113b476-4719-4bc1-88b3-bddbc224091d"
/>

<img width="1878" height="972" alt="image"
src="https://github.com/user-attachments/assets/25af3be3-e88e-4e51-aca6-fc21cf1660f2"
/>


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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
- [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/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.
@davismcphee davismcphee added release_note:feature Makes this part of the condensed release notes and removed release_note:skip Skip the PR/issue when compiling release notes labels Dec 10, 2025
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 ci:cloud-deploy Create or update a Cloud deployment ci:project-deploy-observability Create an Observability project Feature:BackgroundSearch Background search feature used in Discover, Dashboard, etc. needs_docs Project:AsyncSearch Background search, partial results, async search services. release_note:feature Makes this part of the condensed release notes Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// v9.3.0