Skip to content

[Data grid][Scout] Use data view mode#267978

Merged
AlexGPlay merged 4 commits into
elastic:mainfrom
AlexGPlay:266912-use-data-view-mode
May 8, 2026
Merged

[Data grid][Scout] Use data view mode#267978
AlexGPlay merged 4 commits into
elastic:mainfrom
AlexGPlay:266912-use-data-view-mode

Conversation

@AlexGPlay
Copy link
Copy Markdown
Contributor

@AlexGPlay AlexGPlay commented May 6, 2026

Summary

Closes #266912
Closes #266907
Closes #266909
Closes #266910
Closes #266904
Closes #266906
Closes #266911
Closes #266908
Closes #266905
Closes #266903

The latest failures for all the core scout suite in discover points out to discover loading in ESQL mode, to mitigate this a new method has been added to transition to classic view if needed and is now run in the before each.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

@AlexGPlay AlexGPlay self-assigned this May 6, 2026
@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#12136

[✅] src/platform/plugins/shared/discover/test/scout/ui/parallel.playwright.config.ts (--arch stateful --domain classic): 30/30 tests passed.
[✅] src/platform/plugins/shared/discover/test/scout/ui/parallel.playwright.config.ts (--arch serverless --domain search): 30/30 tests passed.
[❌] src/platform/plugins/shared/discover/test/scout/ui/parallel.playwright.config.ts (--arch serverless --domain observability_complete): 29/30 tests passed.
[✅] src/platform/plugins/shared/discover/test/scout/ui/parallel.playwright.config.ts (--arch serverless --domain security_complete): 30/30 tests passed.

see run history

@AlexGPlay AlexGPlay changed the title Use data view mode [Data grid][Scout] Use data view mode May 7, 2026
@AlexGPlay
Copy link
Copy Markdown
Contributor Author

FYI: The flaky test runner passed, the one that didn't was because a docker pull failed, not a real test issue

@AlexGPlay AlexGPlay added release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// backport:version Backport to applied version labels v9.4.1 v9.5.0 labels May 7, 2026
@AlexGPlay AlexGPlay marked this pull request as ready for review May 7, 2026 06:35
@AlexGPlay AlexGPlay requested review from a team as code owners May 7, 2026 06:35
@infra-vault-gh-plugin-prod
Copy link
Copy Markdown

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

}
}

getCurrentTab() {
Copy link
Copy Markdown
Contributor

@jughosta jughosta May 7, 2026

Choose a reason for hiding this comment

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

Can we introduce another class for unifiedTabs helpers so other teams can also use it for other Kibana pages? The equivalent in functional tests is src/platform/test/functional/page_objects/unified_tabs.ts.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i've simplified this for now, just using local storage to set the query mode - i can create a follow up pr with a unified tabs page object if that sounds good

// Privileged user is needed to save the search used by the embeddable test.
await browserAuth.loginAsPrivilegedUser();
await pageObjects.discover.setQueryMode('classic');
await pageObjects.discover.goto();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We could also make it as a parameter for goto. Example:

await pageObjects.discover.goto('classic');

Just an idea.

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#12153

[✅] src/platform/plugins/shared/discover/test/scout/ui/parallel.playwright.config.ts (--arch stateful --domain classic): 30/30 tests passed.
[✅] src/platform/plugins/shared/discover/test/scout/ui/parallel.playwright.config.ts (--arch serverless --domain search): 30/30 tests passed.
[✅] src/platform/plugins/shared/discover/test/scout/ui/parallel.playwright.config.ts (--arch serverless --domain observability_complete): 30/30 tests passed.
[✅] src/platform/plugins/shared/discover/test/scout/ui/parallel.playwright.config.ts (--arch serverless --domain security_complete): 30/30 tests passed.

see run history

Copy link
Copy Markdown
Contributor

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

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

lgtm

@kibanamachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #26 / alerting api integration security and spaces enabled - Group 13 Alerts update space_1_all_alerts_none_actions at space1 should handle updates for a long running alert type without failing the underlying tasks due to invalidated ApiKey
  • [job] [logs] Scout Lane #39 - serverless-observability_complete / default / local-serverless-observability_complete - Serverless Observability Navigation - Complete tier body - clicking body nav items sets the active link, updates breadcrumbs, and navigates

Metrics [docs]

✅ unchanged

History

cc @AlexGPlay

@AlexGPlay AlexGPlay merged commit e85fcb5 into elastic:main May 8, 2026
31 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.4

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

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
9.4 Backport failed because of merge conflicts

You might need to backport the following PRs to 9.4:
- [scout] fix cleanup in SO managerment find test (#268349)
- test: stabilize serverless Observability Scout navigation and service map (#268240)

Manual backport

To create the backport manually run:

node scripts/backport --pr 267978

Questions ?

Please refer to the Backport tool documentation

@AlexGPlay AlexGPlay added backport:skip This PR does not require backporting and removed backport:version Backport to applied version labels v9.4.1 labels May 8, 2026
@AlexGPlay
Copy link
Copy Markdown
Contributor Author

Removed backport - this tests only exist in 9.5 😄

rStelmach added a commit to rStelmach/kibana that referenced this pull request May 11, 2026
…al helper

Replaces the streams-local forceClassicDiscoverMode helper with
pageObjects.discover.setQueryMode('classic') from kbn-scout's DiscoverApp,
added in elastic#267978. Same outcome, no duplicated DISCOVER_QUERY_MODE_KEY
constant, no drift risk if Discover renames the storage key.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
rStelmach added a commit that referenced this pull request May 12, 2026
#268518)

## Summary

Adds per-test `pageObjects.discover.setQueryMode('classic')` call before
navigation. Tests that depend on Discover starting in Data view mode now
declare that requirement explicitly.

Inspired by #267978 - that PR added the `setQueryMode` primitive to
`kbn-scout`'s `DiscoverApp` page object to fix the same root cause in
Discover's own Scout suite. This PR adopts the same primitive for the
`streams_app` Scout suite.

- Three specs (`discover_integration_classic`,
`discover_integration_wired`, `esql_source_enrichment`) call
`pageObjects.discover.setQueryMode('classic')` from `test.beforeEach`.
No production code changes.
- Reverts `tests/global.setup.ts` to its pre-#268493 form so the suite
no longer pins the flag globally — unblocks future ES|QL-default
coverage in the same suite.

Fixes #246886
Fixes #265663

## Background

The MKI QA serverless environment turned on `discover.isEsqlDefault`,
which makes the observability root profile boot Discover into ES|QL with
a default query (added in #257268). The affected tests assumed Data view
mode by deployment default and broke once the flag flipped. The
workaround (#268493) silenced the streams_app suite; this PR makes the
dependency explicit per test instead, using the shared `setQueryMode`
helper introduced in #267978.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
js-jankisalvi pushed a commit to js-jankisalvi/kibana that referenced this pull request May 12, 2026
## Summary

Closes elastic#266912
Closes elastic#266907
Closes elastic#266909
Closes elastic#266910
Closes elastic#266904
Closes elastic#266906
Closes elastic#266911
Closes elastic#266908
Closes elastic#266905
Closes elastic#266903

The latest failures for all the core scout suite in discover points out
to discover loading in ESQL mode, to mitigate this a new method has been
added to transition to classic view if needed and is now run in the
before each.


### 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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [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.
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 13, 2026
elastic#268518)

## Summary

Adds per-test `pageObjects.discover.setQueryMode('classic')` call before
navigation. Tests that depend on Discover starting in Data view mode now
declare that requirement explicitly.

Inspired by elastic#267978 - that PR added the `setQueryMode` primitive to
`kbn-scout`'s `DiscoverApp` page object to fix the same root cause in
Discover's own Scout suite. This PR adopts the same primitive for the
`streams_app` Scout suite.

- Three specs (`discover_integration_classic`,
`discover_integration_wired`, `esql_source_enrichment`) call
`pageObjects.discover.setQueryMode('classic')` from `test.beforeEach`.
No production code changes.
- Reverts `tests/global.setup.ts` to its pre-elastic#268493 form so the suite
no longer pins the flag globally — unblocks future ES|QL-default
coverage in the same suite.

Fixes elastic#246886
Fixes elastic#265663

## Background

The MKI QA serverless environment turned on `discover.isEsqlDefault`,
which makes the observability root profile boot Discover into ES|QL with
a default query (added in elastic#257268). The affected tests assumed Data view
mode by deployment default and broke once the flag flipped. The
workaround (elastic#268493) silenced the streams_app suite; this PR makes the
dependency explicit per test instead, using the shared `setQueryMode`
helper introduced in elastic#267978.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.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 release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// v9.5.0

Projects

None yet

5 participants