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: Jest Tests.x-pack/plugins/cases/public/components/case_form_fields - CustomFields renders correctly #188133

Open
kibanamachine opened this issue Jul 11, 2024 · 17 comments · Fixed by #189475
Assignees
Labels
blocker failed-test A test failure on a tracked branch, potentially flaky-test Feature:Cases Cases feature skipped-test Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v9.0.0

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Jul 11, 2024

A test failed on a tracked branch

Error: thrown: "Exceeded timeout of 5000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."
    at it (/opt/buildkite-agent/builds/bk-agent-prod-gcp-1720711679414760555/elastic/kibana-on-merge/kibana/x-pack/plugins/cases/public/components/case_form_fields/custom_fields.test.tsx:35:3)
    at _dispatchDescribe (/opt/buildkite-agent/builds/bk-agent-prod-gcp-1720711679414760555/elastic/kibana-on-merge/kibana/node_modules/jest-circus/build/index.js:91:26)
    at describe (/opt/buildkite-agent/builds/bk-agent-prod-gcp-1720711679414760555/elastic/kibana-on-merge/kibana/node_modules/jest-circus/build/index.js:55:5)
    at Object.describe (/opt/buildkite-agent/builds/bk-agent-prod-gcp-1720711679414760555/elastic/kibana-on-merge/kibana/x-pack/plugins/cases/public/components/case_form_fields/custom_fields.test.tsx:19:1)
    at Runtime._execModule (/opt/buildkite-agent/builds/bk-agent-prod-gcp-1720711679414760555/elastic/kibana-on-merge/kibana/node_modules/jest-runtime/build/index.js:1430:24)
    at Runtime._loadModule (/opt/buildkite-agent/builds/bk-agent-prod-gcp-1720711679414760555/elastic/kibana-on-merge/kibana/node_modules/jest-runtime/build/index.js:1013:12)
    at Runtime.requireModule (/opt/buildkite-agent/builds/bk-agent-prod-gcp-1720711679414760555/elastic/kibana-on-merge/kibana/node_modules/jest-runtime/build/index.js:873:12)
    at jestAdapter (/opt/buildkite-agent/builds/bk-agent-prod-gcp-1720711679414760555/elastic/kibana-on-merge/kibana/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:77:13)
    at runTestInternal (/opt/buildkite-agent/builds/bk-agent-prod-gcp-1720711679414760555/elastic/kibana-on-merge/kibana/node_modules/jest-runner/build/runTest.js:367:16)
    at runTest (/opt/buildkite-agent/builds/bk-agent-prod-gcp-1720711679414760555/elastic/kibana-on-merge/kibana/node_modules/jest-runner/build/runTest.js:444:34)

First failure: kibana-on-merge - main

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Jul 11, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Jul 11, 2024
@kibanamachine kibanamachine added the Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) label Jul 11, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jul 11, 2024
@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - main

@cnasikas cnasikas added the Feature:Cases Cases feature label Jul 12, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops-cases (Feature:Cases)

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - main

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - main

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - main

mistic added a commit that referenced this issue Jul 15, 2024
@mistic mistic added the v8.16.0 label Jul 15, 2024
@mistic
Copy link
Member

mistic commented Jul 15, 2024

Skipped.

main: 31e0c57
8.15: df429da

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - 8.15

mistic added a commit that referenced this issue Jul 17, 2024
@adcoelho adcoelho self-assigned this Jul 30, 2024
adcoelho added a commit that referenced this issue Jul 31, 2024
fixes #178457
fixes #187554

## Summary

I think this test was skipped by mistake.

The [failing
build](https://buildkite.com/elastic/kibana-on-merge/builds/42401#018e2f40-5109-4a2a-a877-f0aeed20f20f)
points to
`x-pack/plugins/cases/public/components/create/custom_fields.test.tsx`
but this file does not exist anymore.

[In the commit where the pipeline
failed](https://github.com/elastic/kibana/tree/cd16d03ca9627b21452eff6b72d771318e85557f)
the file
`x-pack/plugins/cases/public/components/create/template.test.tsx` did
not exist.

The `renders correctly` test is **very** different between these two
files so I think there was some mistake here.

Additionally, there is [this skipped
test](#188133) which IMO is the
correct one. I fix that in a different PR.

PS: I kept looking into our flaky test list and I think the same is the
case for #187554 the file skipped there does not match the one in the
failing pipeline and it did not exist at the time of that commit. I
think there was some confusion and time difference between the failing
tests and the tests being skipped. When the tests were skipped the
original file did not exist anymore and prob all custom field related
`renders correctly` tests were skipped indiscriminately 🤷
adcoelho added a commit that referenced this issue Jul 31, 2024
fixes #188133

## Summary

I simplified the failing test a bit to make it less likely to timeout.
1. We checked for the test **and** the `id` to make sure the component
was rendered, it was redundant.
2. We looked for all custom fields(4) and I reduced the check to just
2(which have different types).
3. Updated another test that looked for a label to look for an `id`(for
consistency).
@kibanamachine kibanamachine reopened this Sep 17, 2024
@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - main

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - 8.x

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - main

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - 8.x

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - 8.x

@TinaHeiligers
Copy link
Contributor

New failure in PR: #193792

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - main

@kibanamachine
Copy link
Contributor Author

New failure: kibana-on-merge - 8.x

jbudz added a commit that referenced this issue Oct 1, 2024
jbudz added a commit that referenced this issue Oct 1, 2024
@jbudz
Copy link
Member

jbudz commented Oct 1, 2024

Skipped

main: 83d321b
8.x: 38cd0cc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker failed-test A test failure on a tracked branch, potentially flaky-test Feature:Cases Cases feature skipped-test Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v9.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants