elastic / kibana

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

Defend Workflows Cypress Serverless tests sometimes fail due to `TypeError: Cannot destructure property 'spec' of 'run' as it is undefined`` #170365

Open kevinlog opened 10 months ago

kevinlog commented 10 months ago

Description

Defend Workflows Cypress Serverless tests have failed due to the following error:

ERROR UNHANDLED ERROR
--
  | ERROR TypeError: Cannot destructure property 'spec' of 'run' as it is undefined.
  | at print_run.ts:359:15
  | at arrayEach (/opt/local-ssd/buildkite/builds/kb-n2-4-virt-ee85f479874dfa64/elastic/kibana-pull-request/kibana/node_modules/lodash/lodash.js:530:11)
  | at Function.each [as forEach] (/opt/local-ssd/buildkite/builds/kb-n2-4-virt-ee85f479874dfa64/elastic/kibana-pull-request/kibana/node_modules/lodash/lodash.js:9410:14)
  | at renderSummaryTable (print_run.ts:358:7)
  | at parallel.ts:450:27
  | at processTicksAndRejections (node:internal/process/task_queues:95:5)
  | at flags.allowUnexpected (parallel.ts:231:7)
  | at run.ts:73:10
  | at withProcRunner (with_proc_runner.ts:29:5)
  | at run (run.ts:71:5)
  | error Command failed with exit code 1.
  | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
  | error Command failed with exit code 1.
  | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
  | yarn run v1.22.19

Example failure: https://buildkite.com/elastic/kibana-pull-request/builds/172480#018b8aa6-2d2d-4f93-89f7-2c0f593c525d

We tried to address this in a different way, but it looks like it can still occur: https://github.com/elastic/kibana/pull/168982

I am not sure why this would just be happening in Defend Workflows tests as this is common code shared in Security Solution. Maybe the simple fix is to catch this error and not render that piece of the table. When we do get this error, it seems that tests have all passed.

elasticmachine commented 10 months ago

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