-
Notifications
You must be signed in to change notification settings - Fork 178
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(app,app-shell,app-shell-odd, protocol-designer, labware-library, components, labware-designer): update Electron version to v27.0.0 #14314
Conversation
Update the Electron version from v21 to v23. Actually v23 is over the life but ODD has compatibility issues with Chromium v112 and later RAUT-
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## edge #14314 +/- ##
==========================================
- Coverage 68.29% 68.26% -0.04%
==========================================
Files 1623 2514 +891
Lines 54858 72017 +17159
Branches 4115 9242 +5127
==========================================
+ Hits 37466 49163 +11697
- Misses 16705 20678 +3973
- Partials 687 2176 +1489
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Looks like flex builds will fail until we get node-native on >=18 https://github.com/Opentrons/oe-core/actions/runs/7659498340/job/20874747633 |
Tracking the oe-core work here Opentrons/oe-core#128 |
That build succeeded: https://builds.opentrons.com/ot3-oe/7672229872/ot3-system.zip |
And it works, happy with this from the ODD side |
|
this is an issue with node-fetch and dns default result order https://opentrons.slack.com/archives/CSCLVUW3C/p1706568971026189 i've pushed a commit to fix |
* setting the default to IPv4 fixes the issue | ||
* https://github.com/node-fetch/node-fetch/issues/1624 | ||
*/ | ||
// TODO(bh, 2024-1-30): @types/node needs to be updated to address this type error. updating @types/node will also require updating our typescript version |
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.
this is failing because our wildcard @types/node version is 15 in yarn.lock. i'm looking into updating our wildcard @types/node
version and typescript in a separate commit.
2a360ce tells node to prefer ipv4 addresses since in node >17 it prefers ipv6. Unfortunately, when we're running cypress we don't really have the ability to specify this since it happens in code. Instead, we can make sure that webpack-dev-server serves on ipv6 as well as ipv4; the right way to do this is to tell it to use the host :: which is ipv6 shorthand for "accept-all-incoming" in the same way that 0.0.0.0 is for ipv4. This should actually accept all incoming v4 requests too. You can test it by running make dev and then doing both curl --head 127.0.0.1:8080/ (the ipv4 version) curl --head '[::1]:8080/' (the ipv6 version; ::1 is ipv6 localhost, and the brackets are how ipv6 is written. if doing this in the shell you'll need single-quotes here) curl --head http://localhost:8080/
labware-library/Makefile
Outdated
node ./renderStatic.js | ||
|
||
# development assets server | ||
.PHONY: dev | ||
dev: export NODE_ENV := development | ||
dev: | ||
webpack-dev-server --hot | ||
export NODE_OPTIONS=--openssl-legacy-provider && webpack-dev-server --hot --host=:: |
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 other side of the ipv4/v6 thing is that it also applies to cypress runs, and there we can't run our own js code, so let's just serve on v6 wildcard. you can test this by doing curl --head '[::1]:8080/'
(note the single quotes - your shell will try and parse those brackets) when dev server is running, as well as curl --head 127.0.0.1:8080/
and curl --head http://localhost:8080/
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.
think we need this in app
also, i get same behavior locally on node 18 (but not 20 it seems).
and i guess labware-designer while we're at it
|
and twiddle some env exports a bit
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.
Looks good to me! @koji I think you should have the honor of clicking merge!
…omponents,labware-designer): update Electron version to v27.0.0 (#14314) Update Electron version 27.0.0 https://www.electronjs.org/docs/latest/tutorial/electron-timelines#timeline This is the latest version of electron that does not include electron/electron#40143 which breaks the ability of the ODD to load content. This PR also includes Nodejs update because of Electron v27's requirement. The more recent nodejs requires some new options; specifically, webpack dev servers must serve on ipv6 wildcards, and internally in the shell we need to prefer v4 dns. We also need to use old openssl. --------- Co-authored-by: Brent Hagen <[email protected]> Co-authored-by: Seth Foster <[email protected]>
Overview
Update Electron version 27.0.0
https://www.electronjs.org/docs/latest/tutorial/electron-timelines#timeline
There is
loadURL
issue in the versions that include the following PR.electron/electron#40143
At this moment we cannot update any newer version. (I'll keep checking the repo)
This PR also includes Nodejs update because of Electron v27's requirement.
This PR needs Nodejs v21.4.0 since M1 Mac has an issue about running Desktop app. (I'll keep an eye on this to support more nodejs version). M2 Mac can use nodejs v18.
Need
NODE_OPTION
due to OpenSSL version.I tried to export NODE_OPTION in the top of Makefile, but somehow that has an impact on other part and prevent building the app(Desktop/ODD). I use
NODE_OPTION
separately.Another reasons for this are
labware-library
andprotocol-designer
since the option prevents Cypress.Running the application
node v21
CI
OT-2
Other applications
Commands
This PR removes
usb-detection
since the repo has been archived and not compatible with node v18+.The new package we need to use is
[node-usb](https://github.com/node-usb/node-usb)
https://working-wormhole-d95.notion.site/usb-detection-node-usb-a6637f72f5d44f3ba9c7520b4f0da24f
Test Plan
Changelog
Review requests
Risk assessment