diff --git a/docs/usage/configuration-options.md b/docs/usage/configuration-options.md index 106f469b387adb..bf9a2d5bc3ad71 100644 --- a/docs/usage/configuration-options.md +++ b/docs/usage/configuration-options.md @@ -2250,6 +2250,10 @@ Be careful with remapping `warn` or `error` messages to lower log levels, as it { "matchMessage": "Package lookup error", "newLogLevel": "warn" + }, + { + "matchMessage": "/^Please upgrade the version of Node.js/", + "newLogLevel": "info" } ] } diff --git a/docs/usage/self-hosted-experimental.md b/docs/usage/self-hosted-experimental.md index b1800d4b6af51b..4d60c03205559e 100644 --- a/docs/usage/self-hosted-experimental.md +++ b/docs/usage/self-hosted-experimental.md @@ -82,10 +82,6 @@ Default value: `250` (milliseconds). If set to any value, Renovate will use a "hard" `process.exit()` once all work is done, even if a sub-process is otherwise delaying Node.js from exiting. See [issue 8660](https://github.com/renovatebot/renovate/issues/8660) for background on why this was created. -## `RENOVATE_X_IGNORE_NODE_WARN` - -Suppress the default warning when a deprecated version of Node.js is used to run Renovate. - ## `RENOVATE_X_IGNORE_RE2` Skip initializing `RE2` for regular expressions and instead use Node-native `RegExp` instead. diff --git a/lib/workers/global/index.ts b/lib/workers/global/index.ts index 1585cf5c23c544..fe7ecf904c2073 100644 --- a/lib/workers/global/index.ts +++ b/lib/workers/global/index.ts @@ -73,7 +73,7 @@ function checkEnv(): void { const range = pkg.engines!.node!; const rangeNext = pkg['engines-next']?.node; if (process.release?.name !== 'node' || !process.versions?.node) { - logger[process.env.RENOVATE_X_IGNORE_NODE_WARN ? 'info' : 'warn']( + logger.warn( { release: process.release, versions: process.versions }, 'Unknown node environment detected.', ); @@ -86,7 +86,7 @@ function checkEnv(): void { rangeNext && !semver.satisfies(process.versions?.node, rangeNext) ) { - logger[process.env.RENOVATE_X_IGNORE_NODE_WARN ? 'info' : 'warn']( + logger.warn( { versions: process.versions }, `Please upgrade the version of Node.js used to run Renovate to satisfy "${rangeNext}". Support for your current version will be removed in Renovate's next major release.`, ); @@ -173,12 +173,12 @@ export async function start(): Promise { await validatePresets(config); + setGlobalLogLevelRemaps(config.logLevelRemap); + checkEnv(); // validate secrets. Will throw and abort if invalid validateConfigSecrets(config); - - setGlobalLogLevelRemaps(config.logLevelRemap); }); // autodiscover repositories (needs to come after platform initialization) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index a154f70d88fcc3..4f27505193011c 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -51,8 +51,6 @@ LABEL org.opencontainers.image.source="https://github.com/renovatebot/renovate" WORKDIR /usr/src/app -ENV RENOVATE_X_IGNORE_NODE_WARN=true - COPY tools/docker/bin/ /usr/local/bin/ CMD ["renovate"]