Skip to content

Commit 32b1c67

Browse files
committed
chore: 'edge' -> chore_merge_back-7.3.1-to_edge
Merge edge into the working edge branch and fixup merge conflicts. This is mostly about integrating the addition of actual versioned tip overlap data with the new structure in edge.
2 parents 1ea906e + 7590453 commit 32b1c67

File tree

2,812 files changed

+1063040
-31623
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,812 files changed

+1063040
-31623
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ hardware-testing/**
3232
app-testing/files
3333
# app testing don't format the snapshots
3434
app-testing/tests/__snapshots__
35+
opentrons-ai-server/package
36+
opentrons-ai-server/api/storage/index/

.eslintrc.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ module.exports = {
4949
importNames: [
5050
'useAllRunsQuery',
5151
'useRunQuery',
52-
'useLastRunCommandKey',
52+
'useAllCommandsQuery',
5353
'useCurrentMaintenanceRun',
5454
'useDeckConfigurationQuery',
5555
'useAllCommandsAsPreSerializedList',
5656
],
5757
message:
58-
'The HTTP hook is deprecated. Utilize the equivalent notification wrapper (useNotifyX) instead.',
58+
'HTTP hook deprecated. Use the equivalent notification wrapper (useNotifyXYZ).',
5959
},
6060
],
6161
},
@@ -101,10 +101,7 @@ module.exports = {
101101
'@typescript-eslint/no-floating-promises': 'warn',
102102
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
103103
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'warn',
104-
'@typescript-eslint/no-unsafe-argument': 'warn',
105-
'@typescript-eslint/consistent-type-imports': 'warn',
106104
'@typescript-eslint/consistent-indexed-object-style': 'warn',
107-
'@typescript-eslint/no-confusing-void-expression': 'warn',
108105
'@typescript-eslint/ban-types': 'warn',
109106
'@typescript-eslint/non-nullable-type-assertion-style': 'warn',
110107
'@typescript-eslint/await-thenable': 'warn',
@@ -128,22 +125,20 @@ module.exports = {
128125
'**/__fixtures__/**.@(js|ts|tsx)',
129126
'**/fixtures/**.@(js|ts|tsx)',
130127
'scripts/*.@(js|ts|tsx)',
128+
'**/**test.@(js|ts|tsx)',
131129
],
132130
rules: {
133131
'@typescript-eslint/consistent-type-assertions': 'off',
134132
'@typescript-eslint/no-var-requires': 'off',
135133
'@typescript-eslint/explicit-function-return-type': 'off',
134+
'@typescript-eslint/no-unsafe-argument': 'off',
136135
'@typescript-eslint/no-confusing-void-expression': 'warn',
137136
'node/handle-callback-err': 'off',
138137
},
139138
},
140139
{
141140
files: ['**/__tests__/**test.tsx'],
142141
extends: ['plugin:testing-library/react'],
143-
rules: {
144-
'testing-library/no-manual-cleanup': 'off',
145-
'testing-library/prefer-screen-queries': 'warn',
146-
},
147142
},
148143
{
149144
files: ['**/*.stories.tsx'],

.github/workflows/analyses-snapshot-test.yaml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,23 @@ on:
1313
default: 'edge'
1414
schedule:
1515
- cron: '26 7 * * *' # 7:26 AM UTC
16+
pull_request:
17+
paths:
18+
- 'api/**'
19+
- 'shared-data/**/*'
20+
- '!shared-data/js/**'
21+
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
24+
cancel-in-progress: true
1625

1726
jobs:
1827
build-and-test:
1928
timeout-minutes: 15
2029
runs-on: ubuntu-latest
2130
env:
22-
TARGET: ${{ github.event.inputs.TARGET || 'edge' }}
23-
TEST_SOURCE: ${{ github.event.inputs.TEST_SOURCE || 'edge' }}
31+
TARGET: ${{ github.event.inputs.TARGET || github.head_ref || 'edge' }}
32+
TEST_SOURCE: ${{ github.event.inputs.TEST_SOURCE || github.head_ref || 'edge' }}
2433

2534
steps:
2635
- name: Checkout Repository
@@ -61,6 +70,7 @@ jobs:
6170
run: make snapshot-test-update
6271

6372
- name: Create Snapshot update Request
73+
id: create-pull-request
6474
if: failure()
6575
uses: peter-evans/create-pull-request@v5
6676
with:
@@ -70,3 +80,15 @@ jobs:
7080
branch: 'app-testing/${{ env.TARGET }}-from-${{ env.TEST_SOURCE}}'
7181
base: ${{ env.TEST_SOURCE}}
7282

83+
- name: Comment on PR
84+
if: failure() && github.event_name == 'pull_request'
85+
uses: actions/github-script@v7
86+
with:
87+
script: |
88+
const message = 'A PR has been opened to address analyses snapshot changes. Please review the changes here: https://github.com/${{ github.repository }}/pull/${{ steps.create-pull-request.outputs.pull-request-number }}';
89+
github.rest.issues.createComment({
90+
owner: context.repo.owner,
91+
repo: context.repo.repo,
92+
issue_number: context.issue.number,
93+
body: message
94+
});

.github/workflows/components-test-build-deploy.yaml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@ on:
77
paths:
88
- 'Makefile'
99
- 'components/**'
10-
- 'app/**/*.stories.@(js|jsx|ts|tsx)'
10+
- 'app/**/*.stories.*'
11+
- 'app/src/atoms/**/*'
12+
- 'app/src/molecules/**/*'
1113
- 'package.json'
1214
- '.github/workflows/components-test-build-deploy.yaml'
1315
push:
1416
paths:
1517
- 'components/**'
16-
- 'app/**/*.stories.@(js|jsx|ts|tsx)'
18+
- 'app/**/*.stories.*'
19+
- 'app/src/atoms/**/*'
20+
- 'app/src/molecules/**/*'
1721
- 'package.json'
1822
- '.github/workflows/components-test-build-deploy.yaml'
1923
branches:
@@ -114,15 +118,18 @@ jobs:
114118
steps:
115119
- id: determine-build-type
116120
run: |
117-
echo "Determining build type for event ${{github.event_type}} and ref ${{github.ref}}"
118-
if [ "${{ format('{0}', github.ref == 'refs/heads/edge') }}" = "true" ] ; then
119-
echo "storybook s3 builds for edge"
121+
echo "Determining build type for event ${{github.event_name}} and ref ${{github.ref}}"
122+
if [ "${{ format('{0}', github.event_name == 'pull_request') }}" = "true" ] ; then
123+
echo "No builds for pull requests"
124+
echo 'type=none' >> $GITHUB_OUTPUT
125+
elif [ "${{ format('{0}', startsWith(github.ref, 'refs/heads/')) }}" = "true" ] ; then
126+
echo "storybook s3 builds for branch ${{ github.ref_name }}"
120127
echo 'type=storybook' >> $GITHUB_OUTPUT
121128
elif [ "${{ format('{0}', startsWith(github.ref, 'refs/tags/components')) }}" = "true" ] ; then
122129
echo "publish builds for components tags"
123130
echo 'type=publish' >> $GITHUB_OUTPUT
124131
else
125-
echo "No build for ref ${{github.ref}} and event ${{github.event_type}}"
132+
echo "No build for ref ${{github.ref}} and event ${{github.event_name}}"
126133
echo 'type=none' >> $GITHUB_OUTPUT
127134
fi
128135
@@ -162,6 +169,10 @@ jobs:
162169
AWS_DEFAULT_REGION: us-east-2
163170
run: |
164171
aws s3 sync ./dist s3://opentrons-components/${{ env.OT_BRANCH}} --acl public-read
172+
- name: 'Set generated URL'
173+
run: |
174+
echo 'Created component storybook for [${{ env.OT_BRANCH }}](https://s3-us-west-2.amazonaws.com/opentrons-components/${{ env.OT_BRANCH }}/index.html?path=/)' >> $GITHUB_STEP_SUMMARY
175+
echo 'Created component storybook for https://s3-us-west-2.amazonaws.com/opentrons-components/${{ env.OT_BRANCH }}/index.html?path=/'
165176
166177
publish-components:
167178
name: 'publish components package to npm'
@@ -190,9 +201,9 @@ jobs:
190201
npm config set cache ./.npm-cache
191202
yarn config set cache-folder ./.yarn-cache
192203
make setup-js
193-
- name: 'build typescript'
194-
run: make build-ts
195-
- name: 'build library'
204+
- name: 'build typescript types'
205+
run: make -C components build-ts
206+
- name: 'build js bundle'
196207
run: |
197208
make -C components lib
198209
# replace package.json stub version number with version from tag

.github/workflows/hardware-testing.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
paths:
1010
- 'Makefile'
1111
- 'hardware-testing/**'
12+
- 'api/**'
13+
- 'shared-data/**'
14+
- 'hardware/**'
1215
- '.github/workflows/hardware-testing.yaml'
1316
- '.github/actions/python/**'
1417
branches:

.github/workflows/js-check.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ jobs:
7575
make setup-js
7676
# Use the if to run all the lint checks even of some fail
7777
shell: bash
78-
- name: 'lint js'
79-
if: always() && steps.setup-js.outcome == 'success'
80-
run: make lint-js
8178
- name: 'typechecks'
8279
if: always() && steps.setup-js.outcome == 'success'
8380
run: make check-js
81+
- name: 'lint js'
82+
if: always() && steps.setup-js.outcome == 'success'
83+
run: make lint-js
8484
- name: 'circular deps'
8585
if: always() && steps.setup-js.outcome == 'success'
8686
run: make circular-dependencies-js
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: 'OpentronsAI client edge continuous deployment to staging'
2+
3+
on:
4+
push:
5+
branches:
6+
- edge
7+
paths:
8+
- 'opentrons-ai-client/**'
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.run_id }}
12+
cancel-in-progress: true
13+
14+
env:
15+
CI: true
16+
17+
jobs:
18+
js-unit-test:
19+
runs-on: 'ubuntu-22.04'
20+
permissions:
21+
id-token: write
22+
contents: read
23+
name: 'OpentronsAI client edge continuous deployment to staging'
24+
timeout-minutes: 10
25+
steps:
26+
- uses: 'actions/checkout@v3'
27+
- uses: 'actions/setup-node@v3'
28+
with:
29+
node-version: '18.19.0'
30+
- name: 'install udev'
31+
run: |
32+
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
33+
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
34+
sudo apt-get update && sudo apt-get install libudev-dev
35+
- name: 'set complex environment variables'
36+
id: 'set-vars'
37+
uses: actions/github-script@v6
38+
with:
39+
script: |
40+
const { buildComplexEnvVars } = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/utils.js`)
41+
buildComplexEnvVars(core, context)
42+
- name: 'cache yarn cache'
43+
uses: actions/cache@v3
44+
with:
45+
path: |
46+
${{ github.workspace }}/.npm-cache/_prebuild
47+
${{ github.workspace }}/.yarn-cache
48+
key: js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
49+
- name: 'setup-js'
50+
run: |
51+
npm config set cache ${{ github.workspace }}/.npm-cache
52+
yarn config set cache-folder ${{ github.workspace }}/.yarn-cache
53+
make setup-js
54+
- name: 'build'
55+
run: |
56+
make -C opentrons-ai-client build-staging
57+
- name: Configure AWS Credentials
58+
uses: aws-actions/configure-aws-credentials@v4
59+
with:
60+
role-to-assume: ${{ secrets.STAGING_AI_ROLE_ARN }}
61+
aws-region: ${{ secrets.STAGING_AI_REGION }}
62+
- name: 'deploy to staging'
63+
run: |
64+
make -C opentrons-ai-client staging-deploy
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: 'OpentronsAI production deployment'
2+
3+
on:
4+
push:
5+
tags:
6+
- 'ai-client@*'
7+
- 'ai-server@*'
8+
9+
env:
10+
CI: true
11+
12+
jobs:
13+
deploy-client:
14+
if: startsWith(github.ref, 'refs/tags/ai-client@')
15+
# if there is a deployment (this workflow) in progress for the ai-client@ tag, cancel it
16+
concurrency:
17+
group: ${{ github.workflow }}-ai-client@
18+
cancel-in-progress: true
19+
runs-on: 'ubuntu-22.04'
20+
permissions:
21+
id-token: write
22+
contents: read
23+
name: 'OpentronsAI client prod deploy'
24+
timeout-minutes: 10
25+
steps:
26+
- uses: 'actions/checkout@v3'
27+
- uses: 'actions/setup-node@v3'
28+
with:
29+
node-version: '18.19.0'
30+
- name: 'install udev'
31+
run: |
32+
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
33+
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
34+
sudo apt-get update && sudo apt-get install libudev-dev
35+
- name: 'set complex environment variables'
36+
id: 'set-vars'
37+
uses: actions/github-script@v6
38+
with:
39+
script: |
40+
const { buildComplexEnvVars } = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/utils.js`)
41+
buildComplexEnvVars(core, context)
42+
- name: 'cache yarn cache'
43+
uses: actions/cache@v3
44+
with:
45+
path: |
46+
${{ github.workspace }}/.npm-cache/_prebuild
47+
${{ github.workspace }}/.yarn-cache
48+
key: js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
49+
- name: 'setup-js'
50+
run: |
51+
npm config set cache ${{ github.workspace }}/.npm-cache
52+
yarn config set cache-folder ${{ github.workspace }}/.yarn-cache
53+
make setup-js
54+
- name: 'build'
55+
run: |
56+
make -C opentrons-ai-client build-production
57+
- name: Configure AWS Credentials
58+
uses: aws-actions/configure-aws-credentials@v4
59+
with:
60+
role-to-assume: ${{ secrets.PROD_AI_ROLE_ARN }}
61+
aws-region: ${{ secrets.PROD_AI_REGION }}
62+
- name: 'deploy client to prod'
63+
run: |
64+
make -C opentrons-ai-client prod-deploy
65+
66+
deploy-server:
67+
if: startsWith(github.ref, 'refs/tags/ai-server@')
68+
# if there is a deployment (this workflow) in progress for the ai-server@ tag, cancel it
69+
concurrency:
70+
group: ${{ github.workflow }}-ai-server@
71+
cancel-in-progress: true
72+
runs-on: 'ubuntu-latest'
73+
permissions:
74+
id-token: write
75+
contents: read
76+
name: 'OpentronsAI server prod deploy'
77+
timeout-minutes: 10
78+
steps:
79+
- name: Extract Version
80+
id: extract_version
81+
run: |
82+
TAG_REF=${{ github.ref }}
83+
SERVER_VERSION=${TAG_REF#refs/tags/ai-server@}
84+
echo "SERVER_VERSION=$SERVER_VERSION" >> "$GITHUB_OUTPUT"
85+
- name: Checkout opentrons repo
86+
uses: 'actions/checkout@v4'
87+
- name: Setup Python
88+
uses: 'actions/setup-python@v5'
89+
with:
90+
python-version: '3.12'
91+
cache: 'pipenv'
92+
cache-dependency-path: opentrons-ai-server/Pipfile.lock
93+
- name: Setup
94+
id: install
95+
working-directory: ./opentrons-ai-server
96+
run: make setup
97+
- name: Configure AWS Credentials
98+
uses: aws-actions/configure-aws-credentials@v4
99+
with:
100+
role-to-assume: ${{ secrets.PROD_AI_ROLE_ARN }}
101+
aws-region: ${{ secrets.PROD_AI_REGION }}
102+
- name: 'deploy api to prod'
103+
working-directory: ./opentrons-ai-server
104+
run: |
105+
make deploy ENV=prod TAG=${{ steps.extract_version.outputs.SERVER_VERSION }}

0 commit comments

Comments
 (0)