From 7297610d53b6e0cd4ba87d63be3e4dcf3324580f Mon Sep 17 00:00:00 2001 From: Divya Raj Date: Wed, 25 Oct 2023 14:46:31 -0700 Subject: [PATCH 1/6] Stop logging event data --- src/resource.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/resource.ts b/src/resource.ts index 7f81b7b..7992ccb 100644 --- a/src/resource.ts +++ b/src/resource.ts @@ -586,7 +586,6 @@ export abstract class BaseResource< this.prepareCredentialsFilter(this.callerSession) ); } - this.log('EVENT DATA\n', eventData); progress = await this.invokeHandler( this.callerSession, request, From 208bdc61a28b5ebc9accb5e1ca9d89bf7630c39f Mon Sep 17 00:00:00 2001 From: Divya Raj Date: Wed, 25 Oct 2023 17:25:59 -0700 Subject: [PATCH 2/6] Fix unit test --- tests/lib/resource.test.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/tests/lib/resource.test.ts b/tests/lib/resource.test.ts index a41d6e8..3c28ad1 100644 --- a/tests/lib/resource.test.ts +++ b/tests/lib/resource.test.ts @@ -249,7 +249,7 @@ describe('when getting resource', () => { }); test('entrypoint redacting credentials', async () => { - expect.assertions(13); + expect.assertions(5); const spyPublishLogEvent = jest.spyOn( LogPublisher.prototype, 'publishLogEvent' @@ -283,19 +283,6 @@ describe('when getting resource', () => { expect(spyPrepareLogStream).toBeCalledTimes(1); expect(spyPublishLogEvent).toHaveBeenCalled(); expect(mockPublishMessage).toHaveBeenCalled(); - mockPublishMessage.mock.calls.forEach((value: any[]) => { - const message = value[0] as string; - if (message && message.startsWith('EVENT DATA')) { - expect(message).toMatch(/bearerToken: ''/); - expect(message).toMatch( - /providerCredentials: {\s+accessKeyId: '',\s+secretAccessKey: '',\s+sessionToken: ''\s+}/ - ); - expect(message).toMatch( - /callerCredentials: {\s+accessKeyId: '',\s+secretAccessKey: '',\s+sessionToken: ''\s+}/ - ); - expect(message).toMatch(/stack\/sample-stack\//); - } - }); }); test('entrypoint with callback context', async () => { From 82c66886e87384b4dda5a89ab55d70b57599ea86 Mon Sep 17 00:00:00 2001 From: Divya Raj Date: Thu, 26 Oct 2023 10:00:11 -0700 Subject: [PATCH 3/6] Bump version to 1.0.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e02731a..205f8a8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@amazon-web-services-cloudformation/cloudformation-cli-typescript-lib", - "version": "1.0.4", + "version": "1.0.5", "description": "The CloudFormation Resource Provider Development Kit (RPDK) allows you to author your own resource providers that can be used by CloudFormation. This plugin library helps to provide runtime bindings for the execution of your providers by CloudFormation.", "private": false, "main": "dist/index.js", From ba81e0f2c2229fa3886883a374474d9dabf163e9 Mon Sep 17 00:00:00 2001 From: Divya Raj Date: Thu, 26 Oct 2023 10:00:11 -0700 Subject: [PATCH 4/6] Revert "Bump version to 1.0.5" This reverts commit 82c66886e87384b4dda5a89ab55d70b57599ea86. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 205f8a8..e02731a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@amazon-web-services-cloudformation/cloudformation-cli-typescript-lib", - "version": "1.0.5", + "version": "1.0.4", "description": "The CloudFormation Resource Provider Development Kit (RPDK) allows you to author your own resource providers that can be used by CloudFormation. This plugin library helps to provide runtime bindings for the execution of your providers by CloudFormation.", "private": false, "main": "dist/index.js", From ea6d04dc20ad981597eda6ae0e1aa3e2ee3e90a0 Mon Sep 17 00:00:00 2001 From: Divya Raj Date: Thu, 26 Oct 2023 10:00:11 -0700 Subject: [PATCH 5/6] Bump version to 1.0.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e02731a..205f8a8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@amazon-web-services-cloudformation/cloudformation-cli-typescript-lib", - "version": "1.0.4", + "version": "1.0.5", "description": "The CloudFormation Resource Provider Development Kit (RPDK) allows you to author your own resource providers that can be used by CloudFormation. This plugin library helps to provide runtime bindings for the execution of your providers by CloudFormation.", "private": false, "main": "dist/index.js", From ac3eee40535720691c9d3b155b3f53a50d7aba2c Mon Sep 17 00:00:00 2001 From: Divya Raj Date: Thu, 26 Oct 2023 14:27:30 -0700 Subject: [PATCH 6/6] Tooling version bump to 1.0.3 --- python/rpdk/typescript/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/rpdk/typescript/__init__.py b/python/rpdk/typescript/__init__.py index 909b71e..c136502 100644 --- a/python/rpdk/typescript/__init__.py +++ b/python/rpdk/typescript/__init__.py @@ -1,5 +1,5 @@ import logging -__version__ = "1.0.2" +__version__ = "1.0.3" logging.getLogger(__name__).addHandler(logging.NullHandler())