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

refactor(RabbitMQ Trigger Node): Improve type-safety, add tests, and fix issues with manual triggers #10663

Merged
merged 3 commits into from
Sep 5, 2024

Conversation

netroy
Copy link
Member

@netroy netroy commented Sep 4, 2024

Summary

This PR:

  1. Fixes the issue with manual triggers when there was already a pending message in the queue.
  2. Improves type-safety in this code
  3. Adds unit tests for some parts of the code
  4. Re-uses rabbitmqConnect for credential testing as well

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/NODE-1230/
#8871

Review / Merge checklist

  • PR title and summary are descriptive
  • Tests included

Sorry, something went wrong.

@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team node/improvement New feature or request labels Sep 4, 2024

Verified

This commit was signed with the committer’s verified signature.
tomi Tomi Turtiainen
…sting

Verified

This commit was signed with the committer’s verified signature.
tomi Tomi Turtiainen

Verified

This commit was signed with the committer’s verified signature.
tomi Tomi Turtiainen
@netroy netroy force-pushed the NODE-1230-fix-rabbitmq-manual-trigger branch from f5e1ce7 to adf85a4 Compare September 4, 2024 13:33
@netroy netroy changed the title refactor(RabbitMQ Trigger Node): Improve type-safety, and fix issues with manual triggers refactor(RabbitMQ Trigger Node): Improve type-safety, add tests, and fix issues with manual triggers Sep 4, 2024
@netroy netroy marked this pull request as ready for review September 4, 2024 13:35
Comment on lines +49 to +50
// TODO: why is this error handler being added here?
connection.on('error', reject);
Copy link
Member Author

Choose a reason for hiding this comment

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

I still don't know why this line exists, since

  1. the connection can emit an error event long after this promise has been resolved
  2. the connection isn't going to emit an error event when creating a channel. that error is thrown in the createChannel call itself.

Copy link
Contributor

@ShireenMissi ShireenMissi left a comment

Choose a reason for hiding this comment

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

LGTM 🎉
Thanks for refactoring @netroy 🙏

Copy link

cypress bot commented Sep 4, 2024

n8n    Run #6740

Run Properties:  status check passed Passed #6740  •  git commit adf85a466e: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 netroy 🗃️ e2e/*
Project n8n
Branch Review NODE-1230-fix-rabbitmq-manual-trigger
Run status status check passed Passed #6740
Run duration 04m 47s
Commit git commit adf85a466e: 🌳 🖥️ 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 2
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 423
View all changes introduced in this branch ↗︎

Copy link
Contributor

github-actions bot commented Sep 4, 2024

✅ All Cypress E2E specs passed

@netroy netroy merged commit e50f0e6 into master Sep 5, 2024
42 checks passed
@netroy netroy deleted the NODE-1230-fix-rabbitmq-manual-trigger branch September 5, 2024 06:11
MiloradFilipovic added a commit that referenced this pull request Sep 5, 2024

Verified

This commit was signed with the committer’s verified signature.
tomi Tomi Turtiainen
* master:
  refactor(RabbitMQ Trigger Node): Improve type-safety, add tests, and fix issues with manual triggers (#10663)
  feat(editor): Add support for nodes with multiple main inputs in new canvas (no-changelog) (#10659)
  fix(editor): Set minimum zoom to 0 to allow fitting very large workflows in new canvas (no-changelog) (#10666)
  feat(editor): Change selection to be default canvas behaviour (no-changelog) (#10668)
  feat: More hints to nodes  (#10565)
  fix(editor): Fix opening executions tab from a new, unsaved workflow (#10652)
  fix(AI Agent Node): Fix tools agent when using memory and Anthropic models (#10513)
  feat(editor): Make highlighted data pane floating (#10638)
  fix(editor): Fix workflow loading after switching to executions view in new canvas (no-changelog) (#10655)
  refactor(benchmark): Separate cloud env provisioning from running benchmarks (#10657)
  feat(core): Implement wrapping of regular nodes as AI Tools (#10641)
  refactor(editor): Remove Trial logic in personalization modal and port to script setup (#10649)
  fix(core): Declutter webhook insertion errors (#10650)
  feat: Reintroduce collaboration feature (#10602)
  feat(benchmark): Add scenario for expressions with Set node (#10647)
  feat(benchmark): Add benchmark scenario for binary files (#10648)
  build: Add `reset` script (#10627)
  feat(editor): Overhaul node insert position computation in new canvas (no-changelog) (#10637)
@janober
Copy link
Member

janober commented Sep 5, 2024

Got released with n8n@1.58.0

riascho pushed a commit that referenced this pull request Sep 23, 2024

Verified

This commit was signed with the committer’s verified signature.
tomi Tomi Turtiainen
…fix issues with manual triggers (#10663)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team node/improvement New feature or request Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants