-
Notifications
You must be signed in to change notification settings - Fork 179
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
refactor(api): Port AddressableAreaStore
to StateUpdate
#17027
Conversation
Based on the apparent current behavior.
AddressableAreaAction's callers already supply it with the bare addressable_area_name string. Wrapping that in a Pydantic model doesn't seem to be useful anymore.
25dc77a
to
09851a4
Compare
…the module-occupied one.
api/tests/opentrons/protocol_engine/state/test_addressable_area_store_old.py
Outdated
Show resolved
Hide resolved
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 all looks accurate to me, I answered the questions I could. Thanks for updating this.
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 all looks good, thanks for the migration. Test coverage looks good, particularly on the module addressable areas. Commented on the hanging question regarding module load location.
Thank you both! |
Overview
Closes EXEC-755.
Test Plan and Hands on Testing
Changelog
Following the usual pattern of EXEC-639, port:
AddressableAreaStore
LoadLabwareImplementation
MoveToAddressableAreaImplementation
MoveToAddressableAreaForDropTipImplementation
LoadModuleImplementation
So that the command implementations use
StateUpdate
to tellAddressableAreaStore
what addressable area they have used, instead ofAddressableAreaStore
trying to figure it out for itself.Review requests
See the risk assessment below and the comments on the diff.
Risk assessment
Medium.
This needs careful code review to make sure that the end result on
AddressableAreaState
is unchanged; the code removed fromAddressableAreaStore
should be exactly compensated by the code added to the command implementations.These command implementations did not have full unit test coverage of all the stuff they did with addressable areas and deck configurations, and even if they did, it's very possible for me to mess things up. I initially had one bug where I had
LoadModuleImplementation
load a completely wrong addressable area, and it was only caught by an analysis snapshot test that I guess happened to have a specific deck layout.LoadLabwareImplementation
and its tests in particular have grown to be difficult to verify.