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(robot-server): dont let /instruments block #14608

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

sfoster1
Copy link
Member

@sfoster1 sfoster1 commented Mar 7, 2024

It calls cache_instruments and that can block because it takes the motion lock, but we really don't want that. We don't mind if cache_instruments doesn't get called on the flex because it's sort of a secondary functionality, so just bail early in this case.

Testing

  • Run on a robot and do some GET /instruments while things are homign and note that it instantly returns
  • Do an attach flow and note that it still returns the new instruments.

Closes EXEC-298

It calls cache_instruments and that can block because it takes the
motion lock, but we really don't want that. We don't mind if
cache_instruments doesn't get called on the flex because it's sort of a
secondary functionality, so just bail early in this case.

Closes EXEC-298
@sfoster1 sfoster1 requested a review from a team as a code owner March 7, 2024 21:48
Copy link

codecov bot commented Mar 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.50%. Comparing base (d6d9416) to head (137c260).
Report is 4 commits behind head on edge.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             edge   #14608   +/-   ##
=======================================
  Coverage   67.50%   67.50%           
=======================================
  Files        2514     2514           
  Lines       72376    72376           
  Branches     9317     9317           
=======================================
  Hits        48857    48857           
  Misses      21314    21314           
  Partials     2205     2205           
Flag Coverage Δ
g-code-testing 92.43% <ø> (ø)

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

Files Coverage Δ
api/src/opentrons/hardware_control/api.py 82.33% <ø> (ø)
api/src/opentrons/hardware_control/ot3api.py 79.62% <ø> (ø)
...ardware_control/protocols/instrument_configurer.py 63.15% <ø> (ø)

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.

Interesting!

Copy link
Contributor

@ahiuchingau ahiuchingau left a comment

Choose a reason for hiding this comment

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

Noice

@sfoster1 sfoster1 merged commit a8d78a3 into edge Mar 8, 2024
22 of 23 checks passed
@sfoster1 sfoster1 deleted the exec-298-no-instruments-block branch March 8, 2024 14:27
Carlos-fernandez pushed a commit that referenced this pull request May 20, 2024
It calls cache_instruments and that can block because it takes the
motion lock, but we really don't want that. We don't mind if
cache_instruments doesn't get called on the flex because it's sort of a
secondary functionality, so just bail early in this case.

## Testing
- Run on a robot and do some `GET /instruments` while things are homign
and note that it instantly returns
- Do an attach flow and note that it still returns the new instruments.

Closes EXEC-298
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants