Fix script crashed state and retry in the script runner UI #2534#2552
Closed
markjmiller wants to merge 1 commit intoOpenC3:mainfrom
Closed
Fix script crashed state and retry in the script runner UI #2534#2552markjmiller wants to merge 1 commit intoOpenC3:mainfrom
markjmiller wants to merge 1 commit intoOpenC3:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2552 +/- ##
==========================================
- Coverage 79.37% 79.18% -0.20%
==========================================
Files 660 661 +1
Lines 50691 51215 +524
Branches 736 736
==========================================
+ Hits 40238 40553 +315
- Misses 10373 10582 +209
Partials 80 80
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
@markjmiller thanks for the PR! I incorporated your changes into my own PR to address this issue here: #2563. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes
Explanation
The UI now properly handles the “crashed” state for a script and gives better indication that the script should be retried instead of stopped and started. I think the previous semantics for fatal/crashed were incorrect so I fixed them. Previous to this change, “crashed” was lumped together with error/paused/waiting/breakpoint. However the script is still actively running for those states, but “crashed” actually means the script has stopped. Therefore, “crashed” should reset to the init/start state instead.
For retrying, logically there's two types of retries that exist: Retry on Error and Retry on Crashed. They should be treated differently because of the aforementioned “error means still running” and “crashed means no longer running” (also consider that error will pause on the errored line—crashed will not).
Because of this, instead of appropriating the current
pauseOrRetryButton, it makes sense to renamestartOrGoButtontostartGoRetryButtonand use that. If you try to use the existing retry button and endpoint on a crashed script, it will do nothing (further confirming what I'm saying about crashed scripts not running, and how the previous UI code didn't model this).With these changes,
this.fataldoesn’t mean or do anything anymore, so I removed it. Note there was already a dead code path that checkedthis.state == 'fatal’even though that’s not a state the backend will ever send.Validation
Here's what it does now:
Here's what it did previously (notice "retry" also didn't work!):