-
Notifications
You must be signed in to change notification settings - Fork 14k
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
refactor(core): Bifurcate handling of webhooks vs. triggers and pollers (no-changelog) #8494
refactor(core): Bifurcate handling of webhooks vs. triggers and pollers (no-changelog) #8494
Conversation
@@ -388,7 +389,7 @@ export class ActiveWorkflowRunner { | |||
responsePromise?: IDeferredPromise<IExecuteResponsePromiseData>, | |||
donePromise?: IDeferredPromise<IRun | undefined>, | |||
): void => { | |||
this.logger.debug(`Received trigger for workflow "${workflow.name}"`); | |||
this.logger.warn(`Received trigger for workflow "${workflow.name}"`); |
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.
This change will make the logs quite verbose IMO
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.
Did this on purpose - this highlighting makes finding relevant logs while testing much easier. They're only temporary, see above:
Switched some logs to warn to make them easier to scan while debugging. Will revert these before merging.
/** | ||
* Stop running active triggers and pollers for a workflow. | ||
*/ | ||
async removeWorkflowTriggersAndPollers(workflowId: string) { |
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.
Maybe we can deduplicate the remove
function above to use this function as well wdyt?
packages/cli/src/commands/start.ts
Outdated
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.
Looks so much nicer now :D
✅ All Cypress E2E specs passed |
3 flaky tests on run #3973 ↗︎Details:
|
Test | Artifacts | |
---|---|---|
NDV > should not retrieve remote options when required params throw errors |
Test Replay
Screenshots
Video
|
24-ndv-paired-item.cy.ts • 1 flaky test
Test | Artifacts | |
---|---|---|
NDV > resolves expression with default item when input node is not parent, while still pairing items |
Test Replay
Screenshots
Video
|
28-debug.cy.ts • 1 flaky test
Test | Artifacts | |
---|---|---|
Debug > should be able to debug executions |
Test Replay
Screenshots
Video
|
As our understanding of multi-main setup continues to evolve, this PR again refactors all flows to match what we currently think is the best approach.
leadershipChange
init.leader-stepdown
(former leader realizes they lost leadership), the former leader should remove all triggers and pollers for all workflows and stop pruning. Onleader-takeover
(follower became leader), the new leader should add all triggers and pollers for all workflows and start pruning. These events used to beleadershipVacant
andleadershipChange
with slightly different effects.Notes:
warn
to make them easier to scan while debugging. Will revert these before merging.versionId
to every message when adding webhooks, triggers and pollers increases complexity in the already complexadd
andremove
operations.versionId
is only needed in case we need to deactivate a workflow that failed to activate in the leader in reaction to a message. Is it safe to deactivate on failure without referencing theversionId
?