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: Move runner types to runner package #11552

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

tomi
Copy link
Contributor

@tomi tomi commented Nov 5, 2024

Summary

Move shared task runner types to task runner package.

Also small fix to tests:

  • Use random port in test; To make sure the port is not already being listened

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

"import": "./src/start.ts",
"types": "./dist/start.d.ts"
},
".": {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Separate entrypoints for starting the task runner and importing code


import type { RPC_ALLOW_LIST, TaskDataRequestParams, TaskResultData } from './runner-types';

export namespace N8nMessage {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved from runner-types as is

env: boolean;
}

export interface DataRequestResponse {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved from cli


export type All = TaskSettings | TaskCancel | RPCResponse | TaskDataResponse | TaskRequest;
}
export interface TaskData {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved from cli

| RPC
| TaskDataRequest;
}
export interface PartialAdditionalData {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved from cli

@@ -34,230 +34,3 @@ export interface TaskRunnerServerInitRequest
}

export type TaskRunnerServerInitResponse = Response & { req: TaskRunnerServerInitRequest };

export namespace N8nMessage {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved to runner-messages in @n8n/task-runner

export interface TaskResultData {
result: INodeExecutionData[];
customData?: Record<string, string>;
}

export namespace N8nMessage {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved to runner-messages

ivov
ivov previously approved these changes Nov 5, 2024
packages/@n8n/task-runner/src/runner-messages.ts Outdated Show resolved Hide resolved
packages/@n8n/task-runner/src/runner-messages.ts Outdated Show resolved Hide resolved
packages/@n8n/task-runner/src/runner-messages.ts Outdated Show resolved Hide resolved
@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Nov 5, 2024
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 53.33333% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/cli/src/runners/task-broker.service.ts 33.33% 4 Missing ⚠️
...ages/cli/src/runners/task-managers/task-manager.ts 50.00% 2 Missing ⚠️
...li/src/runners/task-managers/local-task-manager.ts 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link

cypress bot commented Nov 5, 2024

n8n    Run #7703

Run Properties:  status check passed Passed #7703  •  git commit 4d97d03537: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 tomi 🗃️ e2e/*
Project n8n
Branch Review refactor-move-runner-types-to-runner-package
Run status status check passed Passed #7703
Run duration 04m 29s
Commit git commit 4d97d03537: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 tomi 🗃️ e2e/*
Committer Tomi Turtiainen
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 461
View all changes introduced in this branch ↗︎

Copy link
Contributor

github-actions bot commented Nov 5, 2024

✅ All Cypress E2E specs passed

Copy link
Contributor

@ivov ivov left a comment

Choose a reason for hiding this comment

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

🙏🏻

Copy link
Contributor

github-actions bot commented Nov 5, 2024

✅ All Cypress E2E specs passed

@ivov ivov merged commit 3edecff into master Nov 5, 2024
34 checks passed
@ivov ivov deleted the refactor-move-runner-types-to-runner-package branch November 5, 2024 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants