-
Notifications
You must be signed in to change notification settings - Fork 179
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
chore(monorepo): Update Electron to v33.2.1 #17010
Conversation
eb01475
to
751ada5
Compare
751ada5
to
2c40681
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## edge #17010 +/- ##
==========================================
+ Coverage 79.20% 79.21% +0.01%
==========================================
Files 120 120
Lines 4516 4533 +17
==========================================
+ Hits 3577 3591 +14
- Misses 939 942 +3
Flags with carried forward coverage won't be shown. Click here to find out more. |
2c40681
to
13f8c0f
Compare
await waitFor(() => | ||
screen.findByText('Add the required CSV file to continue.') | ||
) | ||
await screen.findByText('Add the required CSV file to continue.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous code was a race condition, making the test flaky.
DEV_SETUP.md
Outdated
@@ -202,7 +202,7 @@ Once you are inside the repository for the first time, you should do two things: | |||
3. Run `python --version` to confirm your chosen version. If you get the incorrect version and you're using an Apple silicon Mac, try running `eval "$(pyenv init --path)"` and then `pyenv local 3.10.13`. Then check `python --version` again. | |||
|
|||
```shell | |||
# confirm Node v18 | |||
# confirm Node v22 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we need to avoid using v22.5.0
I don't remember exactly but when I started updating node version, at that time the latest version was 22.5.0 but it had a few issues, and I ended up using v22.4.
if someone runs nvs add 22
first time, it won't have issue since nvs will install lts version.
probably need to add v22.11+ because of the following
"node": ">=22.11.0"
app-shell/package.json
Outdated
@@ -50,7 +50,7 @@ | |||
"electron-localshortcut": "3.2.1", | |||
"electron-devtools-installer": "3.2.0", | |||
"electron-store": "5.1.1", | |||
"electron-updater": "4.1.2", | |||
"electron-updater": "6.3.9", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
app/package.json
Outdated
@@ -77,6 +77,7 @@ | |||
"@types/node-fetch": "2.6.11", | |||
"@types/styled-components": "^5.1.26", | |||
"axios": "^0.21.1", | |||
"electron-updater": "6.3.9", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
maybe we should move this to root package.json?
@mjhuff |
Good callout, thanks. I did test this, but I forgot to add it to the test cases above. Added it to the PR now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested Desktop (mac) and it worked as expected.
thank you for updating Electron version and nodejs version.
fyi |
The electron update made it no longer possible to access the file path from the renderer process, see #17010 for more details. That PR did not update one important case: uploading zip files. Currently, fun behavior happens when uploading a system zip, such as throwing an error or better yet, pushing an old, cache file instead of the expected system file. This commit fixes that.
Closes EXEC-1032
Overview
This PR continues the work started in #15894, cherry-picking several commits and completes updating Electron to
33.2.1
. There are a couple dependency updates as well:node
gets a big bump to22.11.0
,electron-rebuild
bumps to3.7.1
, andelectron-builder
bumps to25.1.8
. This PR does not bump USB-related dependencies, since USB works as is (and if we're going to bump those dependencies, it would be nice to do them in an isolated PR).Opentrons/oe-core#180 bumps node for builds.
NOTE: This PR should be merged alongside the oe-core PR.
HUGE thanks to @shlokamin and @koji for all the work they put into this that made my life so much easier!
Functional Changes
File.path
workaroundsThe removal of
file.path
directly affects protocol and labware uploading in the desktop app. The docs recommend exposing a web util via context bridge, but because enabling context bridge breaks a lot of existing functionality, this PR exposes it on the global app object. See 556f704. The end result is effectively the same. There are many different approaches one could take to this, but the approach in this commit has by far the smallest blast radius while ensuring no functional change (DnD does not play well when trying to do things like having the shell actually show the file upload dialogue).Electron Rebuilder
Electron rebuilder has an internal dependency on
node-abi
, which provides some mappings necessary to build electron. The problem is when Electron rebuilder releases lag behind Electron releases,node-abi
is out of date, the mappings for node to electron versions don't exist, and the build fails. This is nothing new - it seems to be a constant problem. A quick search for "electron-rebuilder node-abi" shows the problem happens again and again and again, year and after.The easiest, least invasive way I found was to effectively specify the node mapping manually in the app-shell(odd)
package.json
script.CI Ubuntu Server Bump
For a lot of CI, the current ubuntu server version wasn't playing nicely with the updated serialport native module rebuilding, specifically GCC. Bumping the server version solves this.
Test Plan and Hands on Testing
Before testing:
make teardown && make setup
.Desktop Smoke Test
ODD Smoke Test
Changelog
Review requests
Risk assessment
high