-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Automation Orchestrator refactor. #15546
base: master
Are you sure you want to change the base?
Conversation
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
@@ -1134,7 +1138,7 @@ const automationActions = (store: AutomationStore) => ({ | |||
* @returns | |||
*/ | |||
shiftBranch: (pathTo: Array<any>, block: AutomationStep, direction = -1) => { |
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.
Should the block input not be BranchStep
instead?
@@ -13,19 +13,17 @@ export interface TriggerOutput { | |||
timestamp?: number | |||
} | |||
|
|||
export interface AutomationContext extends AutomationResults { | |||
export interface AutomationContext { | |||
trigger: any |
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.
Should this not be an AutomationTrigger?
Description
The motivation for this is a bug in the automation test output when combining a filter step with loop steps: https://linear.app/budibase/issue/BUDI-9015/looped-automation-steps-showing-up-in-test-results-after-a-failed.
In reading the code to try and fix this, I decided to take the plunge and change the way the Orchestrator works in order to make this bug fix easier.
My recommendation for reviewing this is to pull the branch into your local environment and start reading from
packages/server/src/threads/automation.ts
. That's where theOrchestrator
class, the thing that runs automations, lives and where most of the changes are concentrated.Addresses