diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 282b560..97d04c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,14 +10,14 @@ jobs: steps: - uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.9 os_build: runs-on: ${{ matrix.os }} strategy: matrix: os: [ ubuntu-latest, macos-latest ] - python: [ 3.7, 3.8, 3.9 ] - node: [ 14 ] + python: [ 3.8, 3.9 ] + node: [ 18 ] env: SAM_CLI_TELEMETRY: "0" AWS_REGION: "us-east-1" @@ -32,8 +32,8 @@ jobs: - name: Update Homebrew and save docker version if: runner.os == 'macOS' run: | - brew update --preinstall - cat "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/docker.rb" > .github/brew-formulae + brew tap homebrew/core + cat "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/d/docker.rb" > .github/brew-formulae - name: Configure Homebrew docker cache files uses: actions/cache@v3 if: runner.os == 'macOS' @@ -121,7 +121,7 @@ jobs: sam build --debug --build-dir ./build TypeFunction sam build --debug --build-dir ./build TestEntrypoint sam local invoke -t ./build/template.yaml --debug --event ./sam-tests/create.json --log-file ./sam.log TestEntrypoint - grep -q '"status":"SUCCESS"' sam.log + grep -q '"SUCCESS"' sam.log - name: Gather Debug Logs id: gather_logs continue-on-error: true 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", 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()) diff --git a/python/rpdk/typescript/templates/handlers.ts b/python/rpdk/typescript/templates/handlers.ts index 4b6fed8..d7c35c9 100644 --- a/python/rpdk/typescript/templates/handlers.ts +++ b/python/rpdk/typescript/templates/handlers.ts @@ -142,7 +142,6 @@ class Resource extends BaseResource { typeConfiguration: TypeConfigurationModel, ): Promise> { const model = new ResourceModel(request.desiredResourceState); - model /** * TODO: put code for getting the specific model from here from just your primary identifier * Example: 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, 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 () => {