fix(core): Only print deprecation notices on start command (#19987)

This commit is contained in:
mfsiega 2025-09-29 11:51:09 +02:00 committed by GitHub
parent 2fffc7a0ff
commit 4d024ecb9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 3 deletions

View File

@ -26,7 +26,6 @@ import config from '@/config';
import { N8N_VERSION, N8N_RELEASE_DATE } from '@/constants';
import * as CrashJournal from '@/crash-journal';
import { getDataDeduplicationService } from '@/deduplication';
import { DeprecationService } from '@/deprecation/deprecation.service';
import { TestRunCleanupService } from '@/evaluation.ee/test-runner/test-run-cleanup.service.ee';
import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus';
import { TelemetryEventRelay } from '@/events/relays/telemetry.event-relay';
@ -124,8 +123,6 @@ export abstract class BaseCommand<F = never> {
// Initialize the auth roles service to make sure that roles are correctly setup for the instance
await Container.get(AuthRolesService).init();
Container.get(DeprecationService).warn();
if (process.env.EXECUTIONS_PROCESS === 'own') process.exit(-1);
if (

View File

@ -34,6 +34,7 @@ import { WorkflowRunner } from '@/workflow-runner';
import { BaseCommand } from './base-command';
import { CredentialsOverwrites } from '@/credentials-overwrites';
import { DeprecationService } from '@/deprecation/deprecation.service';
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const open = require('open');
@ -200,6 +201,8 @@ export class Start extends BaseCommand<z.infer<typeof flagsSchema>> {
await super.init();
Container.get(DeprecationService).warn();
this.activeWorkflowManager = Container.get(ActiveWorkflowManager);
const isMultiMainEnabled =

View File

@ -7,6 +7,7 @@ import { Publisher } from '@/scaling/pubsub/publisher.service';
import { PubSubRegistry } from '@/scaling/pubsub/pubsub.registry';
import { Subscriber } from '@/scaling/pubsub/subscriber.service';
import { WebhookServer } from '@/webhooks/webhook-server';
import { DeprecationService } from '@/deprecation/deprecation.service';
import { BaseCommand } from './base-command';
@ -62,6 +63,7 @@ export class Webhook extends BaseCommand {
this.logger.debug(`Host ID: ${this.instanceSettings.hostId}`);
await super.init();
Container.get(DeprecationService).warn();
await this.initLicense();
this.logger.debug('License init complete');

View File

@ -17,6 +17,7 @@ import { WorkerStatusService } from '@/scaling/worker-status.service.ee';
import { BaseCommand } from './base-command';
import { CredentialsOverwrites } from '@/credentials-overwrites';
import { DeprecationService } from '@/deprecation/deprecation.service';
const flagsSchema = z.object({
concurrency: z.number().int().default(10).describe('How many jobs can run in parallel.'),
@ -87,6 +88,8 @@ export class Worker extends BaseCommand<z.infer<typeof flagsSchema>> {
await this.setConcurrency();
await super.init();
Container.get(DeprecationService).warn();
await this.initLicense();
this.logger.debug('License init complete');
await Container.get(CredentialsOverwrites).init();