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(app): Do not swallow protocol run errors #3723

Merged
merged 1 commit into from
Jul 15, 2019

Conversation

mcous
Copy link
Contributor

@mcous mcous commented Jul 15, 2019

overview

In conjunction with #3721, this PR adds a very minimal amount of app-side logic to avoid swallowing protocol run errors that are not the result of protocol cancellation.

Due to technical limitations with RPC, the run error alert does not display the error that API raises. But the fact that any sort of error banner is displayed is a significant improvement from ending the run without any success or failure indication.

Note: the app will still swallow some run errors after this PR. Specifically, it will swallow any error status that is emitted after a "stopped" (cancelled) status is emitted. This seems safe to me until the underlying API issue (#2994) is fixed

Fixes #1828

changelog

  • fix(app): Do now swallow protocol run errors

review requests

  • Cancelled protocol run shows "run cancelled" banner
  • Errored protocol run shows "run encountered an error" banner
    • An error can be induced by telling the robot to go somewhere it can't
    • pipette.move_to((robot.deck, (0, 0, 400)))

@mcous mcous added app Affects the `app` project ready for review fix PR fixes a bug labels Jul 15, 2019
@mcous mcous requested review from a team July 15, 2019 17:08
@mcous mcous changed the title fix(app): Do now swallow protocol run errors fix(app): Do not swallow protocol run errors Jul 15, 2019
@codecov
Copy link

codecov bot commented Jul 15, 2019

Codecov Report

Merging #3723 into release_3.10.0 will increase coverage by 23.08%.
The diff coverage is 66.66%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##           release_3.10.0    #3723       +/-   ##
===================================================
+ Coverage           34.28%   57.36%   +23.08%     
===================================================
  Files                 717      803       +86     
  Lines               11236    22368    +11132     
===================================================
+ Hits                 3852    12831     +8979     
- Misses               7384     9537     +2153
Impacted Files Coverage Δ
app/src/components/RunLog/SessionAlert.js 0% <0%> (ø) ⬆️
app/src/robot/reducer/session.js 100% <100%> (ø) ⬆️
...s/FileUploadMessageModal/FileUploadMessageModal.js 0% <0%> (ø) ⬆️
...nts/modals/FileUploadMessageModal/modalContents.js 0% <0%> (ø) ⬆️
opentrons/data_storage/database_queries.py 100% <0%> (ø)
opentrons/drivers/utils.py 72.72% <0%> (ø)
opentrons/protocol_api/execute.py 68.29% <0%> (ø)
opentrons/hardware_control/modules/mod_abc.py 75% <0%> (ø)
opentrons/hardware_control/controller.py 59.84% <0%> (ø)
opentrons/legacy_api/instruments/pipette.py 95.11% <0%> (ø)
... and 80 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4aa5066...eba54aa. Read the comment docs.

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

  • Cancelled protocol run shows "run cancelled" banner
  • Errored protocol run shows "run encountered an error" banner

Tested the protocol with both a smoothie based error (like the moving-to-400 thing) and with a simple python problem calling an undefined function if the robot isn't simulating. Both look good.

@mcous mcous merged commit a5b0028 into release_3.10.0 Jul 15, 2019
@mcous mcous deleted the app_fix-run-error-squashing branch July 15, 2019 19:12
mcous added a commit that referenced this pull request Jul 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Affects the `app` project fix PR fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants