Skip to content

[Discover] Fix ES|QL extra fetches#237949

Closed
davismcphee wants to merge 3 commits intoelastic:mainfrom
davismcphee:fix-esql-request-count
Closed

[Discover] Fix ES|QL extra fetches#237949
davismcphee wants to merge 3 commits intoelastic:mainfrom
davismcphee:fix-esql-request-count

Conversation

@davismcphee
Copy link
Copy Markdown
Contributor

Summary

WIP.

Checklist

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • 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.

@davismcphee davismcphee self-assigned this Oct 7, 2025
@davismcphee davismcphee 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.2.0 v9.3.0 labels Oct 7, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Oct 7, 2025

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

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

[❌] src/platform/test/functional/apps/discover/group3/config.ts: 5/50 tests passed.

see run history

@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Oct 8, 2025

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #58 / discover/group3 discover request counts ES|QL mode should send 2 requests (documents + chart) when refreshing
  • [job] [logs] FTR Configs #58 / discover/group3 discover request counts ES|QL mode should send 2 requests (documents + chart) when refreshing

Metrics [docs]

✅ unchanged

History

cc @davismcphee

@kertal
Copy link
Copy Markdown
Member

kertal commented Oct 9, 2025

FYI @davismcphee attempting to solve the extra fetching request count and because we chatted about this
@drewdaemon mentioned yesterday, that this might be easier with Scout
High likely we should not migrate now, but good to know
#236481

@davismcphee
Copy link
Copy Markdown
Contributor Author

@kertal Oh that sounds promising. Especially considering any approach I've found for FTR is pretty hacky. @drewdaemon Could you share more info on how we could track in flight requests with Scout?

@drewdaemon
Copy link
Copy Markdown
Contributor

drewdaemon commented Oct 10, 2025

@davismcphee I think you can do it via a CDPSession object which lets you use the Chrome Devtools Protocol directly

test('request count', async ({ page, context }) => {
  const cdp = await context.newCDPSession(page);
  await cdp.send('Network.enable');
  cdp.on('Network.requestWillBeSent', (event) => { // doc: https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-requestWillBeSent
    if (/* check event.request.url */) {
      // count requests
    }
  });

  // load page and wait for something relevant

  // assert
});

kudos to @dmlemeshko who pointed this out to me

@davismcphee davismcphee deleted the fix-esql-request-count branch February 19, 2026 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels 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.2.0 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants