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: X-Pack Jest Tests.x-pack/plugins/index_management/__jest__/client_integration - <TemplateCreate /> on component mount form validation aliases (step 4) should set the correct page title #59855

Closed
kibanamachine opened this issue Mar 11, 2020 · 12 comments · Fixed by #60780
Labels
blocker failed-test A test failure on a tracked branch, potentially flaky-test skipped-test Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Mar 11, 2020

A test failed on a tracked branch

TypeError: Cannot read property 'data' of undefined
    at getData (/var/lib/jenkins/workspace/elastic+kibana+7.x/kibana/x-pack/plugins/index_management/public/application/components/mappings_editor/mappings_state.tsx:122:52)
    at setDataGetter (/var/lib/jenkins/workspace/elastic+kibana+7.x/kibana/x-pack/plugins/index_management/public/application/components/template_form/steps/step_mappings.tsx:33:22)

First failure: Jenkins Build

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Mar 11, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-test-triage (failed-test)

@kibanamachine
Copy link
Contributor Author

New failure: Jenkins Build

@jportner
Copy link
Contributor

Potentially related to / being caused by #55877

@spalger
Copy link
Contributor

spalger commented Mar 11, 2020

Skipped

master: 50471f1
7.x/7.7: 655f23b

@spalger spalger added skipped-test Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Mar 11, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@thompsongl
Copy link
Contributor

Based on the warnings received when running the template_create suite:

Warning: An update to TemplateForm inside a test was not wrapped in act(...).

Warning: You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one.

I think the failures are of the same type we saw in #58068, namely that Promise resolution in EuiIcon had been been flushing pending hook effects for the tested component. This can have the effect of artificially keeping the test runner alive, or causing rerenders that would otherwise require act

@sebelga
Copy link
Contributor

sebelga commented Mar 13, 2020

@thompsongl is this something that the EUI team should fix? Or should all dependent teams fix their tests? It seems that the former makes more sense but I haven't investigated.

@thompsongl
Copy link
Contributor

@sebelga I'm certainly willing to help. Let me investigate further

@chandlerprall
Copy link
Contributor

chandlerprall commented Mar 13, 2020

is this something that the EUI team should fix? Or should all dependent teams fix their tests?

Starting with some empathy as my next paragraph probably comes off a bit strong: We did miss the introduced flakiness while merging this change and, as Greg said, we're willing to help resolve appropriately.

These errors are outside the scope of EUI. Another way to look at it is if Kibana implemented some 3rd party charting library which artificially kept enzyme/react-test-library alive for a few extra node ticks, and then the charting library optimized to something purely synchronous (but kept the same API surface). We wouldn't say they broke Kibana's tests. As stated earlier, many of these tests were already throwing related warnings but were ignored.

That said, we're all together in this and are happy to help look into related issues where we can, but these issues need to be addressed in Kibana and the individual teams are going to be much, much more effective than Greg or I; e.g. Lens' test issue (#58068) took quite a bit of time from both of us just to understand how the test & underlying components were structured before investigating the cause of the failure.

@cjcenizal
Copy link
Contributor

Thanks @chandlerprall. It sounds like our tests were dependent upon a side effect of EuiIcon's implementation to work. When that side effect disappeared, our tests broke. Do I have that right? If that's the case, then I agree with you. If EUI's interface hasn't changed then we should be responsible for fixing our tests. And thank you for offering to help -- we will be happy to ping you for support!

@thompsongl
Copy link
Contributor

Well put, @chandlerprall. Thanks for jumping in.

It sounds like our tests were dependent upon a side effect of EuiIcon's implementation to work. When that side effect disappeared, our tests broke. Do I have that right?

Correct. The interface for EuiIcon did not change, but an internal async resolution did.

Let me know how I can help!

@sebelga
Copy link
Contributor

sebelga commented Mar 16, 2020

Thanks for clarifying @chandlerprall, makes sense now 👍

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 skipped-test Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants