refactor(protocol-engine): Keep track of failed commands' error recovery types #14795
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This goes towards (but does not close) EXEC-346.
Test Plan
We're sufficiently covered by automated tests.
Changelog
When a command fails, and we choose its recovery type (
WAIT_FOR_RECOVERY
orFAIL_RUN
), store that recovery type for later retrieval.We need this for EXEC-346 because when the Python protocol thread sees a
failed
Protocol Engine command, something needs to tell it whether to raise an exception to immediately fail the run, or wait until an HTTP client issues aresume-from-recovery
action.That's not done in this PR. It will probably happen in feat(api): Pause when
pick_up_tip()
errors in a Python protocol #14753.As discussed a number of times on the RSS team: Deprecate the old unit testing style of testing
CommandView
andCommandStore
independently. Instead, test them together. We already do this forTipView
andTipStore
.New tests should be added to the new file
test_command_state.py
. The old test files have been renamed to*old.py
but are otherwise left in-place. We should gradually shift things to the new style as we continue to work in this area.Review requests
None in particular.
Risk assessment
Low.