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.