-
Notifications
You must be signed in to change notification settings - Fork 2
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 workflow presenter to run things from threads #514
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #514 +/- ##
==========================================
- Coverage 95.60% 95.56% -0.05%
==========================================
Files 66 66
Lines 4962 4962
==========================================
- Hits 4744 4742 -2
- Misses 218 220 +2 ☔ View full report in Codecov by Sentry. |
continueOnSuccess = lambda success: self.advanceWorkflow() if success else None # noqa E731 | ||
self.handleAction(verifyAndContinue, None, continueOnSuccess) | ||
|
||
def handleAction(self, action, args, onSuccess): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add typehints, I think its important we know onSuccess is a Callable
This reverts commit da4b224.
* fix workflow presenter to run things from threads * fix use of requests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add annotations to handleAction for callable --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Description of work
There are some processes which take place inside workflows. It is important these be able to return errors. Many of these methods were not sent to separate threads, which meant errors could not be handled through the universal error handling point.
This fixes that, providing a method for all workflows to call to easily send methods to new thread.
Explanation of work
Inside
WorkflowPresenter
, split off the functionality that handles actions on continue to handle any kind of action.Updated the workflows to make use of this functionality, instead of their prior
try-catch
blocks that only logged errors to the output.To test
Dev testing
This impacts the following parts of the UI:
Make sure these parts of the workflow are still completely correctly.
CIS testing
N/A
Link to EWM item
There is no ticket for this work , but it supports other work in
EWM#7712
Verification
N/A
Acceptance Criteria
N/A