mirror of
https://github.com/n8n-io/n8n.git
synced 2026-12-04 00:30:34 +00:00
chore: Resolve master-to-3.x sync conflicts
This commit is contained in:
1 parent
d9ae3cab91
commit
e512ca0253
25 files changed
+1029
-173
No files matched your search
@@ -1870,6 +1870,22 @@
|
||||
"message": "packages/frontend/editor-ui turns 'typescript/restrict-template-expressions' down to 'warn' for the whole package.",
|
||||
"hash": "6c97c51e7004"
|
||||
}
|
||||
],
|
||||
".github/workflows/ci-owners-review-recommendations.yml": [
|
||||
{
|
||||
"rule": "workflow-pr-target-safety",
|
||||
"line": 8,
|
||||
"message": ".github/workflows/ci-owners-review-recommendations.yml uses pull_request_target. Prefer pull_request — pull_request_target runs in the base-repo context with secrets exposed, which is unsafe when combined with PR-author-controlled code.",
|
||||
"hash": "d8f14a75499b"
|
||||
}
|
||||
],
|
||||
"scripts/experimental/rig/package.json": [
|
||||
{
|
||||
"rule": "catalog-violations",
|
||||
"line": 21,
|
||||
"message": "@clack/prompts appears in 2 packages with 2 different versions — add to pnpm-workspace.yaml catalog",
|
||||
"hash": "eea984f2dfb7"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -335,7 +335,6 @@ packages/cli/src/modules/mcp-registry/ @n8n-io/nodes required
|
||||
packages/cli/src/modules/agents/integrations/ @n8n-io/nodes
|
||||
packages/@n8n/api-types/src/schemas/mcp-registry.schema.ts @n8n-io/nodes required
|
||||
packages/cli/templates/send-and-wait-no-action-required.handlebars @n8n-io/nodes required
|
||||
packages/@n8n/ai-node-sdk/ @n8n-io/nodes required
|
||||
|
||||
# Relay (AI gateway & credits)
|
||||
packages/cli/src/services/ai-gateway.service.ts @n8n-io/relay required
|
||||
@@ -418,6 +417,7 @@ packages/@n8n/scan-community-package/ @n8n-io/community-engine
|
||||
packages/@n8n/eslint-plugin-community-nodes/ @n8n-io/community-engineering
|
||||
packages/@n8n/node-cli/ @n8n-io/community-engineering
|
||||
packages/@n8n/create-node/ @n8n-io/community-engineering
|
||||
packages/@n8n/ai-node-sdk/ @n8n-io/community-engineering required
|
||||
|
||||
# IAM
|
||||
|
||||
|
||||
@@ -5,6 +5,10 @@ ARG N8N_VERSION=snapshot
|
||||
# `docker buildx bake`, not plain `docker build`.
|
||||
ARG BUILDER_IMAGE
|
||||
ARG RUNTIME_IMAGE
|
||||
ARG ENABLE_POINTER_COMPRESSION=false
|
||||
|
||||
# Clean source of our compiled Node binaries before build tools are installed.
|
||||
FROM ${BUILDER_IMAGE} AS node-source
|
||||
|
||||
# The runtime base has no compiler, so this stage supplies one.
|
||||
FROM node-source AS toolchain
|
||||
|
||||
@@ -125,21 +125,3 @@ FROM base AS dev
|
||||
# up this build's defines (e.g. pointer compression), never against downloaded
|
||||
# stock headers.
|
||||
ENV npm_config_nodedir=/usr/local
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# RUNTIME_IMAGE (an `n8nio/base`), with our compiled Node in place of the
|
||||
# stock node, npm and npx.
|
||||
FROM ${RUNTIME_IMAGE} AS runtime
|
||||
ARG ENABLE_POINTER_COMPRESSION
|
||||
|
||||
RUN rm -f /usr/bin/node /usr/bin/nodejs /usr/bin/npm /usr/bin/npx /usr/local/bin/node
|
||||
COPY --from=builder /node-install/usr/local /usr/local
|
||||
COPY docker/images/node-pc/check-v8-patches.js /tmp/check-v8-patches.js
|
||||
RUN node --version \
|
||||
&& node /tmp/check-v8-patches.js && rm /tmp/check-v8-patches.js
|
||||
|
||||
# The compiled build lives at /usr/local/bin, which is what the cloud launch
|
||||
# and AppArmor profile expect. Keep the stock /usr/bin path working for
|
||||
# anything that references it.
|
||||
RUN ln -sf /usr/local/bin/node /usr/bin/node
|
||||
@@ -13,6 +13,7 @@ export { McpServerSlugQueryDto } from './mcp-server/mcp-server-slug-query.dto';
|
||||
export { AddMcpServerToolsDto } from './mcp-server/add-mcp-server-tools.dto';
|
||||
export { UpdateMcpServerToolDto } from './mcp-server/update-mcp-server-tool.dto';
|
||||
export { DraftMcpServerToolDto } from './mcp-server/draft-mcp-server-tool.dto';
|
||||
export { DraftMcpServerWorkflowToolDto } from './mcp-server/draft-mcp-server-workflow-tool.dto';
|
||||
export { BlockMcpServerUserDto } from './mcp-server/block-mcp-server-user.dto';
|
||||
|
||||
export { AiChatRequestDto } from './ai/ai-chat-request.dto';
|
||||
|
||||
@@ -88,7 +88,6 @@ describe('eligibleModules', () => {
|
||||
'inbox',
|
||||
'promotions',
|
||||
'type-availability-policies',
|
||||
'execution-limits',
|
||||
])('should include %s by default', (moduleName) => {
|
||||
expect(Container.get(ModuleRegistry).eligibleModules).toContain(moduleName);
|
||||
});
|
||||
|
||||
@@ -108,6 +108,8 @@ export interface WorkflowSettings {
|
||||
saveExecutionProgress?: boolean;
|
||||
executionTimeout?: number;
|
||||
executionOrder?: 'v0' | 'v1';
|
||||
/** The engine that runs the workflow. A workflow without an engine runs on `v1`. */
|
||||
engineType?: 'v1' | 'v2';
|
||||
callerPolicy?: 'any' | 'none' | 'workflowsFromAList' | 'workflowsFromSameOwner';
|
||||
callerIds?: string;
|
||||
/** Allow additional settings fields */
|
||||
|
||||
@@ -4,6 +4,17 @@ This list shows all the versions which include breaking changes and how to upgra
|
||||
|
||||
# Unreleased
|
||||
|
||||
## SAML
|
||||
|
||||
n8n now checks that each SAML response is for this instance.
|
||||
The `Audience` must be the n8n Entity ID.
|
||||
The `Destination` and the `Recipient` must be the n8n ACS URL.
|
||||
If your identity provider has an old Entity ID or ACS URL for n8n, SAML sign-in fails with `ERR_AUDIENCE_MISMATCH` or `ERR_RECIPIENT_MISMATCH`.
|
||||
Copy the Entity ID URL and the Redirect URL from the n8n SAML settings into your identity provider.
|
||||
The identity provider metadata must contain a signing certificate.
|
||||
Without one, SAML sign-in fails with `NO_SELECTED_CERTIFICATE`.
|
||||
n8n accepts each SAML assertion only once.
|
||||
|
||||
## n8n Packages (preview)
|
||||
|
||||
Package manifest requirements now use `usedBy: [{ "kind": "workflow", "id": "workflow-id" }]`.
|
||||
@@ -43,6 +54,26 @@ If your pipeline imports packages with missing credentials, add this scope to it
|
||||
|
||||
## Promotions (preview)
|
||||
|
||||
The 12 promotion scopes are now 8. Four setup scopes replace the old setup scopes:
|
||||
|
||||
| New scope | Replaces |
|
||||
| --- | --- |
|
||||
| `promotions:manageProviders` | `promotions:create`, `promotions:update`, `promotions:delete`, `promotions:discover` (for providers) |
|
||||
| `promotions:readProviders` | `promotions:read`, `promotions:list` (for providers) |
|
||||
| `promotions:manageEnvironments` | `promotions:create`, `promotions:update`, `promotions:delete`, `promotions:connect`, `promotions:manageProjects` (for environments) |
|
||||
| `promotions:readEnvironments` | `promotions:read`, `promotions:list` (for environments) |
|
||||
|
||||
`promotions:promote`, `promotions:apply`, `promotions:readReviews` and `promotions:approveReviews` do not change.
|
||||
An API key with an old scope gets 403 for that operation.
|
||||
Edit the API key and select the new scopes.
|
||||
There is no automatic conversion.
|
||||
|
||||
Promote and its CLI commands no longer need `variable:list` on the API key.
|
||||
A key with only `promotions:promote` can preview and promote.
|
||||
A key with only `promotions:apply` can preview, apply and continue.
|
||||
The change details of a preview show variable values when the user's role can list variables.
|
||||
The scopes of the API key no longer decide this.
|
||||
|
||||
The change preview endpoint `GET /api/v1/promotions/projects/{projectId}/changes/{direction}` no longer returns `changes`.
|
||||
Read `resources` instead.
|
||||
Each resource has a `type`, `id`, `change` and `selectable` field.
|
||||
|
||||
@@ -2251,8 +2251,10 @@ describe('WorkflowExecuteAdditionalData', () => {
|
||||
await expect(promise).rejects.toThrow('Workflow is not active and cannot be executed.');
|
||||
});
|
||||
|
||||
it('should throw error when workflow does not exist', async () => {
|
||||
workflowRepository.get.mockResolvedValue(null);
|
||||
// Regression test for CET-178: a missing sub-workflow is a user error, so it
|
||||
// must throw a non-reportable UserError that names the workflow ID.
|
||||
it('should throw a UserError naming the workflow ID when workflow does not exist', async () => {
|
||||
workflowRepository.get.mockResolvedValueOnce(null);
|
||||
|
||||
const promise = getPublishedWorkflowData({ id: 'non-existent' }, 'parent-workflow-id');
|
||||
|
||||
|
||||
@@ -184,3 +184,37 @@ describe('initSystemTasks', () => {
|
||||
expect(runner.init).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('keepsDerivedInstanceId', () => {
|
||||
class SeedingCommand extends TestCommand {
|
||||
override seedsInstanceIdentity = true;
|
||||
}
|
||||
|
||||
it('should keep the derived ID for a command that does not seed, without reading the certificate', async () => {
|
||||
// @ts-expect-error Protected method
|
||||
expect(await new TestCommand().keepsDerivedInstanceId()).toBe(true);
|
||||
expect(license.loadCertStr).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should keep the derived ID for a seeding command when a license certificate exists', async () => {
|
||||
license.loadCertStr.mockResolvedValue('cert');
|
||||
|
||||
// @ts-expect-error Protected method
|
||||
expect(await new SeedingCommand().keepsDerivedInstanceId()).toBe(true);
|
||||
});
|
||||
|
||||
it('should not keep the derived ID for a seeding command without a license certificate', async () => {
|
||||
license.loadCertStr.mockResolvedValue('');
|
||||
|
||||
// @ts-expect-error Protected method
|
||||
expect(await new SeedingCommand().keepsDerivedInstanceId()).toBe(false);
|
||||
});
|
||||
|
||||
it('should keep the derived ID when the certificate check fails, so a licensed install keeps its ID', async () => {
|
||||
license.loadCertStr.mockRejectedValue(new Error('permission denied'));
|
||||
|
||||
// @ts-expect-error Protected method
|
||||
expect(await new SeedingCommand().keepsDerivedInstanceId()).toBe(true);
|
||||
expect(logger.warn).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
@@ -105,6 +105,18 @@ describe('DeprecationService', () => {
|
||||
['N8N_SCHEDULER_ENABLED', 'false', true],
|
||||
['N8N_SCHEDULER_ENABLED', '0', true],
|
||||
['N8N_SCHEDULER_ENABLED', undefined, false],
|
||||
['N8N_SCHEDULER_POLL_TRIGGERS_ENABLED', 'true', true],
|
||||
['N8N_SCHEDULER_POLL_TRIGGERS_ENABLED', 'false', true],
|
||||
['N8N_SCHEDULER_POLL_TRIGGERS_ENABLED', '0', true],
|
||||
['N8N_SCHEDULER_POLL_TRIGGERS_ENABLED', undefined, false],
|
||||
['N8N_POLLER_DURABLE_CURSORS_ENABLED', 'true', true],
|
||||
['N8N_POLLER_DURABLE_CURSORS_ENABLED', 'false', true],
|
||||
['N8N_POLLER_DURABLE_CURSORS_ENABLED', '0', true],
|
||||
['N8N_POLLER_DURABLE_CURSORS_ENABLED', undefined, false],
|
||||
['N8N_SCHEDULER_SYSTEM_TASKS_ENABLED', 'true', true],
|
||||
['N8N_SCHEDULER_SYSTEM_TASKS_ENABLED', 'false', true],
|
||||
['N8N_SCHEDULER_SYSTEM_TASKS_ENABLED', '0', true],
|
||||
['N8N_SCHEDULER_SYSTEM_TASKS_ENABLED', undefined, false],
|
||||
['N8N_SCHEDULER_TRIGGER_NODE_MODE', 'new', true],
|
||||
['N8N_SCHEDULER_TRIGGER_NODE_MODE', 'legacy', true],
|
||||
['N8N_SCHEDULER_TRIGGER_NODE_MODE', undefined, false],
|
||||
@@ -116,6 +128,12 @@ describe('DeprecationService', () => {
|
||||
test.each([
|
||||
['N8N_SCHEDULER_ENABLED', 'true', 'now on by default'],
|
||||
['N8N_SCHEDULER_ENABLED', 'false', 'in-memory scheduler is deprecated'],
|
||||
['N8N_SCHEDULER_POLL_TRIGGERS_ENABLED', 'true', 'now on by default'],
|
||||
['N8N_SCHEDULER_POLL_TRIGGERS_ENABLED', 'false', 'in-process poll timer is deprecated'],
|
||||
['N8N_POLLER_DURABLE_CURSORS_ENABLED', 'true', 'now on by default'],
|
||||
['N8N_POLLER_DURABLE_CURSORS_ENABLED', 'false', 'Non-durable poll cursors are deprecated'],
|
||||
['N8N_SCHEDULER_SYSTEM_TASKS_ENABLED', 'true', 'now on by default'],
|
||||
['N8N_SCHEDULER_SYSTEM_TASKS_ENABLED', 'false', 'in-process system task timers are deprecated'],
|
||||
['N8N_SCHEDULER_TRIGGER_NODE_MODE', 'new', 'now the default'],
|
||||
['N8N_SCHEDULER_TRIGGER_NODE_MODE', 'legacy', '`legacy` mode is deprecated'],
|
||||
])('should explain the scheduler default when %s is `%s`', (envVar, value, expected) => {
|
||||
|
||||
@@ -102,16 +102,6 @@ export class SubworkflowPolicyChecker {
|
||||
const { policy, subworkflowProject } = denial;
|
||||
const { id: subworkflowId } = subworkflow;
|
||||
|
||||
if (!subworkflowId) return;
|
||||
|
||||
const policy = this.findPolicy(subworkflow);
|
||||
|
||||
if (policy === 'any') return;
|
||||
|
||||
const subworkflowProject = await this.ownershipService.getWorkflowProjectCached(subworkflowId);
|
||||
|
||||
if (policy === 'workflowsFromSameOwner' && parentProjectId === subworkflowProject.id) return;
|
||||
|
||||
this.logDenial({ parentProjectId, subworkflowId, policy });
|
||||
|
||||
const errorDetails = await this.errorDetails(subworkflowProject, subworkflowId, userId);
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { AgentIntegrationConfig } from '@n8n/api-types';
|
||||
import {
|
||||
AgentTagMapping,
|
||||
LIKE_ESCAPE_CLAUSE,
|
||||
type FolderRepository,
|
||||
type ServiceAccountRepository,
|
||||
type TransactionRunner,
|
||||
} from '@n8n/db';
|
||||
|
||||
@@ -41,7 +41,7 @@ import { mock, type MockProxy } from 'vitest-mock-extended';
|
||||
import type { InstanceSettings } from 'n8n-core';
|
||||
import type { AgentsSettingsService } from '../agents-settings.service';
|
||||
|
||||
import { ConflictError, ForbiddenError, NotFoundError } from '@n8n/errors';
|
||||
import { ConflictError, ForbiddenError, NotFoundError, UserError } from '@n8n/errors';
|
||||
|
||||
import type { AgentChatAttachmentService } from '../agent-chat-attachment.service';
|
||||
import type { AgentKnowledgeService } from '../agent-knowledge.service';
|
||||
|
||||
@@ -95,7 +95,44 @@ export class AgentRepository extends BaseRepository<Agent> {
|
||||
private readonly folderRepository: FolderRepository,
|
||||
private readonly serviceAccountRepository: ServiceAccountRepository,
|
||||
) {
|
||||
super(Agent, dataSource.manager, transactionRunner);
|
||||
super(Agent, dataSource.manager, transactions);
|
||||
}
|
||||
|
||||
async removeAfterApprovalCleanup(
|
||||
id: string,
|
||||
projectId: string,
|
||||
ctx: OperationContext = {},
|
||||
): Promise<void> {
|
||||
await this.transactions.run(ctx, async (ctx) => {
|
||||
const manager = this.managerFor(ctx);
|
||||
// SQLite needs a write before the read. Preserve the authored revision timestamp.
|
||||
await manager.update(
|
||||
Agent,
|
||||
{ id, projectId, scope: projectScope },
|
||||
{ updatedAt: () => '"updatedAt"' },
|
||||
);
|
||||
const agent = await manager.findOne(Agent, {
|
||||
where: { id, projectId, scope: projectScope },
|
||||
lock:
|
||||
manager.connection.options.type === 'postgres'
|
||||
? { mode: 'pessimistic_write' }
|
||||
: undefined,
|
||||
});
|
||||
if (!agent) return;
|
||||
if (
|
||||
agent.approvalWorkflowId ||
|
||||
(await manager.existsBy(AgentBackgroundJob, {
|
||||
parentAgentId: id,
|
||||
kind: 'approval',
|
||||
notifiedAt: IsNull(),
|
||||
}))
|
||||
)
|
||||
throw new ConflictError(
|
||||
'An Agent approval started during cleanup. Stop its session and retry deletion.',
|
||||
);
|
||||
// The row lock also serializes new job references with the final delete.
|
||||
await manager.remove(agent);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -126,7 +126,7 @@ export class McpProtectedResource implements ProtectedResource {
|
||||
(builderEnabled || !BUILDER_TOOLS.has(tool)) &&
|
||||
(foldersLicensed || !FOLDER_FEATURE_TOOLS.has(tool)) &&
|
||||
(instanceContextAvailable || !ACTIVITY_LOG_TOOLS.has(tool)) &&
|
||||
(instanceContextEnabled || !INSTANCE_CONTEXT_TOOLS.has(tool)) &&
|
||||
(skillSourcesAvailable || !SKILL_SOURCE_TOOLS.has(tool)) &&
|
||||
(credentialDescriptionsEnabled || tool !== 'update_credential_description'),
|
||||
),
|
||||
]),
|
||||
|
||||
@@ -753,7 +753,6 @@ it.each(['project', 'instance'])(
|
||||
});
|
||||
await service.promote(environments.promote.id, owner, {
|
||||
commitMessage: 'Source edit',
|
||||
canExportVariableValues: true,
|
||||
});
|
||||
// The destination still runs the previous content under a version of its own.
|
||||
await workflows.update(workflow.id, { versionId: 'destination-version', nodes: [] });
|
||||
|
||||
@@ -196,8 +196,10 @@ async function fetchWorkflowData(
|
||||
}
|
||||
|
||||
if (workflowInfo.id !== undefined) {
|
||||
const workflowId = normalizeWorkflowId(workflowInfo.id, parentWorkflowId);
|
||||
|
||||
const workflowFromDb = await Container.get(WorkflowRepository).get(
|
||||
{ id: workflowInfo.id },
|
||||
{ id: workflowId },
|
||||
{ relations: ['activeVersion', 'tags'] },
|
||||
);
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@ import {
|
||||
ServiceAccountRepository,
|
||||
SettingsRepository,
|
||||
UserRepository,
|
||||
type AgentExecutionStatisticsRepository,
|
||||
type FolderRepository,
|
||||
type OperationContext,
|
||||
type User,
|
||||
} from '@n8n/db';
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
export * from './binary-data.service';
|
||||
export {
|
||||
collectAllowedBinaryDataIds,
|
||||
collectBinaryDataIds,
|
||||
filterBinaryDataIds,
|
||||
} from './collect-binary-data-ids';
|
||||
export { BinaryDataBlobManager, parseExecutionFileId } from './blob.manager';
|
||||
export { BinaryDataConfig, isInMemoryModeConfigured } from './binary-data.config';
|
||||
export type * from './types';
|
||||
|
||||
@@ -3184,7 +3184,9 @@ export class WorkflowExecute {
|
||||
errorItems.push({
|
||||
...item,
|
||||
json: {
|
||||
...pairedInputItem.json,
|
||||
// The data proxy of a scripting node returns nested values as
|
||||
// proxies. Run data must hold plain values.
|
||||
...toPlainData(pairedInputItem.json),
|
||||
...item.json,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -66,8 +66,6 @@ import {
|
||||
COMMUNITY_PACKAGE_CONFIRM_MODAL_KEY,
|
||||
COMMUNITY_PACKAGE_INSTALL_MODAL_KEY,
|
||||
} from '@/features/settings/communityNodes/communityNodes.constants';
|
||||
import { API_KEY_CREATE_OR_EDIT_MODAL_KEY } from '@/features/settings/apiKeys/apiKeys.constants';
|
||||
import type { ApiKeyWithRawValue } from '@n8n/api-types';
|
||||
import ModalRoot from '@/app/components/ModalRoot.vue';
|
||||
import NpsSurvey from '@/app/components/NpsSurvey.vue';
|
||||
import type { WorkflowVersionFormModalData } from '@/features/workflows/workflowHistory/components/WorkflowVersionFormModal.vue';
|
||||
|
||||
@@ -609,6 +609,7 @@ describe('HttpRequestV3', () => {
|
||||
const result = await node.execute.call(executeFunctions);
|
||||
|
||||
expect(result).toEqual([[{ json: { success: true }, pairedItem: { item: 0 } }]]);
|
||||
expect(executeFunctions.getCredentials).toHaveBeenCalledWith(genericCredentialType, 0);
|
||||
if (genericCredentialType === 'oAuth1Api') {
|
||||
expect(executeFunctions.helpers.requestOAuth1).toHaveBeenCalled();
|
||||
} else if (genericCredentialType === 'oAuth2Api') {
|
||||
|
||||
+2
-3
@@ -141,10 +141,9 @@ test.describe(
|
||||
'Sub-workflow output contract',
|
||||
{ annotation: [{ type: 'owner', description: 'Core Execution' }] },
|
||||
() => {
|
||||
// TODO(CET-315): the child's branches converge on one input, which engine v2
|
||||
// refuses. Engine v2 does not run `each` mode at all.
|
||||
// Engine v2 does not run `each` mode at all.
|
||||
for (const { mode, engine } of [
|
||||
{ mode: 'once', engine: '@engine:v2-pending' },
|
||||
{ mode: 'once', engine: '@engine:v2' },
|
||||
{ mode: 'each', engine: '@engine:v1-only' },
|
||||
]) {
|
||||
test(`returns the reported false-branch items in ${mode} mode ${engine}`, async ({ api }) => {
|
||||
|
||||
Generated
+861
-130
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user