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

chore(robot-server, api): add router for creating run error recovery policies #15812

Conversation

TamarZanzouri
Copy link
Contributor

@TamarZanzouri TamarZanzouri commented Jul 26, 2024

Overview

part of https://opentrons.atlassian.net/browse/EXEC-302.

Closes EXEC-589.

add router for creating a error recovery policy for a run.

Test Plan

  • POST via postman to /runs/{runId}/policies with payload:
    { "data": "policyRules": [ { "matchCriteria": { "command": { "commandType": "aspirate", "error": { "errorType": "TipNotAttachedError" } } }, "ifMatch": "ignoreAndContinue" } ] }
    should get a NotImplementedError until @SyntaxColoring finishes PE logic.

Changelog

  • added create_run_policies to runs router.
  • wire up run_data_manager, run_orchestrator and PE signature.

Risk assessment

low.

@TamarZanzouri TamarZanzouri requested a review from a team as a code owner July 26, 2024 18:00
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.

Looks great, thanks. A handful of small changes.

robot-server/robot_server/runs/router/base_router.py Outdated Show resolved Hide resolved
robot-server/robot_server/runs/router/base_router.py Outdated Show resolved Hide resolved
robot-server/robot_server/runs/router/base_router.py Outdated Show resolved Hide resolved
api/src/opentrons/protocol_engine/protocol_engine.py Outdated Show resolved Hide resolved
api/src/opentrons/protocol_runner/run_orchestrator.py Outdated Show resolved Hide resolved
robot-server/robot_server/runs/router/base_router.py Outdated Show resolved Hide resolved
robot-server/robot_server/runs/router/base_router.py Outdated Show resolved Hide resolved
robot-server/tests/runs/router/test_base_router.py Outdated Show resolved Hide resolved
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.

Makes sense to me overall, thanks!

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.

This looks good to merge, and here's some feedback on the description for the future.

robot-server/robot_server/runs/router/base_router.py Outdated Show resolved Hide resolved
@TamarZanzouri TamarZanzouri merged commit a78df60 into edge Jul 29, 2024
21 checks passed
@TamarZanzouri TamarZanzouri deleted the EXEC-302-when-a-command-fails-ignore-it-and-continue-with-the-run branch July 29, 2024 18:59
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