Skip to content
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(core): "Respond to Webhook" should work with workflows with waiting nodes #12806

Merged
merged 4 commits into from
Feb 3, 2025

Conversation

netroy
Copy link
Member

@netroy netroy commented Jan 23, 2025

Summary

When an execution goes into the waiting state, we shouldn't remove it from ActiveExecutions, and instead retain it to be able to use the response-promise and the startedAt timestamp.

Related Linear tickets, Github issues, and Community forum posts

CAT-545

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Jan 23, 2025
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@ivov ivov self-requested a review January 27, 2025 12:28
ivov
ivov previously approved these changes Jan 28, 2025
Copy link
Contributor

@ivov ivov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Michael confirmed testing so I only did code review.

packages/cli/src/active-executions.ts Show resolved Hide resolved
packages/cli/src/__tests__/active-executions.test.ts Outdated Show resolved Hide resolved
@@ -94,13 +94,15 @@ export class ActiveExecutions {
await this.executionRepository.updateExistingExecution(executionId, execution);
}

const resumingExecution = this.activeExecutions[executionId];
Copy link
Contributor

@ivov ivov Jan 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use ActiveExecutions.getExecution every time we access one?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getExecution throws, and in this case we don't want that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be nice to rename to getExecutionOrFail

Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

Copy link

cypress bot commented Jan 28, 2025

n8n    Run #9079

Run Properties:  status check passed Passed #9079  •  git commit 714d102e39: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 netroy 🗃️ e2e/*
Project n8n
Branch Review CAT-545-respond-with-wait
Run status status check passed Passed #9079
Run duration 04m 39s
Commit git commit 714d102e39: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 netroy 🗃️ e2e/*
Committer कारतोफ्फेलस्क्रिप्ट™
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 5
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 433
View all changes introduced in this branch ↗︎

Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

1 similar comment
Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

@netroy netroy requested a review from ivov February 3, 2025 10:17
Copy link
Contributor

github-actions bot commented Feb 3, 2025

✅ All Cypress E2E specs passed

@netroy netroy merged commit e8635f2 into master Feb 3, 2025
37 checks passed
@netroy netroy deleted the CAT-545-respond-with-wait branch February 3, 2025 11:24
This was referenced Feb 5, 2025
@janober
Copy link
Member

janober commented Feb 6, 2025

Got released with n8n@1.78.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants