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

Failing test: Security Solution Cypress.x-pack/test/security_solution_cypress/cypress/e2e/investigations/timeline_templates/creation·cy·ts - Timeline Templates "before all" hook for "Creates a timeline template" "before all" hook for "Creates a timeline template" #165738

Closed
kibanamachine opened this issue Sep 5, 2023 · 2 comments · Fixed by #173206
Assignees
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:Threat Hunting:Investigations Security Solution Investigations Team

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Sep 5, 2023

A test failed on a tracked branch

CypressError: `cy.request()` failed on:

https://system_indices_superuser:changeme@localhost:9224/.kibana_*/_delete_by_query?conflicts=proceed&refresh

The response we received from your web server was:

  > 503: Service Unavailable

This was considered a failure because the status code was not `2xx` or `3xx`.

If you do not want status codes to cause failures pass the option: `failOnStatusCode: false`

-----------------------------------------------------------

The request we sent was:

Method: POST
URL: https://system_indices_superuser:changeme@localhost:9224/.kibana_*/_delete_by_query?conflicts=proceed&refresh
Headers: {
  "Connection": "keep-alive",
  "kbn-xsrf": "cypress",
  "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/116.0.5845.140 Safari/537.36",
  "accept": "*/*",
  "authorization": "Basic c3lzdGVtX2luZGljZXNfc3VwZXJ1c2VyOmNoYW5nZW1l",
  "accept-encoding": "gzip, deflate",
  "content-type": "application/json",
  "content-length": 58
}
Body: {"query":{"bool":{"filter":[{"match":{"type":"alert"}}]}}}

-----------------------------------------------------------

The response we got was:

Status: 503 - Service Unavailable
Headers: {
  "warning": "299 Elasticsearch-8.11.0-SNAPSHOT-9c69b72390def3f75dff8eed617351152fa7e8ae \"this request accesses system indices: [.kibana_1, .kibana_alerting_cases_1, .kibana_analytics_1, .kibana_ingest_1, .kibana_security_session_1, .kibana_security_solution_1, .kibana_task_manager_1], but in a future major version, direct access to system indices will be prevented by default\"",
  "x-elastic-product": "Elasticsearch",
  "elastic-api-version": "2023-10-31",
  "content-type": "application/json",
  "content-length": "423"
}
Body: {
  "error": {
    "root_cause": [],
    "type": "search_phase_execution_exception",
    "reason": "start",
    "phase": "can_match",
    "grouped": true,
    "failed_shards": [],
    "caused_by": {
      "type": "search_phase_execution_exception",
      "reason": "Search rejected due to missing shards [[.kibana_security_session_1][0]]. Consider using `allow_partial_search_results` setting to bypass this error.",
      "phase": "can_match",
      "grouped": true,
      "failed_shards": []
    }
  },
  "status": 503
}


https://on.cypress.io/request

Because this error occurred during a `before all` hook we are skipping the remaining tests in the current suite: `Timeline Templates`

Although you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail
    at <unknown> (https://localhost:5629/__cypress/runner/cypress_runner.js:149154:80)
    at tryCatcher (https://localhost:5629/__cypress/runner/cypress_runner.js:18744:23)
    at Promise._settlePromiseFromHandler (https://localhost:5629/__cypress/runner/cypress_runner.js:16679:31)
    at Promise._settlePromise (https://localhost:5629/__cypress/runner/cypress_runner.js:16736:18)
    at Promise._settlePromise0 (https://localhost:5629/__cypress/runner/cypress_runner.js:16781:10)
    at Promise._settlePromises (https://localhost:5629/__cypress/runner/cypress_runner.js:16861:18)
    at _drainQueueStep (https://localhost:5629/__cypress/runner/cypress_runner.js:13451:12)
    at _drainQueue (https://localhost:5629/__cypress/runner/cypress_runner.js:13444:9)
    at ../../node_modules/bluebird/js/release/async.js.Async._drainQueues (https://localhost:5629/__cypress/runner/cypress_runner.js:13460:5)
    at Async.drainQueues (https://localhost:5629/__cypress/runner/cypress_runner.js:13330:14)
From Your Spec Code:
    at rootRequest (webpack:///./tasks/common.ts:32:5)
    at deleteAlertsAndRules (webpack:///./tasks/common.ts:120:2)
    at cleanKibana (webpack:///./tasks/common.ts:95:2)
    at Context.eval (webpack:///./e2e/investigations/timeline_templates/creation.cy.ts:53:15)

First failure: CI Build - main

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Sep 5, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Sep 5, 2023
@kibanamachine kibanamachine added the Team:Threat Hunting:Investigations Security Solution Investigations Team label Sep 5, 2023
@botelastic botelastic bot removed the needs-team Issues missing a team label label Sep 5, 2023
@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

janmonschke added a commit that referenced this issue Dec 14, 2023
## Summary

Fixes #165738

Fixes the flaky timeline template tests. Some of the test code wasn't
valid anymore (e.g. notes in timeline templates), so I removed those and
cleaned up the now unnecessary code.

[Flaky test runner
results](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4563)
([flaky runner results before requested
changes](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4520))

---------

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:Threat Hunting:Investigations Security Solution Investigations Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants