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

feat(Switch Node): Add support for infinite Switch outputs #7499

Merged
merged 6 commits into from
Oct 25, 2023

Conversation

OlegIvaniv
Copy link
Contributor

@OlegIvaniv OlegIvaniv commented Oct 23, 2023

ADO-1224
Github issue / Community forum post (link here to close automatically): https://community.n8n.io/t/add-more-outputs-to-switch-node/3864

@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2023

Great PR! Please pay attention to the following items before merging:

Files matching packages/**:

  • If fixing bug, added test to cover scenario.
  • If addressing forum or Github issue, added link to description.

Files matching packages/**/*.ts:

  • Added unit tests to cover new or updated functionality.

Files matching **/*.vue:

  • Used composition API for all new components.
  • Added component or unit tests to cover functionality.

Files matching packages/editor-ui/**/*.vue:

  • Added E2E if adding new features.
  • Used design system tokens (colors, spacings...) where possible.

Files matching packages/editor-ui/src/mixins/**:

  • Avoided adding new mixins (use composables instead). Only removed code from here.

Files matching packages/nodes-base/nodes/**:

  • Added workflow tests for nodes if possible.

Files matching cypress/e2e/**:

  • Avoided chaining commands more than two or three times (to avoid flakiness because only last one will be retried).
  • Spoofed endpoints that are not critical for the test (to avoid flakiness).
  • Picked most efficient path to start the test (for example skipped account setup and starting at /workflow/new for a canvas test).
  • Avoided adding waits on time (use request intercepts instead).
  • Ensured each spec does not depend on any another spec to pass.

Make sure to check off this list before asking for review.

@Joffcom Joffcom changed the title node(Switch): Allow for infinite Switch outputs feat(Switch Node): Add support for infinite Switch outputs Oct 23, 2023
@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team node/improvement New feature or request node/new Creation of an entirely new node ui Enhancement in /editor-ui or /design-system labels Oct 23, 2023
@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Attention: 209 lines in your changes are missing coverage. Please review.

Comparison is base (41236b7) 33.56% compared to head (78ed0dd) 33.61%.
Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7499      +/-   ##
==========================================
+ Coverage   33.56%   33.61%   +0.05%     
==========================================
  Files        3399     3401       +2     
  Lines      207453   207644     +191     
  Branches    22418    22448      +30     
==========================================
+ Hits        69624    69805     +181     
- Misses     136701   136705       +4     
- Partials     1128     1134       +6     
Files Coverage Δ
packages/editor-ui/src/constants.ts 99.68% <100.00%> (ø)
packages/nodes-base/nodes/Switch/Switch.node.ts 100.00% <100.00%> (+64.89%) ⬆️
packages/workflow/src/NodeHelpers.ts 48.09% <0.00%> (ø)
packages/editor-ui/src/mixins/nodeBase.ts 12.90% <0.00%> (-0.11%) ⬇️
packages/editor-ui/src/components/Node.vue 71.44% <62.22%> (-0.23%) ⬇️
packages/editor-ui/src/utils/nodeViewUtils.ts 23.46% <5.55%> (+0.54%) ⬆️
packages/editor-ui/src/components/RunData.vue 59.83% <12.50%> (-0.46%) ⬇️
...itor-ui/src/plugins/jsplumb/N8nPlusEndpointType.ts 15.71% <4.54%> (-1.22%) ⬇️
...ckages/nodes-base/nodes/Switch/V1/SwitchV1.node.ts 35.78% <35.78%> (ø)
...ckages/nodes-base/nodes/Switch/V2/SwitchV2.node.ts 38.88% <38.88%> (ø)

... and 13 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@elsmr elsmr left a comment

Choose a reason for hiding this comment

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

This is awesome! 💯 just a few questions

packages/editor-ui/src/components/RunData.vue Outdated Show resolved Hide resolved
packages/editor-ui/src/components/Node.vue Show resolved Hide resolved
@cypress
Copy link

cypress bot commented Oct 24, 2023

Passing run #2569 ↗︎

0 258 0 0 Flakiness 0

Details:

🌳 🖥️ browsers:node18.12.0-chrome107 🤖 OlegIvaniv 🗃️ e2e/*
Project: n8n Commit: 78ed0dd6d1
Status: Passed Duration: 09:15 💡
Started: Oct 25, 2023 6:31 AM Ended: Oct 25, 2023 6:40 AM

Review all test suite changes for PR #7499 ↗︎

Signed-off-by: Oleg Ivaniv <[email protected]>
@OlegIvaniv OlegIvaniv requested a review from elsmr October 24, 2023 12:40
@github-actions
Copy link
Contributor

✅ All Cypress E2E specs passed

@OlegIvaniv OlegIvaniv merged commit 2febc61 into master Oct 25, 2023
33 checks passed
@OlegIvaniv OlegIvaniv deleted the switch_infinite_switch_node branch October 25, 2023 12:34
@github-actions github-actions bot mentioned this pull request Oct 25, 2023
netroy added a commit that referenced this pull request Oct 25, 2023
# [1.14.0](https://github.com/n8n-io/n8n/compare/[email protected]@1.14.0)
(2023-10-25)


### Features

* **Switch Node:** Add support for infinite Switch outputs
([#7499](#7499))
([2febc61](2febc61))

Co-authored-by: netroy <[email protected]>
MiloradFilipovic added a commit that referenced this pull request Oct 25, 2023
* master: (30 commits)
  🚀 Release 1.14.0 (#7514)
  ci: Fix oclif manifest generation
  feat(Switch Node): Add support for infinite Switch outputs (#7499)
  🚀 Release 1.13.0 (#7512)
  fix(core): Ensure nodes post-processors run in the correct order (#7500)
  feat(editor): Add PH tracking to event (#7511)
  fix(core): Fix workflow activation with history and workflow history for EE (no-changelog) (#7508)
  refactor(core): Make executions pruning more resilient (#7480)
  fix(Spreadsheet File Node): Fix include empty cells not working with v2 (#7505)
  fix(core): Create instance settings directory recursively (no-changelog) (#7506)
  fix(Microsoft SQL Node): Prevent SQL injection (#7467)
  refactor(core): Make pruning via lifecycle configuration in S3 mode mandatory (#7482)
  fix(core): Always derive `instanceId` from the encryption key (no-changlog) (#7501)
  fix(MQTT Trigger Node): Fix node causing a start up hang when active (#7498)
  feat: Collect usage metrics on license renewal (no-changelog) (#7486)
  fix(core): Fix `frontend.settings` external hook execution (#7496)
  fix(Redis Node): Fix adding sets data types (#7444)
  fix: Save new version of the workflow instead of the previous (no-changelog) (#7428)
  refactor(core): Abstract away InstanceSettings and `encryptionKey` into injectable services (no-changelog) (#7471)
  fix(Customer.io Node): Fix api endpoint when using EU region (#7485)
  ...
@janober
Copy link
Member

janober commented Oct 25, 2023

Got released with [email protected]

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 node/new Creation of an entirely new node Released ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants