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.16] [React@18 failing test] Navigate to dataset details should navigate to details page from a main page. (#196384) #196739

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.16:

Questions ?

Please refer to the Backport tool documentation

…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 enabled auto-merge (squash) October 17, 2024 16:09
@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Oct 17, 2024
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!)

@kibanamachine kibanamachine merged commit b47b321 into elastic:8.16 Oct 17, 2024
29 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

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

cc @Dosant

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