concord-server: assert user enabled before process restart or handler #1262
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.
Some scenarios do not currently check if the current user or initiator is enable/disabled.
on-handler forkson-handler forks are not initiated by a direct API call, so they need a specific checkA specific example: a user sets up an automation that continuously starts hundrds/thousands of processes across many repos with
onCancelandonFailurehandler flows. Admin permanently disables the user to stop impact of new processes, and cancels everything that's been started (either via UI, REST API, or a direct DBcurrent_statusupdate). The process watchdog task in concord-server will continue to generate newonCancelforks until it's satisfied. If those forks fail or are also cancelled, the watchdog continues generating more until the default max of 3 attempts is reached for each parent. An oopsie of 10,000 processes can explode to 40,000 total.A tangential thought: add a cancel process option that disables the
onCancelhandler if it exists?