Skip to content

Commit 934ce5b

Browse files
committed
Merge back 'chore_release-pd-8.6.3' into 'chore_release-8.8.0' (#20028)
Resolved conflicts: - protocol-designer/release-notes.md
2 parents ad28f29 + 64da2c8 commit 934ce5b

File tree

12 files changed

+46
-35
lines changed

12 files changed

+46
-35
lines changed

app/src/organisms/ErrorRecoveryFlows/hooks/useDeckMapUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import type {
2323
CutoutConfigProtocolSpec,
2424
DeckDefinition,
2525
LabwareDefinition,
26-
LabwareDefinitionsByUri,
26+
LabwareDefinitionsByURI,
2727
LabwareLocation,
2828
LoadedLabware,
2929
LoadedModule,
@@ -415,7 +415,7 @@ export function getRunCurrentLabwareInfo({
415415

416416
const getLabwareDefinition = (
417417
labware: LoadedLabware,
418-
protocolLabwareDefinitionsByUri: LabwareDefinitionsByUri
418+
protocolLabwareDefinitionsByUri: LabwareDefinitionsByURI
419419
): LabwareDefinition => {
420420
if (labware.id === 'fixedTrash') {
421421
return getFixedTrashLabwareDefinition()

app/src/organisms/InterventionModal/__fixtures__/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
import type { RunData } from '@opentrons/api-client'
88
import type {
99
LabwareDefinition,
10-
LabwareDefinitionsByUri,
10+
LabwareDefinitionsByURI,
1111
Liquid,
1212
LoadedLabware,
1313
LoadedModule,
@@ -171,7 +171,7 @@ export const mockLabwareDefinition = {
171171

172172
export const mockLabwareDefinitionsByUri = {
173173
'opentrons/nest_96_wellplate_100ul_pcr_full_skirt/1': mockLabwareDefinition,
174-
} as LabwareDefinitionsByUri
174+
} as LabwareDefinitionsByURI
175175

176176
export const mockModule: LoadedModule = {
177177
id: 'mockModuleID',

app/src/organisms/InterventionModal/utils/getRunModuleRenderInfo.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type { Module } from '@opentrons/components'
1010
import type {
1111
DeckDefinition,
1212
LabwareDefinition,
13-
LabwareDefinitionsByUri,
13+
LabwareDefinitionsByURI,
1414
ModuleDefinition,
1515
} from '@opentrons/shared-data'
1616

@@ -33,7 +33,7 @@ export interface RunModuleInfo {
3333
export function getRunModuleRenderInfo(
3434
runData: RunData,
3535
deckDef: DeckDefinition,
36-
labwareDefs: LabwareDefinitionsByUri
36+
labwareDefs: LabwareDefinitionsByURI
3737
): RunModuleInfo[] {
3838
if (runData.modules.length > 0) {
3939
return runData.modules.reduce<RunModuleInfo[]>((acc, module) => {

protocol-designer/release-notes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ By using Opentrons Protocol Designer, you agree to the Opentrons End-User Licens
88

99
---
1010

11-
## Opentrons Protocol Designer Changes in 8.6.2
11+
## Opentrons Protocol Designer Changes in 8.6.3
1212

13-
**Welcome to Protocol Designer 8.6.2!**
13+
**Welcome to Protocol Designer 8.6.3!**
1414

15-
This hotfix release improves bug tracking for future software updates.
15+
This hotfix release addresses issues when uploading protocols containing custom labware.
1616

1717
## Opentrons Protocol Designer Changes in 8.6.1
1818

protocol-designer/src/labware-defs/types.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
import type { LabwareDefinition2 } from '@opentrons/shared-data'
1+
import type {
2+
LabwareDef2ByDefURI,
3+
LabwareDefinition2,
4+
} from '@opentrons/shared-data'
25

3-
export type LabwareDefByDefURI = Record<string, LabwareDefinition2>
6+
export type LabwareDefByDefURI = LabwareDef2ByDefURI
47
export type LabwareUploadMessageType =
58
| 'INVALID_JSON_FILE'
69
| 'NOT_JSON'

protocol-designer/src/labware-ingred/utils.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,18 @@ export const getMigratedLabwareId = (
145145
const latestURI = Object.entries(latestDefs).find(
146146
([_, def]) => def.parameters.loadName === loadName
147147
)?.[0]
148+
149+
if (defURI == null) {
150+
console.error(
151+
`expected to find a matching defURI with labwareId ${oldLabwareId} but could not`
152+
)
153+
}
154+
148155
const labwareIdString = oldLabwareId.split(':')[0]
149156
const latestLabwareId =
150-
latestURI != null ? `${labwareIdString}:${latestURI}` : oldLabwareId // fallback to original labwareId for custom labware
157+
latestURI != null
158+
? `${labwareIdString}:${latestURI}`
159+
: `${labwareIdString}:${defURI}` // fallback to original labwareId & defURI for custom labware
151160

152161
return latestLabwareId
153162
}

protocol-designer/src/load-file/migration/8_5_0.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ const getClippedFlowRateForMoveLiquid = (args: {
8787
const tipLiquidSpecs = liquidClass?.byPipette
8888
.find(byPipette => byPipette.pipetteModel === pipetteName)
8989
?.byTipType.find(byTipType => byTipType.tiprack === tiprack)
90+
// TODO: this won't find the definition for a custom tiprack
9091
const tiprackDef = getAllDefinitions()[tiprack]
92+
console.assert(
93+
tiprackDef != null,
94+
`could not find labware definition for ${tiprack}`
95+
)
9196
let correctionVolume: number = 0
9297
if (tipLiquidSpecs != null && flowRateType !== 'blowout') {
9398
const liquidClassLookup =
@@ -130,7 +135,7 @@ const getClippedFlowRateForMoveLiquid = (args: {
130135
const matchingTipLiquidSpecs = getMatchingTipLiquidSpecsFromSpec(
131136
pipetteSpecs,
132137
volume,
133-
formData.tipRack as string
138+
tiprackDef
134139
)
135140

136141
const shaftULperMM = pipetteSpecs?.shaftULperMM

protocol-designer/src/utils/index.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -189,21 +189,14 @@ export const getStagingAreaAddressableAreas = (
189189
export function getMatchingTipLiquidSpecsFromSpec(
190190
pipetteSpecs: PipetteV2Specs,
191191
volume: number,
192-
tiprackUri: string
192+
tiprackDef: LabwareDefinition2
193193
): SupportedTip {
194-
const matchingLabwareDef = getAllDefinitions()[tiprackUri]
195-
196-
console.assert(
197-
matchingLabwareDef,
198-
`expected to find a matching labware def with tiprack ${tiprackUri} but could not`
199-
)
200-
201-
const tipLength = matchingLabwareDef?.parameters.tipLength ?? 0
194+
const tipLength = tiprackDef?.parameters.tipLength ?? 0
202195

203196
if (tipLength === 0) {
204197
console.error(
205198
`expected to find a tiplength with tiprack ${
206-
matchingLabwareDef?.metadata.displayName ?? 'unknown displayName'
199+
tiprackDef?.metadata.displayName ?? 'unknown displayName'
207200
} but could not`
208201
)
209202
}
@@ -229,7 +222,7 @@ export function getMatchingTipLiquidSpecsFromSpec(
229222
console.assert(
230223
matchingTipLiquidSpecs,
231224
`expected to find the tip liquid specs but could not with pipette tiprack displayname ${
232-
matchingLabwareDef?.metadata.displayName ?? 'unknown displayname'
225+
tiprackDef?.metadata.displayName ?? 'unknown displayname'
233226
}`
234227
)
235228

shared-data/js/helpers/getLabwareDefinitionsByURIForProtocol.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ import type {
77
LoadLidStackRunTimeCommand,
88
RunTimeCommand,
99
} from '../../protocol'
10-
import type { LabwareDefinition } from '../types'
11-
12-
export interface LabwareDefinitionsByURI {
13-
[labwareDefURI: string]: LabwareDefinition
14-
}
10+
import type { LabwareDefinition, LabwareDefinitionsByURI } from '../types'
1511

1612
const defPair = (
1713
maybeDef?: LabwareDefinition

shared-data/js/helpers/getLoadedLabwareDefinitionsByUri.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { getLabwareDefURI } from '.'
22

3-
import type { LabwareDefinition, RunTimeCommand } from '..'
4-
5-
export interface LabwareDefinitionsByUri {
6-
[defURI: string]: LabwareDefinition
7-
}
3+
import type {
4+
LabwareDefinition,
5+
LabwareDefinitionsByURI,
6+
RunTimeCommand,
7+
} from '..'
88

99
export function getLoadedLabwareDefinitionsByUri(
1010
commands: RunTimeCommand[]
11-
): LabwareDefinitionsByUri {
11+
): LabwareDefinitionsByURI {
1212
return commands.reduce((acc, command) => {
1313
if (
1414
command.commandType === 'loadLabware' ||

0 commit comments

Comments
 (0)