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

feat(robot-server): Wire up global error recovery setting #16416

Merged
merged 13 commits into from
Oct 7, 2024

Conversation

SyntaxColoring
Copy link
Contributor

@SyntaxColoring SyntaxColoring commented Oct 4, 2024

Overview

Closes EXEC-719.

Test Plan and Hands on Testing

  • After PATCHing the enabled setting to false, newly-created runs should fail when they encounter a defined error like tipPhysicallyMissing.
  • After PATCHing the enabled setting to true, or after DELETEing it (resetting it to the default), newly-created runs should enter error recover

Changelog

  • Connect the new PATCH /errorRecovery/settings HTTP API so it actually affects run behavior. This closes EXEC-719.
    • One quirk to my implementation:

      This will not affect preexisting runs, unless you also do PUT /runs/{id}/errorRecoveryPolicy. In effect, PUT /runs/{id}/errorRecoveryPolicy refreshes the run's snapshot of /errorRecovery/settings. This is probably confusing; it would be better if PATCH /errorRecovery/settings immediately affected the preexisting run, or if PUT /runs/{id}/errorRecoveryPolicy did not have that refresh effect.

      I don't think this matters in practice because this button will be disabled or inaccessible in our UIs while there's an active run.

Also fix a couple of nearby, unticketed bugs:

  • If a client gave us an empty error recovery policy, we were no-opping. Instead, we want to overwrite the current policy with the new empty one.
  • The logic in error_recovery_mapping.py was unintentionally enabling error recovery on OT-2 robots if the policy was specific enough. We want it to always be disabled on OT-2s.

Review requests

None in particular.

Risk assessment

Medium: this area needs manual testing.

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.

Nice, looks good to me

@SyntaxColoring SyntaxColoring marked this pull request as ready for review October 4, 2024 17:46
@SyntaxColoring SyntaxColoring requested a review from a team as a code owner October 4, 2024 17:46
@SyntaxColoring SyntaxColoring merged commit 56cd361 into edge Oct 7, 2024
46 checks passed
@SyntaxColoring SyntaxColoring deleted the wire_up_error_recovery_setting branch October 7, 2024 15:11
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.

2 participants