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

Bump redux (4.2.0), reselect (4.1.6), @reduxjs/toolkit (1.7.2), redux-thunk (2.4.1) and immer (9.0.15) #138818

Merged
merged 17 commits into from
Aug 25, 2022

Conversation

sphilipse
Copy link
Member

@sphilipse sphilipse commented Aug 15, 2022

Summary

This updates redux to 4.2.0, reselect to 4.1.6, @reduxjs/toolkit to 1.7.2, redux-thunk to 2.4.1 and immer to 9.0.15. The main aim was to upgrade redux, the other package updates fix type errors caused by upgrading redux in isolation.

@sphilipse sphilipse added release_note:skip Skip the PR/issue when compiling release notes v8.5.0 labels Aug 15, 2022
@sphilipse sphilipse force-pushed the upgrade-redux-4-1-0 branch from 51411ab to f6c4957 Compare August 15, 2022 14:13
@sphilipse sphilipse requested a review from a team as a code owner August 15, 2022 14:36
@sphilipse sphilipse marked this pull request as draft August 15, 2022 15:41
@sphilipse sphilipse force-pushed the upgrade-redux-4-1-0 branch 3 times, most recently from 9829b41 to a7db1ed Compare August 22, 2022 09:49
@sphilipse sphilipse changed the title Upgrade Redux to 4.2.0 and Reselect to 4.1.6 Bump redux (4.2.0), reselect (2.4.1), @reduxjs/toolkit (1.7.2) and immer (9.0.15) Aug 22, 2022
@sphilipse sphilipse changed the title Bump redux (4.2.0), reselect (2.4.1), @reduxjs/toolkit (1.7.2) and immer (9.0.15) Bump redux (4.2.0), reselect (2.4.1), @reduxjs/toolkit (1.7.2), redux-thunk (2.4.1) and immer (9.0.15) Aug 22, 2022
@@ -554,28 +554,9 @@ export const nodesAndEdgelines: (state: DataState) => (
processNodePositions: visibleProcessNodePositions,
connectingEdgeLineSegments,
};
}, aaBBEqualityCheck);
}, aabbModel.isEqual);
Copy link
Member Author

Choose a reason for hiding this comment

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

New reselect package correctly induces the type here, so the helper function below is no longer necessary. Functionality is the same.

// `boundingBox` and `nodesAndEdgelines` are each memoized.
return (time: number) => nodesAndEdgelines(boundingBox(time));
return (time: number) => nodesAndEdgelinesFn(boundingBoxFn(time));
Copy link
Member Author

Choose a reason for hiding this comment

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

TypeScript did not like the variable name shadowing here, fixing that fixed a type issue below.

