fix(api, shared-data): Flex Stacker engine command optional fields#17989
Merged
ahiuchingau merged 3 commits intoApr 8, 2025
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## chore_release-8.4.0 #17989 +/- ##
=======================================================
- Coverage 27.81% 27.33% -0.48%
=======================================================
Files 3101 3101
Lines 235468 235468
Branches 19127 19131 +4
=======================================================
- Hits 65484 64369 -1115
- Misses 169966 171083 +1117
+ Partials 18 16 -2
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
f71a201 to
ac560fd
Compare
ac560fd to
b4229af
Compare
y3rsh
added a commit
that referenced
this pull request
Apr 9, 2025
…y-path * chore_release-8.4.0: (30 commits) fix(api): make error message clearer for lld issues (#18005) chore(locize): sync for translations needed (#18009) chore(locize): sync translations (#18009) docs(api): API reference entries for liquid class methods (#17887) refactor(api): change the names of liquid classes based transfers (#18006) feat(app, labware-library): add evotip definition assets (#18007) fix(api, shared-data): Flex Stacker engine command optional fields (#17989) fix(shared-data): ethanol aspirate position reference (#17991) fix(app): Labware setup UI fixes (#17987) refactor(app): adjust protocol setup offsets table header (#17985) fix(app): do not show post run drop tip prompt if just handled in Error Recovery (#17981) fix(app): fix LPC disabled reasons not including fixture mismatch (#17979) refactor(app): adjust width on "calibrate now" button (#17978) fix(app): fix applying offsets implicitly when navigating on the desktop app (#17967) feat(robot-server): Populate `locationSequence` on old runs and make it faster to filter out deleted offsets (#17946) feat(app): add inline notification when setting default offsets with a 96ch (#17977) fix(app): ER tip selection crashes when trying to get labware def (#17975) feat(robot-server,system-server): Return server timing metrics in HTTP responses (#17970) fix(app): fix accumulating offsets on run record (#17969) fix(app): Fix local state issues when "resetting to default" in LPC (#17965) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This fixes a bug where downloading a Flex Stacker protocol run log always fails because of pydantic validation errors. We need to make sure the optional params in our pydantic models are properly annotated with
SkipJsonSchem?Review Request
I've only updated schema 12, since this is targeting the release branch. I will need to make the same changes to schema 13 eventually for edge.
{ "errors": [ { "id": "UnexpectedError", "title": "Unexpected Internal Error", "detail": "pydantic_core._pydantic_core.ValidationError: 1 validation error for tagged-union[AirGapInPlace,Aspirate,AspirateInPlace,AspirateWhileTracking,Comment,Custom,Dispense,DispenseInPlace,DispenseWhileTracking,BlowOut,BlowOutInPlace,ConfigureForVolume,ConfigureNozzleLayout,DropTip,DropTipInPlace,Home,RetractAxis,LoadLabware,ReloadLabware,LoadLiquid,LoadLiquidClass,LoadModule,LoadPipette,LoadLidStack,LoadLid,MoveLabware,MoveRelative,MoveToCoordinates,MoveToWell,MoveToAddressableArea,MoveToAddressableAreaForDropTip,PrepareToAspirate,WaitForResume,WaitForResume,WaitForDuration,PickUpTip,SavePosition,SetRailLights,TouchTip,SetStatusBar,VerifyTipPresence,GetTipPresence,GetNextTip,LiquidProbe,TryLiquidProbe,EvotipSealPipette,EvotipDispense,EvotipUnsealPipette,WaitForTemperature,SetTargetTemperature,DeactivateHeater,SetAndWaitForShakeSpeed,DeactivateShaker,OpenLabwareLatch,CloseLabwareLatch,Disengage,Engage,SetTargetTemperature,WaitForTemperature,DeactivateTemperature,SetTargetBlockTemperature,WaitForBlockTemperature,SetTargetLidTemperature,WaitForLidTemperature,DeactivateBlock,DeactivateLid,OpenLid,CloseLid,RunProfile,RunExtendedProfile,CloseLid,OpenLid,Initialize,ReadAbsorbance,Retrieve,Store,SetStoredLabware,Fill,Empty,CloseLatch,OpenLatch,PrepareShuttle,CalibrateGripper,CalibratePipette,CalibrateModule,MoveToMaintenancePosition,UnsafeBlowOutInPlace,UnsafeDropTipInPlace,UpdatePositionEstimators,UnsafeEngageAxes,UnsafeUngripLabware,UnsafePlaceLabware,UnsafeManualRetrieve,MoveTo,MoveAxesRelative,MoveAxesTo,openGripperJaw,closeGripperJaw]\nflexStacker/setStoredLabware.result.adapterLabwareDefinition\n Field required [type=missing, input_value={'primaryLabwareDefinitio...k_1000ul']}, 'count': 1}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.9/v/missing", "meta": { "type": "ValidationError", "code": "4000", "message": "pydantic_core._pydantic_core.ValidationError: 1 validation error for tagged-union[AirGapInPlace,Aspirate,AspirateInPlace,AspirateWhileTracking,Comment,Custom,Dispense,DispenseInPlace,DispenseWhileTracking,BlowOut,BlowOutInPlace,ConfigureForVolume,ConfigureNozzleLayout,DropTip,DropTipInPlace,Home,RetractAxis,LoadLabware,ReloadLabware,LoadLiquid,LoadLiquidClass,LoadModule,LoadPipette,LoadLidStack,LoadLid,MoveLabware,MoveRelative,MoveToCoordinates,MoveToWell,MoveToAddressableArea,MoveToAddressableAreaForDropTip,PrepareToAspirate,WaitForResume,WaitForResume,WaitForDuration,PickUpTip,SavePosition,SetRailLights,TouchTip,SetStatusBar,VerifyTipPresence,GetTipPresence,GetNextTip,LiquidProbe,TryLiquidProbe,EvotipSealPipette,EvotipDispense,EvotipUnsealPipette,WaitForTemperature,SetTargetTemperature,DeactivateHeater,SetAndWaitForShakeSpeed,DeactivateShaker,OpenLabwareLatch,CloseLabwareLatch,Disengage,Engage,SetTargetTemperature,WaitForTemperature,DeactivateTemperature,SetTargetBlockTemperature,WaitForBlockTemperature,SetTargetLidTemperature,WaitForLidTemperature,DeactivateBlock,DeactivateLid,OpenLid,CloseLid,RunProfile,RunExtendedProfile,CloseLid,OpenLid,Initialize,ReadAbsorbance,Retrieve,Store,SetStoredLabware,Fill,Empty,CloseLatch,OpenLatch,PrepareShuttle,CalibrateGripper,CalibratePipette,CalibrateModule,MoveToMaintenancePosition,UnsafeBlowOutInPlace,UnsafeDropTipInPlace,UpdatePositionEstimators,UnsafeEngageAxes,UnsafeUngripLabware,UnsafePlaceLabware,UnsafeManualRetrieve,MoveTo,MoveAxesRelative,MoveAxesTo,openGripperJaw,closeGripperJaw]\nflexStacker/setStoredLabware.result.adapterLabwareDefinition\n Field required [type=missing, input_value={'primaryLabwareDefinitio...k_1000ul']}, 'count': 1}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.9/v/missing", "detail": { "args": "()", "title": "tagged-union[AirGapInPlace,Aspirate,AspirateInPlace,AspirateWhileTracking,Comment,Custom,Dispense,DispenseInPlace,DispenseWhileTracking,BlowOut,BlowOutInPlace,ConfigureForVolume,ConfigureNozzleLayout,DropTip,DropTipInPlace,Home,RetractAxis,LoadLabware,ReloadLabware,LoadLiquid,LoadLiquidClass,LoadModule,LoadPipette,LoadLidStack,LoadLid,MoveLabware,MoveRelative,MoveToCoordinates,MoveToWell,MoveToAddressableArea,MoveToAddressableAreaForDropTip,PrepareToAspirate,WaitForResume,WaitForResume,WaitForDuration,PickUpTip,SavePosition,SetRailLights,TouchTip,SetStatusBar,VerifyTipPresence,GetTipPresence,GetNextTip,LiquidProbe,TryLiquidProbe,EvotipSealPipette,EvotipDispense,EvotipUnsealPipette,WaitForTemperature,SetTargetTemperature,DeactivateHeater,SetAndWaitForShakeSpeed,DeactivateShaker,OpenLabwareLatch,CloseLabwareLatch,Disengage,Engage,SetTargetTemperature,WaitForTemperature,DeactivateTemperature,SetTargetBlockTemperature,WaitForBlockTemperature,SetTargetLidTemperature,WaitForLidTemperature,DeactivateBlock,DeactivateLid,OpenLid,CloseLid,RunProfile,RunExtendedProfile,CloseLid,OpenLid,Initialize,ReadAbsorbance,Retrieve,Store,SetStoredLabware,Fill,Empty,CloseLatch,OpenLatch,PrepareShuttle,CalibrateGripper,CalibratePipette,CalibrateModule,MoveToMaintenancePosition,UnsafeBlowOutInPlace,UnsafeDropTipInPlace,UpdatePositionEstimators,UnsafeEngageAxes,UnsafeUngripLabware,UnsafePlaceLabware,UnsafeManualRetrieve,MoveTo,MoveAxesRelative,MoveAxesTo,openGripperJaw,closeGripperJaw]", "traceback": " File \"/opt/opentrons-robot-server/starlette/middleware/errors.py\", line 162, in __call__\n await self.app(scope, receive, _send)\n\n File \"/opt/opentrons-robot-server/starlette/middleware/cors.py\", line 83, in __call__\n await self.app(scope, receive, send)\n\n File \"/opt/opentrons-robot-server/starlette/middleware/exceptions.py\", line 79, in __call__\n raise exc\n\n File \"/opt/opentrons-robot-server/starlette/middleware/exceptions.py\", line 68, in __call__\n await self.app(scope, receive, sender)\n\n File \"/opt/opentrons-robot-server/fastapi/middleware/asyncexitstack.py\", line 20, in __call__\n raise e\n\n File \"/opt/opentrons-robot-server/fastapi/middleware/asyncexitstack.py\", line 17, in __call__\n await self.app(scope, receive, send)\n\n File \"/opt/opentrons-robot-server/starlette/routing.py\", line 718, in __call__\n await route.handle(scope, receive, send)\n\n File \"/opt/opentrons-robot-server/starlette/routing.py\", line 276, in handle\n await self.app(scope, receive, send)\n\n File \"/opt/opentrons-robot-server/starlette/routing.py\", line 66, in app\n response = await func(request)\n\n File \"/opt/opentrons-robot-server/fastapi/routing.py\", line 273, in app\n raw_response = await run_endpoint_function(\n\n File \"/opt/opentrons-robot-server/fastapi/routing.py\", line 190, in run_endpoint_function\n return await dependant.call(**values)\n\n File \"/opt/opentrons-robot-server/robot_server/runs/router/commands_router.py\", line 306, in get_run_commands\n command_slice = run_data_manager.get_commands_slice(\n\n File \"/opt/opentrons-robot-server/robot_server/runs/run_data_manager.py\", line 431, in get_commands_slice\n return self._run_store.get_commands_slice(\n\n File \"/opt/opentrons-robot-server/robot_server/runs/run_store.py\", line 519, in get_commands_slice\n sliced_commands: List[Command] = [\n\n File \"/opt/opentrons-robot-server/robot_server/runs/run_store.py\", line 520, in <listcomp>\n _parse_command(row.command) for row in slice_result\n\n File \"/opt/opentrons-robot-server/robot_server/runs/run_store.py\", line 835, in _parse_command\n return json_to_pydantic(CommandAdapter, json_str)\n\n File \"/opt/opentrons-robot-server/robot_server/persistence/pydantic.py\", line 46, in json_to_pydantic\n return model.validate_json(json_str)\n\n File \"/opt/opentrons-robot-server/pydantic/type_adapter.py\", line 144, in wrapped\n return func(self, *args, **kwargs)\n\n File \"/opt/opentrons-robot-server/pydantic/type_adapter.py\", line 393, in validate_json\n return self.validator.validate_json(data, strict=strict, context=context)\n", "class": "ValidationError" }, "wrapping": [] }, "errorCode": "4000" } ] }