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

[React@18] fix incorrect useEffect return value #195421

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

Dosant
Copy link
Contributor

@Dosant Dosant commented Oct 8, 2024

Summary

This is a prep for React@18 upgrade
When running functional tests with React@18 we've found places where useEffect function returns an object (related failure). This fails with a runtime error in React@18 as only undefined or an unmount funciton is a valid return value

@Dosant Dosant added release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Oct 8, 2024
@Dosant Dosant marked this pull request as ready for review October 8, 2024 15:32
@Dosant Dosant requested a review from a team as a code owner October 8, 2024 15:32
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@Dosant Dosant requested a review from sphilipse October 8, 2024 15:33
Copy link
Member

@sphilipse sphilipse left a comment

Choose a reason for hiding this comment

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

thanks! LGTM :)

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #22 / Detection Engine - Exception workflows APIs @serverless @serverlessQA @ess rule exceptions execution creating rules with exceptions should be able to execute against an exception list that does include valid case sensitive entries and get back 0 alerts
  • [job] [logs] FTR Configs #64 / Reporting Functional Tests with Security enabled Access to Management > Reporting Download report user can access download link

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
enterpriseSearch 2.6MB 2.6MB +4.0B

@Dosant Dosant merged commit d03537f into elastic:main Oct 8, 2024
29 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11239548084

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 8, 2024
…95421) (#195468)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[React@18] fix incorrect `useEffect` return value
(#195421)](#195421)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Anton
Dosov","email":"anton.dosov@elastic.co"},"sourceCommit":{"committedDate":"2024-10-08T16:17:17Z","message":"[React@18]
fix incorrect `useEffect` return value
(#195421)","sha":"d03537f21764fda1fbafcfec03391b3e03b64e82","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:SharedUX","backport:prev-minor"],"title":"[React@18]
fix incorrect `useEffect` return
value","number":195421,"url":"https://github.com/elastic/kibana/pull/195421","mergeCommit":{"message":"[React@18]
fix incorrect `useEffect` return value
(#195421)","sha":"d03537f21764fda1fbafcfec03391b3e03b64e82"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195421","number":195421,"mergeCommit":{"message":"[React@18]
fix incorrect `useEffect` return value
(#195421)","sha":"d03537f21764fda1fbafcfec03391b3e03b64e82"}}]}]
BACKPORT-->

Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
@Dosant Dosant added the React@18 label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) React@18 release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants