Skip to content

Failing test: Discover drag and drop - should support dragging and dropping a field onto the grid (with keyboard) #284178

Description

@kibanamachine

A test failed on a tracked branch

Scout Test Details:

Field Value
Test ID 11e9f59685b0708-4f3f7ae3f30246d
Target cloud-serverless-observability_complete
Location src/platform/plugins/shared/discover/test/scout/core/ui/parallel_tests/drag_drop.spec.ts
Duration 7.22s
Module discover (plugin)
Config path src/platform/plugins/shared/discover/test/scout/core/ui/parallel.playwright.config.ts
Code Owners elastic/kibana-data-discovery
Error: SAML callback failed: expected 302, got 401
    at finishSAMLHandshake (src/platform/packages/shared/kbn-test-saml-auth/src/saml_auth.ts:287:11)
    at kbnUsername (src/platform/packages/shared/kbn-test-saml-auth/src/saml_auth.ts:342:35)
    at SamlSessionManager.supportedRoles (src/platform/packages/shared/kbn-test-saml-auth/src/session_manager.ts:79:10)
    at SamlSessionManager.forceNewSession (src/platform/packages/shared/kbn-test-saml-auth/src/session_manager.ts:223:14)
    at SamlSessionManager.getInteractiveUserSessionCookieWithRoleScope (src/platform/packages/shared/kbn-test-saml-auth/src/session_manager.ts:240:24)
    at discoverScoutSpace (src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/test/browser_auth/index.ts:75:27)
    at src/platform/plugins/shared/discover/test/scout/core/ui/parallel_tests/drag_drop.spec.ts:15:32

First failure: appex-qa-serverless-kibana-scout-tests - main

Failure screenshots are available in the Buildkite HTML report and artifacts.

Test history: passes and failures over time

