Skip to content
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

fix(protocol-designer): properly delete and generate adapter/labware … #17157

Closed
wants to merge 4 commits into from

Conversation

jerader
Copy link
Collaborator

@jerader jerader commented Dec 19, 2024

…combo when editing

closes RQA-3777 RQA-3804

Overview

Wowza this was a very annoying bug haha, took me about 4 hours to figure out what to do to handle all cases. basically, we weren't properly regenerating labware if you edit the labware on top of the adapter but not the adapter. this PR fixes that

Test Plan and Hands on Testing

Look at the ticket and test the example, then test editing labware in general on the deck, on an adapter and on a module and make sure it all works as expected

For the 2nd bug fix, upload the attached protocol, edit the labware on top of the heater-shaker module and go back to the protocol steps and see that the heater-shaker steps don't error. The transfer steps error and that's because we no longer have the dispense labware

1.0 testing (18).json

Changelog

refine logic for when to delete and create labware
create thunk for creating module and migrating the saved step forms module id

Risk assessment

low

@jerader jerader requested a review from a team as a code owner December 19, 2024 21:20
@jerader jerader requested review from koji and ncdiehl11 December 19, 2024 21:20
@ncdiehl11
Copy link
Collaborator

@jerader
Copy link
Collaborator Author

jerader commented Dec 20, 2024

Not sure if this is the same bug? https://github.com/user-attachments/assets/3823ca3f-e261-4bca-b4d0-e950d8e1b4c3

@ncdiehl11 - oof nice catch. i think thats a new bug. i'll try to fix it in this PR

@jerader
Copy link
Collaborator Author

jerader commented Dec 20, 2024

Not sure if this is the same bug? https://github.com/user-attachments/assets/3823ca3f-e261-4bca-b4d0-e950d8e1b4c3

@ncdiehl11 - oof nice catch. i think thats a new bug. i'll try to fix it in this PR

@ncdiehl11 ok the bug you found is because the moduleId in the steps doesn't match the moduleId in module entities, and that is because when you edited your heater-shaker labware, the heater-shaker module gets regenerated, meaning it has a new moduleId. I guess the correct fix here is to update each step to have the correct moduleId if you edit the module. I'll work on fixing that in this PR

)
const magneticModuleDisplayName =
getModuleDisplayName(modules[magneticModuleId]?.model) ??
'Unknown module'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unknown module is the fallback for each of these. users should not be running into it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit maybe add a translation here

@jerader
Copy link
Collaborator Author

jerader commented Dec 20, 2024

closing this in lieu of this identical PR targeting PD 8.2.3 for a hot fix: #17161

@jerader jerader closed this Dec 20, 2024
@jerader jerader deleted the pd_fix-adapter-labware-bug branch December 20, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants