-
Notifications
You must be signed in to change notification settings - Fork 50.8k
feat(core): Draft/Publish workflow endpoints follow up (no-changelog) #22246
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
1 issue found across 3 files
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name="packages/cli/src/workflows/workflow.service.ts">
<violation number="1" location="packages/cli/src/workflows/workflow.service.ts:490">
Activation failures now emit a `workflow-deactivated` event even when the workflow stays active, because the rollback payload can set `active` back to true. Condition the event emission on the rollback state so listeners aren’t told the workflow deactivated when it didn’t.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
| workflow.active = false; | ||
| workflow.activeVersionId = null; | ||
| workflow.activeVersion = null; | ||
| workflow.active = rollbackPayload.active; |
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.
Activation failures now emit a workflow-deactivated event even when the workflow stays active, because the rollback payload can set active back to true. Condition the event emission on the rollback state so listeners aren’t told the workflow deactivated when it didn’t.
Prompt for AI agents
Address the following comment on packages/cli/src/workflows/workflow.service.ts at line 490:
<comment>Activation failures now emit a `workflow-deactivated` event even when the workflow stays active, because the rollback payload can set `active` back to true. Condition the event emission on the rollback state so listeners aren’t told the workflow deactivated when it didn’t.</comment>
<file context>
@@ -457,37 +471,25 @@ export class WorkflowService {
- workflow.active = false;
- workflow.activeVersionId = null;
- workflow.activeVersion = null;
+ workflow.active = rollbackPayload.active;
+ workflow.activeVersionId = rollbackPayload.activeVersionId;
+ workflow.activeVersion = rollbackPayload.activeVersion;
</file context>
✅ Addressed in 836dfe8
|
E2E Tests: n8n tests passed after 11m 5.6s Run Details
Groups
This message was posted automatically by
currents.dev | Integration Settings
|
Summary
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/ADO-4459/feature-be-workflow-endpoints-follow-up
Review / Merge checklist
release/backport(if the PR is an urgent fix that needs to be backported)