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

[8.x] [React@18 failing test] Navigate to dataset details should navigate to details page from a main page. (#196384) #196734

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

…o details page from a main page. (elastic#196384)

## Summary

Hi team, we're working on upgrading Kibana to React@18 in legacy mode
elastic/kibana-team#1016 (comment)
and addressing remaining functional tests when running with React@18 in
Legacy Mode.

One failure we've found is happening on the dataset quality page:
navigate to dataset details should navigate to details page from a main
page.
[Failure](https://buildkite.com/elastic/kibana-pull-request/builds/236562#019222ec-e95e-44aa-a754-fd9f736accce).

I tracked it down to infinite re-render of `DegradedDocs` component.
Looks like there is an infinite useEffect loop that is also happening
with react@17, but the results of it are not so severe so the tests are
still passing and the page is still functioning with react@17, wheres
with react@18 it becomes completely unresponsive.

This effect causes the inifite loop because `breakdown` is new object
with each render:

https://github.com/elastic/kibana/blob/0d19367fdfad5526b5220dfdf18b4991fe6b3abd/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/document_trends/degraded_docs/index.tsx#L85-L91

To reproduce the loop, I used the setup from the following functional
tests suite:
x-pack/test/functional/apps/dataset_quality/dataset_quality_details.ts

(cherry picked from commit 6f4346e)
@kibanamachine kibanamachine force-pushed the backport/8.x/pr-196384 branch from 7e95ebe to f992f59 Compare October 17, 2024 16:09
@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 17, 2024

💚 Build Succeeded

  • Buildkite Build
  • Commit: f992f59
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-196734-f992f59af298

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
datasetQuality 230.2KB 230.2KB +37.0B

History

cc @Dosant

@kibanamachine kibanamachine merged commit de877a2 into elastic:8.x Oct 17, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport ci:project-deploy-observability Create an Observability project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants