n8n/packages
Omar Ajoue 3ba7deb337
fix: Ensure external hooks post workflow execute run in queue mode (#7947)
## Summary
Since 1.8.x a refactor removed the call to `workflow.postExecute`'s
External hook from the execution path. This PR adds it back to the
correct place, where workers are supposed to call this, allowing us to
avoid having to re-read the execution data in the caller just for the
hooks.

It is important to have the hooks running in the worker whenever
possible to prevent having to read the full execution data in the
caller.

#### How to test the change:
1. Use the attached hooks file
[external-hooks.txt](https://github.com/n8n-io/n8n/files/13597270/external-hooks.txt)
setting it up via environment variable using `export
EXTERNAL_HOOK_FILES=/path/to/hooks/external-hooks.js`
2. Set up queue mode loading this file in both main and workers
3. See that the message logs will not be displayed without this fix


## Issues fixed
Include links to Github issue or Community forum post or **Linear
ticket**:



## Review / Merge checklist
- [ ] PR title and summary are descriptive. **Remember, the title
automatically goes into the changelog. Use `(no-changelog)` otherwise.**
([conventions](https://github.com/n8n-io/n8n/blob/master/.github/pull_request_title_conventions.md))
- [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up
ticket created.
- [ ] Tests included.
> A bug is not considered fixed, unless a test is added to prevent it
from happening again. A feature is not complete without tests.
  >
> *(internal)* You can use Slack commands to trigger [e2e
tests](https://www.notion.so/n8n/How-to-use-Test-Instances-d65f49dfc51f441ea44367fb6f67eb0a?pvs=4#a39f9e5ba64a48b58a71d81c837e8227)
or [deploy test
instance](https://www.notion.so/n8n/How-to-use-Test-Instances-d65f49dfc51f441ea44367fb6f67eb0a?pvs=4#f6a177d32bde4b57ae2da0b8e454bfce)
or [deploy early access version on
Cloud](https://www.notion.so/n8n/Cloudbot-3dbe779836004972b7057bc989526998?pvs=4#fef2d36ab02247e1a0f65a74f6fb534e).
2023-12-07 10:00:05 +00:00
..
@n8n fix: Run dev command only for core packages (no-changelog) (#7928) 2023-12-06 17:28:33 +02:00
@n8n_io/eslint-config build: Upgrade lint related packages (#7790) 2023-11-27 09:11:52 +01:00
cli fix: Ensure external hooks post workflow execute run in queue mode (#7947) 2023-12-07 10:00:05 +00:00
core fix(core): Fix user comparison in same-user subworkflow caller policy (#7913) 2023-12-06 12:27:11 +00:00
design-system fix: Run dev command only for core packages (no-changelog) (#7928) 2023-12-06 17:28:33 +02:00
editor-ui fix(editor): Allow SSH protocol in git repository URL for environments (#7944) 2023-12-07 09:19:32 +01:00
node-dev 🚀 Release 1.19.0 (#7863) 2023-11-29 13:17:03 +01:00
nodes-base fix(Webhook Node): Binary data handling (#7804) 2023-12-06 17:46:40 +02:00
workflow fix(core): Fix user comparison in same-user subworkflow caller policy (#7913) 2023-12-06 12:27:11 +00:00