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/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console·cy·ts - Response console User journey for Isolate command: isolate and release an endpoint "after all" hook for "should isolate host from response console" "after all" hook for "should isolate host from response console" #168360

Closed
kibanamachine opened this issue Oct 9, 2023 · 1 comment · Fixed by #168438
Assignees
Labels
failed-test A test failure on a tracked branch, potentially flaky-test Team:Defend Workflows “EDR Workflows” sub-team of Security Solution

Comments

@kibanamachine
Copy link
Contributor

A test failed on a tracked branch

CypressError: `cy.task('deleteIndexedFleetEndpointPolicies')` failed with the following error:

> Request failed with status code 500

https://on.cypress.io/api/task

Because this error occurred during a `after all` hook we are skipping the remaining tests in the current suite: `User journey for Isolate co...`

Although you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail
    at <unknown> (http://localhost:5640/__cypress/runner/cypress_runner.js:135296:70)
    at tryCatcher (http://localhost:5640/__cypress/runner/cypress_runner.js:1807:23)
    at Promise._settlePromiseFromHandler (http://localhost:5640/__cypress/runner/cypress_runner.js:1519:31)
    at Promise._settlePromise (http://localhost:5640/__cypress/runner/cypress_runner.js:1576:18)
    at Promise._settlePromise0 (http://localhost:5640/__cypress/runner/cypress_runner.js:1621:10)
    at Promise._settlePromises (http://localhost:5640/__cypress/runner/cypress_runner.js:1697:18)
    at _drainQueueStep (http://localhost:5640/__cypress/runner/cypress_runner.js:2407:12)
    at _drainQueue (http://localhost:5640/__cypress/runner/cypress_runner.js:2400:9)
    at Async._drainQueues (http://localhost:5640/__cypress/runner/cypress_runner.js:2416:5)
    at Async.drainQueues (http://localhost:5640/__cypress/runner/cypress_runner.js:2286:14)
From Your Spec Code:
    at Context.eval (webpack:///./e2e/response_actions/response_console.cy.ts:62:11)

From Node.js Internals:
  Error: Request failed with status code 500
      at wrapErrorIfNeeded (/opt/local-ssd/buildkite/builds/kb-n2-4-virt-a7e973f02359c3f8/elastic/kibana-on-merge/kibana/x-pack/plugins/security_solution/common/endpoint/data_loaders/utils.ts:25:7)
      at wrapErrorAndRejectPromise (/opt/local-ssd/buildkite/builds/kb-n2-4-virt-a7e973f02359c3f8/elastic/kibana-on-merge/kibana/x-pack/plugins/security_solution/common/endpoint/data_loaders/utils.ts:28:92)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async deleteIndexedFleetEndpointPolicies (/opt/local-ssd/buildkite/builds/kb-n2-4-virt-a7e973f02359c3f8/elastic/kibana-on-merge/kibana/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_fleet_endpoint_policy.ts:166:12)

First failure: CI Build - main

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Oct 9, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Oct 9, 2023
@kibanamachine kibanamachine added the Team:Defend Workflows “EDR Workflows” sub-team of Security Solution label Oct 9, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-defend-workflows (Team:Defend Workflows)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Oct 9, 2023
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Oct 11, 2023
…168438)

This pull request extends the agent fleet check timeout from 2 minutes
to 4 minutes. We've identified a number of unreliable tests that fail
during the `beforeAll` stage while executing the `createEndpointHost`
task. The following logs appear before the timeout:

```
info Enrolling Elastic Agent with Fleet
  | Installing service....... DONE
  | Starting service... DONE
  | Enrolling Elastic Agent with Fleet..........Successfully enrolled the Elastic Agent.
  | Elastic Agent has been successfully installed.
  | info Waiting for Agent to check-in with Fleet
```

The error message we encounter is `> Timed out waiting for host
[test-host-4981] to appear in Fleet.`

It appears that all the preceding steps are successful, and only the
final one fails due to either the agent not checking in with the fleet
for 2 minutes or the agent being unhealthy for two minutes. Since I
haven't been able to replicate this behavior locally, and there isn't a
way to inspect what's happening on the agent, I believe the best course
of action at this point is to extend the timeout and monitor the
results.

Reports of this error:
closes elastic#168427
closes elastic#168394
closes elastic#168393
closes elastic#168390
closes elastic#168363
closes elastic#168362
closes elastic#168361
closes elastic#168360
closes elastic#168359

Affected CI runs:
https://buildkite.com/elastic/kibana-on-merge/builds/36483
https://buildkite.com/elastic/kibana-on-merge/builds/36497
https://buildkite.com/elastic/kibana-on-merge/builds/36501
https://buildkite.com/elastic/kibana-on-merge/builds/36526

Another time out happens from time to time when previously set 10
minutes timeout on `createEndpointHost` task is not enough to set up the
environment. Its portrayed below, timeout happens during agent setup
```
  | default: Running: inline script
  | default: Reading package lists...
  | default: Building dependency tree...
  | default: Reading state information...
  | default: Suggested packages:
  | default:   zip
  | default: The following NEW packages will be installed:
  | default:   unzip
  | default: 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  | default: Need to get 174 kB of archives.
  | default: After this operation, 385 kB of additional disk space will be used.
  | default: Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 unzip amd64 6.0-26ubuntu3.1 [174 kB]
  | default: dpkg-preconfigure: unable to re-open stdin: No such file or directory
  | default: Fetched 174 kB in 1s (210 kB/s)
  | default: Selecting previously unselected package unzip.
  | (Reading database ... 63961 files and directories currently installed.)
  | default: Preparing to unpack .../unzip_6.0-26ubuntu3.1_amd64.deb ...
  | default: Unpacking unzip (6.0-26ubuntu3.1) ...
  | default: Setting up unzip (6.0-26ubuntu3.1) ...
  | default: Processing triggers for man-db (2.10.2-1) ...
  |  
  | CypressError: `cy.task('createEndpointHost')` timed out after waiting `600000ms`.
```

(cherry picked from commit 91cdbe2)
kibanamachine referenced this issue Oct 11, 2023
…168438) (#168614)

# Backport

This will backport the following commits from `main` to `8.11`:
- [[EDR Workflows][E2E] Increase the timeout of agent check in
(#168438)](#168438)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Konrad
Szwarc","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-10-11T14:26:45Z","message":"[EDR
Workflows][E2E] Increase the timeout of agent check in (#168438)\n\nThis
pull request extends the agent fleet check timeout from 2 minutes\r\nto
4 minutes. We've identified a number of unreliable tests that
fail\r\nduring the `beforeAll` stage while executing the
`createEndpointHost`\r\ntask. The following logs appear before the
timeout:\r\n\r\n```\r\ninfo Enrolling Elastic Agent with Fleet\r\n |
Installing service....... DONE\r\n | Starting service... DONE\r\n |
Enrolling Elastic Agent with Fleet..........Successfully enrolled the
Elastic Agent.\r\n | Elastic Agent has been successfully installed.\r\n
| info Waiting for Agent to check-in with Fleet\r\n```\r\n\r\nThe error
message we encounter is `> Timed out waiting for
host\r\n[test-host-4981] to appear in Fleet.`\r\n\r\nIt appears that all
the preceding steps are successful, and only the\r\nfinal one fails due
to either the agent not checking in with the fleet\r\nfor 2 minutes or
the agent being unhealthy for two minutes. Since I\r\nhaven't been able
to replicate this behavior locally, and there isn't a\r\nway to inspect
what's happening on the agent, I believe the best course\r\nof action at
this point is to extend the timeout and monitor
the\r\nresults.\r\n\r\nReports of this error:\r\ncloses
https://github.com/elastic/kibana/issues/168427\r\ncloses
https://github.com/elastic/kibana/issues/168394\r\ncloses
https://github.com/elastic/kibana/issues/168393\r\ncloses
https://github.com/elastic/kibana/issues/168390\r\ncloses
https://github.com/elastic/kibana/issues/168363\r\ncloses
https://github.com/elastic/kibana/issues/168362\r\ncloses
https://github.com/elastic/kibana/issues/168361\r\ncloses
https://github.com/elastic/kibana/issues/168360\r\ncloses
https://github.com/elastic/kibana/issues/168359\r\n\r\nAffected CI
runs:\r\nhttps://buildkite.com/elastic/kibana-on-merge/builds/36483\r\nhttps://buildkite.com/elastic/kibana-on-merge/builds/36497\r\nhttps://buildkite.com/elastic/kibana-on-merge/builds/36501\r\nhttps://buildkite.com/elastic/kibana-on-merge/builds/36526\r\n\r\nAnother
time out happens from time to time when previously set 10\r\nminutes
timeout on `createEndpointHost` task is not enough to set up
the\r\nenvironment. Its portrayed below, timeout happens during agent
setup\r\n```\r\n  | default: Running: inline script\r\n  | default:
Reading package lists...\r\n  | default: Building dependency
tree...\r\n  | default: Reading state information...\r\n  | default:
Suggested packages:\r\n  | default: zip\r\n  | default: The following
NEW packages will be installed:\r\n  | default: unzip\r\n  | default: 0
upgraded, 1 newly installed, 0 to remove and 0 not upgraded.\r\n  |
default: Need to get 174 kB of archives.\r\n  | default: After this
operation, 385 kB of additional disk space will be used.\r\n  | default:
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 unzip
amd64 6.0-26ubuntu3.1 [174 kB]\r\n  | default: dpkg-preconfigure: unable
to re-open stdin: No such file or directory\r\n  | default: Fetched 174
kB in 1s (210 kB/s)\r\n  | default: Selecting previously unselected
package unzip.\r\n  | (Reading database ... 63961 files and directories
currently installed.)\r\n  | default: Preparing to unpack
.../unzip_6.0-26ubuntu3.1_amd64.deb ...\r\n  | default: Unpacking unzip
(6.0-26ubuntu3.1) ...\r\n  | default: Setting up unzip (6.0-26ubuntu3.1)
...\r\n  | default: Processing triggers for man-db (2.10.2-1) ...\r\n  |
 \r\n  | CypressError: `cy.task('createEndpointHost')` timed out after
waiting
`600000ms`.\r\n```","sha":"91cdbe2d354100683b5d8670de88e0b2cf665ba9","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Defend
Workflows","v8.11.0","v8.12.0"],"number":168438,"url":"https://github.com/elastic/kibana/pull/168438","mergeCommit":{"message":"[EDR
Workflows][E2E] Increase the timeout of agent check in (#168438)\n\nThis
pull request extends the agent fleet check timeout from 2 minutes\r\nto
4 minutes. We've identified a number of unreliable tests that
fail\r\nduring the `beforeAll` stage while executing the
`createEndpointHost`\r\ntask. The following logs appear before the
timeout:\r\n\r\n```\r\ninfo Enrolling Elastic Agent with Fleet\r\n |
Installing service....... DONE\r\n | Starting service... DONE\r\n |
Enrolling Elastic Agent with Fleet..........Successfully enrolled the
Elastic Agent.\r\n | Elastic Agent has been successfully installed.\r\n
| info Waiting for Agent to check-in with Fleet\r\n```\r\n\r\nThe error
message we encounter is `> Timed out waiting for
host\r\n[test-host-4981] to appear in Fleet.`\r\n\r\nIt appears that all
the preceding steps are successful, and only the\r\nfinal one fails due
to either the agent not checking in with the fleet\r\nfor 2 minutes or
the agent being unhealthy for two minutes. Since I\r\nhaven't been able
to replicate this behavior locally, and there isn't a\r\nway to inspect
what's happening on the agent, I believe the best course\r\nof action at
this point is to extend the timeout and monitor
the\r\nresults.\r\n\r\nReports of this error:\r\ncloses
https://github.com/elastic/kibana/issues/168427\r\ncloses
https://github.com/elastic/kibana/issues/168394\r\ncloses
https://github.com/elastic/kibana/issues/168393\r\ncloses
https://github.com/elastic/kibana/issues/168390\r\ncloses
https://github.com/elastic/kibana/issues/168363\r\ncloses
https://github.com/elastic/kibana/issues/168362\r\ncloses
https://github.com/elastic/kibana/issues/168361\r\ncloses
https://github.com/elastic/kibana/issues/168360\r\ncloses
https://github.com/elastic/kibana/issues/168359\r\n\r\nAffected CI
runs:\r\nhttps://buildkite.com/elastic/kibana-on-merge/builds/36483\r\nhttps://buildkite.com/elastic/kibana-on-merge/builds/36497\r\nhttps://buildkite.com/elastic/kibana-on-merge/builds/36501\r\nhttps://buildkite.com/elastic/kibana-on-merge/builds/36526\r\n\r\nAnother
time out happens from time to time when previously set 10\r\nminutes
timeout on `createEndpointHost` task is not enough to set up
the\r\nenvironment. Its portrayed below, timeout happens during agent
setup\r\n```\r\n  | default: Running: inline script\r\n  | default:
Reading package lists...\r\n  | default: Building dependency
tree...\r\n  | default: Reading state information...\r\n  | default:
Suggested packages:\r\n  | default: zip\r\n  | default: The following
NEW packages will be installed:\r\n  | default: unzip\r\n  | default: 0
upgraded, 1 newly installed, 0 to remove and 0 not upgraded.\r\n  |
default: Need to get 174 kB of archives.\r\n  | default: After this
operation, 385 kB of additional disk space will be used.\r\n  | default:
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 unzip
amd64 6.0-26ubuntu3.1 [174 kB]\r\n  | default: dpkg-preconfigure: unable
to re-open stdin: No such file or directory\r\n  | default: Fetched 174
kB in 1s (210 kB/s)\r\n  | default: Selecting previously unselected
package unzip.\r\n  | (Reading database ... 63961 files and directories
currently installed.)\r\n  | default: Preparing to unpack
.../unzip_6.0-26ubuntu3.1_amd64.deb ...\r\n  | default: Unpacking unzip
(6.0-26ubuntu3.1) ...\r\n  | default: Setting up unzip (6.0-26ubuntu3.1)
...\r\n  | default: Processing triggers for man-db (2.10.2-1) ...\r\n  |
 \r\n  | CypressError: `cy.task('createEndpointHost')` timed out after
waiting
`600000ms`.\r\n```","sha":"91cdbe2d354100683b5d8670de88e0b2cf665ba9"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/168438","number":168438,"mergeCommit":{"message":"[EDR
Workflows][E2E] Increase the timeout of agent check in (#168438)\n\nThis
pull request extends the agent fleet check timeout from 2 minutes\r\nto
4 minutes. We've identified a number of unreliable tests that
fail\r\nduring the `beforeAll` stage while executing the
`createEndpointHost`\r\ntask. The following logs appear before the
timeout:\r\n\r\n```\r\ninfo Enrolling Elastic Agent with Fleet\r\n |
Installing service....... DONE\r\n | Starting service... DONE\r\n |
Enrolling Elastic Agent with Fleet..........Successfully enrolled the
Elastic Agent.\r\n | Elastic Agent has been successfully installed.\r\n
| info Waiting for Agent to check-in with Fleet\r\n```\r\n\r\nThe error
message we encounter is `> Timed out waiting for
host\r\n[test-host-4981] to appear in Fleet.`\r\n\r\nIt appears that all
the preceding steps are successful, and only the\r\nfinal one fails due
to either the agent not checking in with the fleet\r\nfor 2 minutes or
the agent being unhealthy for two minutes. Since I\r\nhaven't been able
to replicate this behavior locally, and there isn't a\r\nway to inspect
what's happening on the agent, I believe the best course\r\nof action at
this point is to extend the timeout and monitor
the\r\nresults.\r\n\r\nReports of this error:\r\ncloses
https://github.com/elastic/kibana/issues/168427\r\ncloses
https://github.com/elastic/kibana/issues/168394\r\ncloses
https://github.com/elastic/kibana/issues/168393\r\ncloses
https://github.com/elastic/kibana/issues/168390\r\ncloses
https://github.com/elastic/kibana/issues/168363\r\ncloses
https://github.com/elastic/kibana/issues/168362\r\ncloses
https://github.com/elastic/kibana/issues/168361\r\ncloses
https://github.com/elastic/kibana/issues/168360\r\ncloses
https://github.com/elastic/kibana/issues/168359\r\n\r\nAffected CI
runs:\r\nhttps://buildkite.com/elastic/kibana-on-merge/builds/36483\r\nhttps://buildkite.com/elastic/kibana-on-merge/builds/36497\r\nhttps://buildkite.com/elastic/kibana-on-merge/builds/36501\r\nhttps://buildkite.com/elastic/kibana-on-merge/builds/36526\r\n\r\nAnother
time out happens from time to time when previously set 10\r\nminutes
timeout on `createEndpointHost` task is not enough to set up
the\r\nenvironment. Its portrayed below, timeout happens during agent
setup\r\n```\r\n  | default: Running: inline script\r\n  | default:
Reading package lists...\r\n  | default: Building dependency
tree...\r\n  | default: Reading state information...\r\n  | default:
Suggested packages:\r\n  | default: zip\r\n  | default: The following
NEW packages will be installed:\r\n  | default: unzip\r\n  | default: 0
upgraded, 1 newly installed, 0 to remove and 0 not upgraded.\r\n  |
default: Need to get 174 kB of archives.\r\n  | default: After this
operation, 385 kB of additional disk space will be used.\r\n  | default:
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 unzip
amd64 6.0-26ubuntu3.1 [174 kB]\r\n  | default: dpkg-preconfigure: unable
to re-open stdin: No such file or directory\r\n  | default: Fetched 174
kB in 1s (210 kB/s)\r\n  | default: Selecting previously unselected
package unzip.\r\n  | (Reading database ... 63961 files and directories
currently installed.)\r\n  | default: Preparing to unpack
.../unzip_6.0-26ubuntu3.1_amd64.deb ...\r\n  | default: Unpacking unzip
(6.0-26ubuntu3.1) ...\r\n  | default: Setting up unzip (6.0-26ubuntu3.1)
...\r\n  | default: Processing triggers for man-db (2.10.2-1) ...\r\n  |
 \r\n  | CypressError: `cy.task('createEndpointHost')` timed out after
waiting
`600000ms`.\r\n```","sha":"91cdbe2d354100683b5d8670de88e0b2cf665ba9"}}]}]
BACKPORT-->

Co-authored-by: Konrad Szwarc <[email protected]>
dej611 pushed a commit to dej611/kibana that referenced this issue Oct 17, 2023
…168438)

This pull request extends the agent fleet check timeout from 2 minutes
to 4 minutes. We've identified a number of unreliable tests that fail
during the `beforeAll` stage while executing the `createEndpointHost`
task. The following logs appear before the timeout:

```
info Enrolling Elastic Agent with Fleet
  | Installing service....... DONE
  | Starting service... DONE
  | Enrolling Elastic Agent with Fleet..........Successfully enrolled the Elastic Agent.
  | Elastic Agent has been successfully installed.
  | info Waiting for Agent to check-in with Fleet
```

The error message we encounter is `> Timed out waiting for host
[test-host-4981] to appear in Fleet.`

It appears that all the preceding steps are successful, and only the
final one fails due to either the agent not checking in with the fleet
for 2 minutes or the agent being unhealthy for two minutes. Since I
haven't been able to replicate this behavior locally, and there isn't a
way to inspect what's happening on the agent, I believe the best course
of action at this point is to extend the timeout and monitor the
results.

Reports of this error:
closes elastic#168427
closes elastic#168394
closes elastic#168393
closes elastic#168390
closes elastic#168363
closes elastic#168362
closes elastic#168361
closes elastic#168360
closes elastic#168359

Affected CI runs:
https://buildkite.com/elastic/kibana-on-merge/builds/36483
https://buildkite.com/elastic/kibana-on-merge/builds/36497
https://buildkite.com/elastic/kibana-on-merge/builds/36501
https://buildkite.com/elastic/kibana-on-merge/builds/36526

Another time out happens from time to time when previously set 10
minutes timeout on `createEndpointHost` task is not enough to set up the
environment. Its portrayed below, timeout happens during agent setup
```
  | default: Running: inline script
  | default: Reading package lists...
  | default: Building dependency tree...
  | default: Reading state information...
  | default: Suggested packages:
  | default:   zip
  | default: The following NEW packages will be installed:
  | default:   unzip
  | default: 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  | default: Need to get 174 kB of archives.
  | default: After this operation, 385 kB of additional disk space will be used.
  | default: Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 unzip amd64 6.0-26ubuntu3.1 [174 kB]
  | default: dpkg-preconfigure: unable to re-open stdin: No such file or directory
  | default: Fetched 174 kB in 1s (210 kB/s)
  | default: Selecting previously unselected package unzip.
  | (Reading database ... 63961 files and directories currently installed.)
  | default: Preparing to unpack .../unzip_6.0-26ubuntu3.1_amd64.deb ...
  | default: Unpacking unzip (6.0-26ubuntu3.1) ...
  | default: Setting up unzip (6.0-26ubuntu3.1) ...
  | default: Processing triggers for man-db (2.10.2-1) ...
  |  
  | CypressError: `cy.task('createEndpointHost')` timed out after waiting `600000ms`.
```
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:Defend Workflows “EDR Workflows” sub-team of Security Solution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants