From b570f0db48f4485ad2b764a24346bfd100f06244 Mon Sep 17 00:00:00 2001 From: Norbert Szulc Date: Mon, 4 Mar 2024 16:10:17 +0100 Subject: [PATCH] fix(manager/pip-compile): Decrease log level for ignored args (#27706) --- lib/modules/manager/pip-compile/common.spec.ts | 5 +++++ lib/modules/manager/pip-compile/common.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/modules/manager/pip-compile/common.spec.ts b/lib/modules/manager/pip-compile/common.spec.ts index ffc8c58a37c9cb..8d39bc116f4a79 100644 --- a/lib/modules/manager/pip-compile/common.spec.ts +++ b/lib/modules/manager/pip-compile/common.spec.ts @@ -1,5 +1,6 @@ import { mockDeep } from 'jest-mock-extended'; import { hostRules } from '../../../../test/util'; +import { logger } from '../../../logger'; import { allowedPipOptions, extractHeaderCommand, @@ -24,7 +25,10 @@ describe('modules/manager/pip-compile/common', () => { it.each([ '-v', '--all-extras', + `--allow-unsafe`, '--generate-hashes', + `--no-emit-index-url`, + `--strip-extras`, '--resolver=backtracking', '--resolver=legacy', '--output-file=reqs.txt', @@ -36,6 +40,7 @@ describe('modules/manager/pip-compile/common', () => { 'reqs.txt', ), ).toBeObject(); + expect(logger.warn).toHaveBeenCalledTimes(0); }); it.each(['--resolver', '--output-file reqs.txt', '--extra = jupyter'])( diff --git a/lib/modules/manager/pip-compile/common.ts b/lib/modules/manager/pip-compile/common.ts index c1dd0534c2a01f..97e96ad17b6309 100644 --- a/lib/modules/manager/pip-compile/common.ts +++ b/lib/modules/manager/pip-compile/common.ts @@ -160,7 +160,7 @@ export function extractHeaderCommand( result.indexUrl = value; // TODO: add to secrets? next PR } else { - logger.warn(`pip-compile: option ${arg} not handled`); + logger.debug({ option }, `pip-compile: option not handled`); } continue; } @@ -177,7 +177,7 @@ export function extractHeaderCommand( continue; } - logger.warn(`pip-compile: option ${arg} not handled`); + logger.debug({ option: arg }, `pip-compile: option not handled`); } logger.trace( {