-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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): Account for immediate confirmation request during test webhook creation #8329
fix(core): Account for immediate confirmation request during test webhook creation #8329
Conversation
destinationNode, | ||
webhook: cacheableWebhook as IWebhookData, | ||
}); | ||
await this.registrations.register(registration); |
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.
We can now remove this row right? And if it fails, shouldn't we deregister as part of the catch block?
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 line ensures the static data that was updated during creation makes it into the cache.
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.
Got it! What about the automated de-registration if it fails?
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.
If registration throws, catch calls deactivateWebhooks
where the last line deregisters test webhooks. That was not changed in this PR.
1 flaky test on run #3767 ↗︎
Details:
cypress/e2e/29-templates.cy.ts • 1 flaky test
Review all test suite changes for PR #8329 ↗︎ |
✅ All Cypress E2E specs passed |
Got released with |
Some third-party services send a confirmation request immediately on webhook creation - but by the time the confirmation request reaches the server, the test webhook not yet cached, so the confirmation request receives a 404. This PR ensures we register the test webhook before creation at the third-party service.
Tested in-memory and with Redis.
To test manually, log in to Asana using
nodeqa
in the vault and create a PAT, runpnpm start:tunnel
, create an Asana credential, create an Asana trigger (resource is e.g. the numeric ID for a task in the URL), and create a test webhook. Creation should succeed, and user-prompted events should be received.Report: https://n8nio.slack.com/archives/C04B1GZ4T0U/p1705210902129699