Activity

  1. added
    failed-testA test failure on a tracked branch, potentially flaky-test
    scout-playwrightScout (Playwright) related issues and PRs
    on Aug 10, 2026
  2. added
    Team:DataDiscoveryDiscover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t//
    on Aug 10, 2026
  3. infra-vault-gh-plugin-prod commented on Aug 10, 2026

    @infra-vault-gh-plugin-prod
    Contributor

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

  4. github-actions commented on Aug 10, 2026

    @github-actions
  5. github-actions commented on Aug 10, 2026

    @github-actions
    Contributor

    Closing: transient cloud-serverless auth-service disruption failed SAML session setup across ~74 unrelated tests in this job. Nothing test- or product-related to fix; it will reopen automatically if the test fails again.

  6. kibanamachine commented on Oct 25, 2026

    @kibanamachine
    ContributorAuthor

    New failure for "cloud-stateful-classic" target: appex-qa-stateful-kibana-scout-tests - main

    Test history: passes and failures over time

    New error message:

    TimeoutError: page.kbnUrl: Timeout 20000ms exceeded.
    Call log:
      - navigating to "https://bk-stateful-scout-606-platform-11-classic-a-96cad9.kb.eu-west-1.aws.qa.cld.elstc.co/s/test-space-2/app/discover", waiting until "load"
    
  7. github-actions commented on Oct 25, 2026

    @github-actions
    Contributor

    Test needs an update — navigation gates on the browser load event

    pageObjects.discover.goto() in beforeEach burned Scout's full 20s navigationTimeout inside page.goto(..., waitUntil: "load") while Kibana's bootstrap was still downloading — the failure screenshot is the plain "Loading Elastic" splash, no error, no toast.

    Details

    Proposed fix

    In page_objects/discover/navigation.ts:23-26, stop gating navigation on the document load event and let the readiness wait that already follows it be the gate:

       await this.page.gotoApp(
         'discover',
    -    options.savedSearchId ? { hash: `/view/${options.savedSearchId}` } : undefined
    +    options.savedSearchId ? { hash: `/view/${options.savedSearchId}` } : undefined,
    +    // Resolve once the document commits; `waitForDiscoverPage()` below is the readiness gate.
    +    { waitUntil: 'commit' }
       );
       await this.waitForDiscoverPage();

    This follows Wait for complex UI to finish rendering — the load event is a global, resource-completion indicator, while waitForDiscoverPage() already waits 30s on the component-specific dscPage signal. No timeout bump is needed; the 20s gate is simply redundant with, and narrower than, the correct one. 'domcontentloaded' is the conservative alternative if 'commit' proves too eager.

    Note the blast radius: DiscoverNavigation.goto is shared by every Discover Scout spec, so validate across the Discover configs, not just this one.

    Root cause & evidence

    • The failure screenshot (job Artifacts → HTML report) shows Kibana's "Loading Elastic" splash with the progress bar barely advanced — DOMContentLoaded had already fired, the app shell was rendering, and no error, banner, or toast is present. Nothing was broken; the bootstrap bundles were just still arriving at the 20s mark.
    • The call log pins the gate exactly: navigating to ".../s/test-space-2/app/discover", waiting until "load". gotoApp forwards no options, so Playwright's default waitUntil: 'load' applies under Scout's navigationTimeout: 20000. Test duration was 20.17s — the navigation consumed the entire test.
    • Why it is slow here and not locally: each Playwright test gets a fresh browser context, so every navigation re-downloads Kibana's bootstrap bundles cold from the QA Cloud deployment, with workers: 2 competing for it. 40 of 41 tests in the config passed and the sibling drag_drop case passed minutes earlier, so the deployment was healthy — this is tail latency crossing a gate set 10s below the one that matters.

    Additional context

    • Ruled out: a Discover or product defect (the test body never ran, and the splash shows no app error); state leakage — the test-space-2 teardown logged 1.2s before the failure report is Playwright restarting the worker after the timeout, not a cause; and the earlier ci-environment verdict on this issue, which was a mass SAML 401 incident with a different signature.
    • Verification: node scripts/scout.js run-tests --location cloud --arch stateful --domain classic --config src/platform/plugins/shared/discover/test/scout/core2/ui/parallel.playwright.config.ts. A green flaky-test-runner result would not settle it — the runner cannot reproduce a Cloud deployment's asset latency.

    Note

    Marked "AI-fixable": fix PR incoming within ~20-30 min.

    Generated by Failed Test Investigator for #284178 · claude · opus · 450.4 AIC · ⌖ 56.6 AIC · ⊞ 14.1K · ◷

  8. removed
    failure:ci-environmentFailed test investigator: failure outside test + app (CI agent, deps, network)
    on Oct 25, 2026
  9. added
    ai:fix-flakyFlags this flaky test for an AI agent to fix
    failure:ai-fixableFailed test investigator: a fix is available and a PR can be opened
    failure:test-needs-updateFailed test investigator: failure lives in the test code
    on Oct 25, 2026
  10. github-actions commented on Oct 25, 2026

    @github-actions
    Contributor

    ✅ Flaky Test Fixer completed successfully!

    Generated by Flaky Test Fixer for #284178

  11. github-actions commented on Oct 25, 2026

    @github-actions
    Contributor

    ➡️ A fix PR is ready for review: #300351

    DiscoverNavigation.goto now navigates with waitUntil: 'commit' so the existing waitForDiscoverPage() wait is the only readiness gate, instead of Scout's 20s load-event gate timing out while Kibana's bootstrap assets were still downloading.

    Generated by Flaky Test Fixer for #284178 · claude · opus · 179.3 AIC · ⌖ 56.4 AIC · ⊞ 15.2K · ◷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Team:DataDiscoveryDiscover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t//failed-testA test failure on a tracked branch, potentially flaky-testfailure:ai-fixableFailed test investigator: a fix is available and a PR can be openedfailure:test-needs-updateFailed test investigator: failure lives in the test codescout-playwrightScout (Playwright) related issues and PRs

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions