-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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(core): Move active workflows endpoints to a decorated controller class (no-changelog) #8101
Conversation
…ller class (no-changelog)
4a5f232
to
88b92df
Compare
3 flaky tests on run #3470 ↗︎
Details:
17-sharing.cy.ts • 1 flaky test
24-ndv-paired-item.cy.ts • 1 flaky test
27-two-factor-authentication.cy.ts • 1 flaky test
Review all test suite changes for PR #8101 ↗︎ |
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.
Nice work! Only minor comments.
userId: user.id, | ||
}); | ||
|
||
throw new BadRequestError(`Workflow with ID "${workflowId}" could not be found.`); |
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.
For learning - I'd've used at BadRequestError
and other response errors only at controller level. It's okay to use them at service level?
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.
I have conflicting opinions about this. one one hand all communication layer details should be abstracted away in the controllers, on the other hand letting services throw these error makes the code a lot simpler and easier to maintain 🤷🏽.
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.
🏅
✅ All Cypress E2E specs passed |
* master: feat(core): Unify application components shutdown (#8097) refactor(core): Upgrade more dependencies to remove axios 0.x (no-changelog) (#8105) refactor(core): Move active workflows endpoints to a decorated controller class (no-changelog) (#8101) fix(editor): Prevent canvas undo/redo when NDV is open (#8118) fix(editor): Fix operation change failing in certain conditions (#8114) fix(Asana Node): Omit body from GET, HEAD, and DELETE requests (#8057) fix(Redis Trigger Node): Activating a workflow with a Redis trigger fails (#8129) refactor(Peekalink Node): Stricter typing for Peekalink api call + Tests (no-changelog) (#8125) fix(core): Remove circular dependency in WorkflowService and ActiveWorkflowRunner (#8128) fix: Show public API upgrade CTA when feature is not enabled (#8109) feat(Snowflake Node): Update snowflake-sdk (no-changelog) (#8087) fix(core): Handle empty executions table in pruning in migrations (#8121) feat(core): Add closeFunction support to Sub-Nodes (#7708) refactor(core): Move error execution creation to execution service (no-changelog) (#8006) ci: Add lint rule `no-dynamic-import-template` (no-changelog) (#8089) feat(core): Remove discontinued crypto-js (#8104) 🚀 Release 1.22.0 (#8115) fix(core): Prevent axios from force setting a form-urlencoded content-type (#8117) feat(Respond to Webhook Node): Overhaul with improvements like returning all items (#8093)
* upstream/master: (32 commits) refactor(core): Move `typeorm` operators from `PruningService` to `ExecutionRepository` (no-changelog) (n8n-io#8145) refactor(core): Move more `typeorm` operators to repositories (no-changelog) (n8n-io#8143) refactor(core): Delete unused code, and fix typings in tests (no-changelog) (n8n-io#8142) docs: Improve documentation for the toTitleCase function (no-changelog) (n8n-io#8140) refactor(core): Move all base URLs to UrlService (no-changelog) (n8n-io#8141) feat(editor): Add template Id to workflow metadata (n8n-io#8088) fix(editor): Avoid sanitizing output to search node data (n8n-io#8126) fix(editor): Prevent browser zoom when scrolling inside sticky edit mode (n8n-io#8116) refactor(core): Move some `typeorm` operators to repositories (no-changelog) (n8n-io#8139) feat(editor): Add node execution status indicator to output panel (n8n-io#8124) feat(core): Unify application components shutdown (n8n-io#8097) refactor(core): Upgrade more dependencies to remove axios 0.x (no-changelog) (n8n-io#8105) refactor(core): Move active workflows endpoints to a decorated controller class (no-changelog) (n8n-io#8101) fix(editor): Prevent canvas undo/redo when NDV is open (n8n-io#8118) fix(editor): Fix operation change failing in certain conditions (n8n-io#8114) fix(Asana Node): Omit body from GET, HEAD, and DELETE requests (n8n-io#8057) fix(Redis Trigger Node): Activating a workflow with a Redis trigger fails (n8n-io#8129) refactor(Peekalink Node): Stricter typing for Peekalink api call + Tests (no-changelog) (n8n-io#8125) fix(core): Remove circular dependency in WorkflowService and ActiveWorkflowRunner (n8n-io#8128) fix: Show public API upgrade CTA when feature is not enabled (n8n-io#8109) ...
Got released with |
Summary
This is a continuation of migrating all rest endpoints to decorated controller classes
Review / Merge checklist