elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.71k stars 8.13k forks source link

Failing test: Security Solution Cypress.x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_persistent_state·cy·ts - Rules table: persistent state while on a happy path "before each" hook for "loads from the url" "before each" hook for "loads from the url" #179477

Open kibanamachine opened 5 months ago

kibanamachine commented 5 months ago

A test failed on a tracked branch

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

https://system_indices_superuser:changeme@localhost:9278/.lists-*,.items-*,.alerts-security.alerts-*/_delete_by_query?conflicts=proceed&scroll_size=10000&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:9278/.lists-*,.items-*,.alerts-security.alerts-*/_delete_by_query?conflicts=proceed&scroll_size=10000&refresh
Headers: {
  "Connection": "keep-alive",
  "kbn-xsrf": "cypress-creds",
  "x-elastic-internal-origin": "security-solution",
  "elastic-api-version": [
    "2023-10-31"
  ],
  "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Cypress/13.6.3 Chrome/114.0.5735.289 Electron/25.8.4 Safari/537.36",
  "accept": "*/*",
  "authorization": "Basic c3lzdGVtX2luZGljZXNfc3VwZXJ1c2VyOmNoYW5nZW1l",
  "accept-encoding": "gzip, deflate",
  "content-type": "application/json",
  "content-length": 26
}
Body: {"query":{"match_all":{}}}

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

The response we got was:

Status: 503 - Service Unavailable
Headers: {
  "x-elastic-product": "Elasticsearch",
  "elastic-api-version": "2023-10-31",
  "content-type": "application/json",
  "content-length": "506"
}
Body: {
  "error": {
    "root_cause": [
      {
        "type": "no_shard_available_action_exception",
        "reason": "[es02][172.18.0.4:9300][indices:data/read/search[phase/query]]"
      }
    ],
    "type": "search_phase_execution_exception",
    "reason": "Partial shards failure",
    "phase": "query",
    "grouped": true,
    "failed_shards": [
      {
        "shard": 0,
        "index": ".ds-.items-default-2024.03.26-000001",
        "node": "kvKyMXyDT2SgdK1r5Jn1Hg",
        "reason": {
"type": "no_shard_available_action_exception",
"reason": "[es02][172.18.0.4:9300][indices:data/read/search[phase/query]]"
        }
      }
    ]
  },
  "status": 503
}

https://on.cypress.io/request

Because this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Rules table: persistent state`
    at <unknown> (http://localhost:5650/__cypress/runner/cypress_runner.js:133030:72)
    at tryCatcher (http://localhost:5650/__cypress/runner/cypress_runner.js:1807:23)
    at Promise._settlePromiseFromHandler (http://localhost:5650/__cypress/runner/cypress_runner.js:1519:31)
    at Promise._settlePromise (http://localhost:5650/__cypress/runner/cypress_runner.js:1576:18)
    at Promise._settlePromise0 (http://localhost:5650/__cypress/runner/cypress_runner.js:1621:10)
    at Promise._settlePromises (http://localhost:5650/__cypress/runner/cypress_runner.js:1701:18)
    at _drainQueueStep (http://localhost:5650/__cypress/runner/cypress_runner.js:2407:12)
    at _drainQueue (http://localhost:5650/__cypress/runner/cypress_runner.js:2400:9)
    at Async._drainQueues (http://localhost:5650/__cypress/runner/cypress_runner.js:2416:5)
    at Async.drainQueues (http://localhost:5650/__cypress/runner/cypress_runner.js:2286:14)
From Your Spec Code:
    at rootRequest (webpack:///./tasks/api_calls/common.ts:32:5)
    at deleteAllDocuments (webpack:///./tasks/api_calls/elasticsearch.ts:28:14)
    at deleteAlertsAndRules (webpack:///./tasks/api_calls/common.ts:55:22)
    at Context.eval (webpack:///./e2e/detection_response/rule_management/rules_table/rules_table_persistent_state.cy.ts:101:25)

First failure: CI Build - main

elasticmachine commented 5 months ago

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

elasticmachine commented 5 months ago

Pinging @elastic/security-solution (Team: SecuritySolution)

elasticmachine commented 5 months ago

Pinging @elastic/security-detections-response (Team:Detections and Resp)

banderror commented 5 months ago

This doesn't look like a legit flake caused by the test itself. Likely it's a sporadic network error. I'll add this ticket to our backlog but close it for now. If the failure reoccurs, we'll investigate it.

kibanamachine commented 5 months ago

New failure: CI Build - main