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

Upgrade to React@18 #209337

Merged
merged 16 commits into from
Mar 3, 2025
Merged

Upgrade to React@18 #209337

merged 16 commits into from
Mar 3, 2025

Conversation

Dosant
Copy link
Contributor

@Dosant Dosant commented Feb 3, 2025

Summary

This PR upgrades React packages to version 18, while keeping Kibana running in Legacy mode (ReactDOM.render). This is the first phase of the React@18 upgrade; the second phase will gradually migrate Kibana to Concurrent mode (createRoot) (exact plan is tbd).

Upgrade is intended to be non-breaking and behave just like React@17, but it still requires thorough testing from all teams that own UI to discover any potential critical UI issues. The testing was done in #203114.

Most of the breaking work was completed in previous PRs and this PR only includes minor breaking jest tests tweaks / snapshots updates

Backports:

  • This won't be backported to 9.0
  • We will discuss if we should backport this to 8.x

Risks

Kibana’s UI functional tests coverage and significant manual testing that was done by a lot of teams in #203114 gives us a lot of confidence.

However, since this was a large internal change for React they still could be issues hidden in "remote" parts of UIs, think of blank screens, error splash screens, unresponsive pages, new errors in the console, unpredictable UI behavior (like laggy text inputs that skip letters when typing fast).

@Dosant Dosant added ci:cloud-deploy Create or update a Cloud deployment ci:cloud-persist-deployment Persist cloud deployment indefinitely ci:project-deploy-elasticsearch Create an Elasticsearch Serverless project labels Feb 4, 2025
@kibanamachine
Copy link
Contributor

Project deployed, see credentials at: https://buildkite.com/elastic/kibana-deploy-project-from-pr/builds/290

Dosant and others added 4 commits February 11, 2025 17:18
…act18-merge

# Conflicts:
#	x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/__snapshots__/entry_content.test.tsx.snap
#	x-pack/solutions/security/plugins/security_solution/public/timelines/components/netflow/__snapshots__/index.test.tsx.snap
#	x-pack/solutions/security/plugins/security_solution/public/timelines/components/timeline/body/renderers/netflow/__snapshots__/netflow_row_renderer.test.tsx.snap
#	yarn.lock
@elasticmachine
Copy link
Contributor

elasticmachine commented Mar 2, 2025

💛 Build succeeded, but was flaky

Failed CI Steps

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
securitySolution 8.9MB 8.9MB -246.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
kbnUiSharedDeps-npmDll 6.0MB 6.1MB +61.4KB

History

@Dosant Dosant changed the title bump react 18 Upgrade to React@18 Mar 3, 2025
@Dosant Dosant added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting labels Mar 3, 2025
@Dosant Dosant marked this pull request as ready for review March 3, 2025 10:11
@Dosant Dosant requested review from a team as code owners March 3, 2025 10:11
@Dosant Dosant requested a review from dhurley14 March 3, 2025 10:11
Copy link
Member

@pheyos pheyos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kbn-test changes LGTM

@botelastic botelastic bot added the Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team label Mar 3, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@delanni delanni merged commit f7fa6dd into elastic:main Mar 3, 2025
15 checks passed
@delanni
Copy link
Contributor

delanni commented Mar 3, 2025

Admin merged upon request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:all-cypress-suites ci:cloud-deploy Create or update a Cloud deployment ci:cloud-persist-deployment Persist cloud deployment indefinitely ci:project-deploy-elasticsearch Create an Elasticsearch Serverless project release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants