Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLAKY ON MKI] x-pack/test_serverless/api_integration/test_suites/common/reporting/datastream.ts #198811

Closed
wayneseymour opened this issue Nov 4, 2024 · 2 comments · Fixed by #199018
Assignees
Labels
Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) test-failure-flaky

Comments

@wayneseymour
Copy link
Member

wayneseymour commented Nov 4, 2024

Summary

Reporting Data Stream "before all" hook for "uses the datastream configuration" failing more than once on MKI

Possibly Related:

Reporting should work with token based authentication

Config

x-pack/test_serverless/api_integration/test_suites/security/common_configs/config.group1.ts

Error message

Error: Timeout of 360000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/root/.qaf/data/git/kibana/x-pack/test_serverless/api_integration/test_suites/common/reporting/datastream.ts)
    at listOnTimeout (node:internal/timers:573:17)
    at processTimers (node:internal/timers:514:7) {
  code: 'ERR_MOCHA_TIMEOUT',
  timeout: 360000,
  file: '/root/.qaf/data/git/kibana/x-pack/test_serverless/api_integration/test_suites/common/reporting/datastream.ts'
}

Notes

System out
[00:00:00]  
[00:12:05]             └-: Reporting
[00:12:05]               └-> "before all" hook: beforeTestSuite.trigger in "Reporting"
[00:19:50]               └-: Data Stream
[00:19:50]                 └-> "before all" hook: beforeTestSuite.trigger for "uses the datastream configuration"
[00:19:50]                 └-> "before all" hook for "uses the datastream configuration"
[00:19:51]                   │ debg Created API key for role: [admin]
[00:19:51]                   │ debg Requesting url (redacted): [https://bk-serverless-ftr-3259-7d6ba6ea205a-a762dd.kb.eu-west-1.aws.qa.elastic.cloud/api/status]
...

SUCCEEDS IN IMPORTING DATA

...

[00:19:56]                   │ debg POST request to /internal/reporting/generate/csv_searchsource
[00:20:01]                   │ info ReportingAPI.createReportJobInternal created report job 03b0269e-0984-4410-bcc0-b8b4b449a75a
[00:20:01]                   │ debg Waiting up to 600000ms for job /api/reporting/jobs/download/03b0269e-0984-4410-bcc0-b8b4b449a75a finished...
[00:20:01]                   │ debg Report at path /api/reporting/jobs/download/03b0269e-0984-4410-bcc0-b8b4b449a75a is pending
...

PRINTED MANY TIMES
...
[00:20:53]                   │ debg Report at path /api/reporting/jobs/download/03b0269e-0984-4410-bcc0-b8b4b449a75a is pending
[00:20:56]                   │ debg --- retry.waitForWithTimeout error: Report at path /api/reporting/jobs/download/03b0269e-0984-4410-bcc0-b8b4b449a75a has failed - Attempt #: 0
...

FAILS OVER AND OVER

...
[00:25:50]                   │ debg --- retry.waitForWithTimeout failed again with the same message... - Attempt #: 0
[00:25:50]                   └- ✖ fail: Reporting Data Stream "before all" hook for "uses the datastream configuration"
[00:25:50]                   │      Error: Timeout of 360000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/root/.qaf/data/git/kibana/x-pack/test_serverless/api_integration/test_suites/common/reporting/datastream.ts)
[00:25:50]                   │       at listOnTimeout (node:internal/timers:573:17)
[00:25:50]                   │       at processTimers (node:internal/timers:514:7)

It looks like waitForJobToFinish hit's HTTP 500 and HTTP 503, based on the logs

Those codes make me feel like something could be wrong on the server.

@wayneseymour wayneseymour added Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) test-failure-flaky labels Nov 4, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@tsullivan
Copy link
Member

It looks like waitForJobToFinish hit's HTTP 500 and HTTP 503, based on the logs

These are expected status codes for jobs that take awhile to complete but ultimately fail.

This test exports 2 rows of CSV, so most of the time (almost 6 minutes) would be waiting for Task Manager to trigger the report task for execution.

wayneseymour added a commit that referenced this issue Nov 5, 2024
…mon/reporting/datastream.ts` (#198813)

See details: #198811

---------

Co-authored-by: Robert Oskamp <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) test-failure-flaky
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants