From 5c65785ae34ac56991e705bb0b7602fedbe9c8fa Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 12 Jun 2024 12:37:47 +0200 Subject: [PATCH] chore: add changeset Signed-off-by: blam --- .changeset/neat-chairs-complain.md | 5 +++++ .../src/scaffolder/tasks/NunjucksWorkflowRunner.test.ts | 2 ++ plugins/scaffolder-backend/src/scaffolder/tasks/logger.ts | 1 - 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/neat-chairs-complain.md diff --git a/.changeset/neat-chairs-complain.md b/.changeset/neat-chairs-complain.md new file mode 100644 index 0000000000..96c0271d81 --- /dev/null +++ b/.changeset/neat-chairs-complain.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend': patch +--- + +Fixing issues with log redaction in the scaffolder logs diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.test.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.test.ts index daa5e80124..aece424f5f 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.test.ts @@ -645,6 +645,7 @@ describe('NunjucksWorkflowRunner', () => { }); describe('redactions', () => { + // eslint-disable-next-line jest/expect-expect it('should redact secrets that are passed with the task', async () => { actionRegistry.register({ id: 'log-secret', @@ -690,6 +691,7 @@ describe('NunjucksWorkflowRunner', () => { expectTaskLog('info: ***'); }); + // eslint-disable-next-line jest/expect-expect it('should redact meta fields properly', async () => { actionRegistry.register({ id: 'log-secret', diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/logger.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/logger.ts index a75f31a07f..38263b73ca 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/logger.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/logger.ts @@ -24,7 +24,6 @@ import { Logger, format, createLogger, transports } from 'winston'; import { LEVEL, MESSAGE, SPLAT } from 'triple-beam'; import { TaskContext } from '@backstage/plugin-scaffolder-node'; import _ from 'lodash'; -import { TaskStep } from '@backstage/plugin-scaffolder-common'; /** * Escapes a given string to be used inside a RegExp.