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(api): disallow moving a fixed-trash labware #13534

Merged

Conversation

TamarZanzouri
Copy link
Contributor

Overview

follow up work for #13504.
disallow moving a labware if it has a fixed trash quirk.

Test Plan

try moving a fixed trash labware. make sure it raises.
try moving a non fixed-trash labware - make sure it works as expected.

Changelog

  • validate that the movable labware is not a fixed trash. if it is, raise.

Risk assessment

low. should only affect fixed-trash labware in move-labware.

@TamarZanzouri TamarZanzouri requested a review from a team as a code owner September 12, 2023 19:59
@TamarZanzouri TamarZanzouri added the robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience). label Sep 12, 2023
@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

Merging #13534 (ee73e64) into chore_release-7.0.0 (4f87ee2) will not change coverage.
Report is 3 commits behind head on chore_release-7.0.0.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                  @@
##           chore_release-7.0.0   #13534   +/-   ##
====================================================
  Coverage                71.32%   71.32%           
====================================================
  Files                     1586     1586           
  Lines                    52792    52792           
  Branches                  3437     3437           
====================================================
  Hits                     37656    37656           
  Misses                   14606    14606           
  Partials                   530      530           
Flag Coverage Δ
g-code-testing 96.44% <ø> (ø)
notify-server 89.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Contributor

@SyntaxColoring SyntaxColoring left a comment

Choose a reason for hiding this comment

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

Code looks great to me. Will test today.

Copy link
Contributor

@SyntaxColoring SyntaxColoring left a comment

Choose a reason for hiding this comment

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

Tested, works as described. 🚮

Comment on lines 95 to 97
if labware_validation.validate_if_labware_is_fixed_trash(
current_labware_definition
):
Copy link
Member

Choose a reason for hiding this comment

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

I think we should just use the labware_view.is_fized_trash() check to test if this is the fixed trash. We really only care about the 'fixed' trash in slot 12/ A3 and want to keep that fixed/ unmovable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

Copy link
Member

@sanni-t sanni-t left a comment

Choose a reason for hiding this comment

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

🙌 Thanks for the quick fix!!

@TamarZanzouri TamarZanzouri merged commit d627f1a into chore_release-7.0.0 Sep 12, 2023
@TamarZanzouri TamarZanzouri deleted the fix-do-not-move-labware-if-fixed-trash branch September 12, 2023 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants