Skip to content

Commit

Permalink
chore(app-shell): Upgrade the Electron version to 21 (#11537)
Browse files Browse the repository at this point in the history
This upgrade is for the ODD app. With Electron version 21, the ODD app works as expected (as well as the current app version). However, there are a couple of issues with this upgrade.
  • Loading branch information
koji authored Oct 26, 2022
1 parent 39e3b0f commit d1a9618
Show file tree
Hide file tree
Showing 25 changed files with 1,107 additions and 660 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/api-test-lint-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: ${{ matrix.python }}
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/app-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ jobs:
# to run cross-platform
runs-on: 'ubuntu-22.04'
name: 'opentrons app frontend unit tests'
timeout-minutes: 30
timeout-minutes: 60
steps:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'set complex environment variables'
Expand Down Expand Up @@ -93,21 +93,25 @@ jobs:
# to run cross-platform just like builds, might as well do them in the same job
strategy:
matrix:
os: ['windows-2019', 'ubuntu-22.04', 'macos-latest']
os: ['windows-2022', 'ubuntu-22.04', 'macos-latest']
name: 'opentrons app backend unit tests and build'
needs: ['js-unit-test']
runs-on: ${{ matrix.os }}
steps:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: 'downgrade npm version'
run: npm install -g npm@6
- name: check make version
run: make --version
- name: 'install libudev'
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install libudev-dev
run: sudo apt-get update && sudo apt-get upgrade && sudo apt-get install libudev-dev
- name: 'set complex environment variables'
id: 'set-vars'
uses: actions/[email protected]
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/components-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'set complex environment variables'
id: 'set-vars'
uses: actions/[email protected]
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/docs-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# * The docs source themselves;
# * The CI/makefile tooling used to build the docs.


name: 'API docs build'

on:
Expand Down Expand Up @@ -44,7 +43,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v3'
with:
python-version: '3.7'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/js-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'set complex environment variables'
id: 'set-vars'
uses: actions/[email protected]
Expand All @@ -70,7 +70,7 @@ jobs:
npm config set cache ${{ github.workspace }}/.npm-cache
yarn config set cache-folder ${{ github.workspace }}/.yarn-cache
make setup-js
# Use the if to run all the lint checks even of some fail
# Use the if to run all the lint checks even of some fail
shell: bash
- name: 'lint js'
if: always() && steps.setup-js.outcome == 'success'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ll-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install libudev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install libudev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install libudev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'set complex environment variables'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/notify-server-lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pd-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev for usb-detection'
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install libudev-dev
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'set complex environment variables'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/react-api-client-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install libudev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/robot-server-lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/shared-data-test-lint-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v3'
with:
python-version: '3.7'
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
run: sudo apt-get update && sudo apt-get install libudev-dev
- uses: 'actions/setup-node@v1'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: ${{ matrix.python }}
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- uses: 'actions/setup-python@v4'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/step-generation-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-server-lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'
Expand All @@ -63,7 +63,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/usb-bridge-lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'
Expand All @@ -63,7 +63,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
16
38 changes: 3 additions & 35 deletions DEV_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ You will need the following tools installed to develop on the Opentrons platform
- curl
- ssh
- Python v3.7
- Node.js v14
- Node.js v16

### macOS

Expand Down Expand Up @@ -63,7 +63,7 @@ If you haven't used `git` before, **be sure to complete [first-time Git setup][]

Our recommended installation instructions for Node.js differ between `x86_64` (Intel) and `ARM` (M1) Macs.

##### x86-64 Mac (Intel)
##### x86-64 Mac (Intel) & ARM Mac(M1)

On x86, we recommend [nvs][] to install Node.js because it works well and is compatible with macOS, Windows, and Linux.

Expand All @@ -85,7 +85,7 @@ nvs --version
Now we can use nvs to install Node.js v14 and switch on `auto` mode, which will make sure Node.js v14 is used any time we're in the `opentrons` project directory.

```shell
nvs add 14
nvs add 16
nvs auto on
```

Expand All @@ -99,38 +99,6 @@ export NVS_HOME="$HOME/.nvs"
# ...
```

##### ARM Mac (M1)

If you are running an ARM (M1) Mac, you **should not use `nvs` nor `nvm`**, because those tools do not have access to Node.js v14 for the ARM architecture. Until we upgrade to version 16 or higher, you need to use an alternative installation method for Node.js.

Fortunately, you can use `brew` to install an ARM-native version of Node v14.

```shell
brew install node@14
```

Once `brew` finishes installing Node, it will print one additional step to complete the installation to ensure your system selects the proper Node executable to use.

```shell
echo 'export PATH="/opt/homebrew/opt/node@14/bin:$PATH"' >> ~/.zshrc
```

Close and re-open your terminal to confirm that the correct version of Node is installed for the correct architecture.

```shell
node -e "console.log(process.version, process.arch)"
# > v14.19.1 arm64
```

If your `node` command isn't working or is printing the wrong information, confirm that your shell is set up properly. If you print out the contents of `~/.zshrc`, you should see something similar to the following:

```shell
# ~/.zshrc
# ...
export PATH="/opt/homebrew/opt/node@14/bin:$PATH"
# ...
```

#### 2. Install `pyenv` and Python

On macOS, we recommend [pyenv][] to install different versions of Python.
Expand Down
Loading

0 comments on commit d1a9618

Please sign in to comment.