visibleNodesAndEdgeLines,
composeSelectors(dataStateSelector, dataSelectors.ariaFlowtoCandidate),
(visibleNodesAndEdgeLinesAtTime, ariaFlowtoCandidate) => {
function (
Copy link
Member Author

Choose a reason for hiding this comment

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

Couldn't get this to work with an arrow function, TypeScript stopped complaining as soon as I turned this into an explicit function declaration instead.

@sphilipse sphilipse marked this pull request as ready for review August 22, 2022 11:59
@sphilipse sphilipse requested review from a team as code owners August 22, 2022 11:59
@sphilipse sphilipse changed the title Bump redux (4.2.0), reselect (2.4.1), @reduxjs/toolkit (1.7.2), redux-thunk (2.4.1) and immer (9.0.15) Bump redux (4.2.0), reselect (4.1.6), @reduxjs/toolkit (1.7.2), redux-thunk (2.4.1) and immer (9.0.15) Aug 22, 2022
@sphilipse
Copy link
Member Author

sphilipse commented Aug 22, 2022

Pinging @elastic/enterprise-search-frontend @elastic/kibana-presentation @elastic/kibana-data-discovery @elastic/platform-deployment-management @elastic/infra-monitoring-ui @elastic/kibana-gis @elastic/security-solution for reviews and sanity checks as your code may be affected by this upgrade.

yarn.lock Outdated Show resolved Hide resolved
@botelastic botelastic bot added the Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability label Aug 22, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@patrykkopycinski
Copy link
Contributor

@sphilipse would you mind adding a proper config to renovate.json, so we automate bumping redux in the future?

@sphilipse sphilipse force-pushed the upgrade-redux-4-1-0 branch from 974dc67 to df8279b Compare August 25, 2022 08:27
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
crossClusterReplication 138 139 +1
dashboard 371 372 +1
dataViewManagement 175 176 +1
enterpriseSearch 1629 1630 +1
graph 219 220 +1
indexManagement 487 488 +1
lens 893 894 +1
licenseManagement 129 130 +1
maps 923 924 +1
presentationUtil 185 186 +1
rollup 142 143 +1
securitySolution 2998 2999 +1
synthetics 965 966 +1
timelines 253 254 +1
total +14

Async chunks

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

id before after diff
canvas 1.0MB 1.0MB +90.0B
console 397.6KB 397.9KB +304.0B
crossClusterReplication 163.8KB 165.4KB +1.6KB
dashboard 367.5KB 370.0KB +2.5KB
dataViewManagement 144.2KB 145.7KB +1.6KB
enterpriseSearch 1.6MB 1.6MB +1.6KB
graph 411.0KB 412.5KB +1.6KB
indexLifecycleManagement 152.5KB 152.8KB +304.0B
indexManagement 521.8KB 523.4KB +1.6KB
lens 1.2MB 1.2MB +2.5KB
licenseManagement 61.6KB 63.3KB +1.6KB
maps 2.6MB 2.6MB +1.6KB
osquery 1.0MB 1.0MB +608.0B
presentationUtil 128.0KB 130.5KB +2.5KB
remoteClusters 83.9KB 84.0KB +90.0B
rollup 129.5KB 131.2KB +1.6KB
securitySolution 5.4MB 5.4MB -104.0B
synthetics 981.3KB 983.8KB +2.5KB
total +24.1KB

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 5.0MB 5.0MB +1.4KB
licenseManagement 10.2KB 10.2KB +1.0B
securitySolution 255.4KB 257.0KB +1.6KB
timelines 257.8KB 259.3KB +1.6KB
total +4.6KB
Unknown metric groups

ESLint disabled in files

id before after diff
securitySolution 75 74 -1

Total ESLint disabled count

id before after diff
securitySolution 475 474 -1

History

  • 💛 Build #67036 was flaky 974dc672caf839b46dbe14def340810105c72044
  • 💚 Build #66985 succeeded 6056b5fbc12c982659229cbe02db59fc3a6f17bb
  • 💚 Build #66556 succeeded e0f5f283f281ee2d6e10ed45ded835e624a561b2
  • 💔 Build #66505 failed 4df77e9cc3de7e74d60077c2a90f8cc47903920c
  • 💔 Build #66493 failed 79d6b9f81f639f20a5f017019f62597198ff3709
  • 💔 Build #66485 failed 38517980649ca9ad1b10d6e7bab0ff0939bc8708

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@awahab07 awahab07 left a comment

Choose a reason for hiding this comment

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

Synthetics plugin (Uptime) changes LGTM.

@sphilipse sphilipse merged commit 9307cac into elastic:main Aug 25, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Aug 25, 2022
@dokmic
Copy link
Contributor

dokmic commented Aug 25, 2022

Hey @sphilipse. Thanks for bumping those. I've checked our implementation with the latest redux-toolkit release, and I see the problem.

That's not something we should fix on our side, it's actually a bug on the library side. I've already reported an issue reduxjs/redux-toolkit#2628 and proposed a solution in reduxjs/redux-toolkit#2629.

Let's see how it goes with the PR. If it's going to be rejected or before they release that, we can use the following as a workaround:

// src/plugins/embeddable/public/store/create_store.ts

export interface CreateStoreOptions<S extends State>
  // @todo remove type parameters when reduxjs/redux-toolkit#2628 is resolved
  // @see https://github.com/reduxjs/redux-toolkit/issues/2628
  extends Omit<ConfigureStoreOptions<S, AnyAction, Middleware[]>, 'reducer'> {
  reducer?: Reducer<S> | Optional<ReducersMapObject<S>, keyof State>;
}

cc @ThomThomson

Mpdreamz pushed a commit to Mpdreamz/kibana that referenced this pull request Sep 6, 2022
…-thunk (2.4.1) and immer (9.0.15) (elastic#138818)

* Upgrade Redux to 4.2.0 and Reselect to 4.1.6

* Fix typing in timelines TypedUseSelectorHook

* Upgrade reduxjs-toolkit and fix types

* Upgrade more dependencies and fix types

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Undo unnecessary type fixes

* Add renovate.json config for redux

* Add caret to @reduxjs/toolkit version

* Update package.json

Co-authored-by: Patryk Kopyciński <[email protected]>

* Update package.json

Co-authored-by: Patryk Kopyciński <[email protected]>

* Update package.json

Co-authored-by: Patryk Kopyciński <[email protected]>

* yarn bootstrap

* Ts-ignore failing types in presentation_util redux_embeddables

* Downgrade @reduxjs/toolkit to 1.7.2

* Undo ts-ignores in redux-embeddables

* Remove CombinedState comment

* Rebase onto main

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Patryk Kopyciński <[email protected]>
walterra added a commit that referenced this pull request Jan 22, 2024
## Summary

Follow up to #138818.

This updates Redux Toolkit to the latest version right before v2. It
also updates dependencies of Redux Toolkit that are also in
`package.json` to match the version used in Redux Toolkit.

- Upgrades `@reduxjs/toolkit` from `v1.7.2` to `v1.9.7`.
- Upgrades `immer` from `v9.0.15` to `v9.0.21`.
- Upgrades `redux` from `v4.2.0` to `v4.2.1`.
- Upgrades `redux-thunk` from `v2.4.1` to `v2.4.2`.
- Upgrades `reselect` from `v4.1.6` to `v4.1.8`.

### Checklist

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this pull request Feb 15, 2024
## Summary

Follow up to elastic#138818.

This updates Redux Toolkit to the latest version right before v2. It
also updates dependencies of Redux Toolkit that are also in
`package.json` to match the version used in Redux Toolkit.

- Upgrades `@reduxjs/toolkit` from `v1.7.2` to `v1.9.7`.
- Upgrades `immer` from `v9.0.15` to `v9.0.21`.
- Upgrades `redux` from `v4.2.0` to `v4.2.1`.
- Upgrades `redux-thunk` from `v2.4.1` to `v2.4.2`.
- Upgrades `reselect` from `v4.1.6` to `v4.1.8`.

### Checklist

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
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 Feature:Embedding Embedding content via iFrame release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.