Skip to content

Commit 88fe1a2

Browse files
committed
Merge branch 'master' into add-contract-links
2 parents 4be94bd + 98fd852 commit 88fe1a2

File tree

6 files changed

+9
-24
lines changed

6 files changed

+9
-24
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ jobs:
1010
steps:
1111
- uses: actions/setup-python@v4
1212
with:
13-
python-version: 3.7
13+
python-version: 3.9
1414
os_build:
1515
runs-on: ${{ matrix.os }}
1616
strategy:
1717
matrix:
1818
os: [ ubuntu-latest, macos-latest ]
19-
python: [ 3.7, 3.8, 3.9 ]
20-
node: [ 14 ]
19+
python: [ 3.8, 3.9 ]
20+
node: [ 18 ]
2121
env:
2222
SAM_CLI_TELEMETRY: "0"
2323
AWS_REGION: "us-east-1"
@@ -32,8 +32,8 @@ jobs:
3232
- name: Update Homebrew and save docker version
3333
if: runner.os == 'macOS'
3434
run: |
35-
brew update --preinstall
36-
cat "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/docker.rb" > .github/brew-formulae
35+
brew tap homebrew/core
36+
cat "$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/d/docker.rb" > .github/brew-formulae
3737
- name: Configure Homebrew docker cache files
3838
uses: actions/cache@v3
3939
if: runner.os == 'macOS'
@@ -121,7 +121,7 @@ jobs:
121121
sam build --debug --build-dir ./build TypeFunction
122122
sam build --debug --build-dir ./build TestEntrypoint
123123
sam local invoke -t ./build/template.yaml --debug --event ./sam-tests/create.json --log-file ./sam.log TestEntrypoint
124-
grep -q '"status":"SUCCESS"' sam.log
124+
grep -q '"SUCCESS"' sam.log
125125
- name: Gather Debug Logs
126126
id: gather_logs
127127
continue-on-error: true

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@amazon-web-services-cloudformation/cloudformation-cli-typescript-lib",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"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.",
55
"private": false,
66
"main": "dist/index.js",

python/rpdk/typescript/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import logging
22

3-
__version__ = "1.0.2"
3+
__version__ = "1.0.3"
44

55
logging.getLogger(__name__).addHandler(logging.NullHandler())

python/rpdk/typescript/templates/handlers.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ class Resource extends BaseResource<ResourceModel> {
142142
typeConfiguration: TypeConfigurationModel,
143143
): Promise<ProgressEvent<ResourceModel, CallbackContext>> {
144144
const model = new ResourceModel(request.desiredResourceState);
145-
model
146145
/**
147146
* TODO: put code for getting the specific model from here from just your primary identifier
148147
* Example:

src/resource.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,6 @@ export abstract class BaseResource<
586586
this.prepareCredentialsFilter(this.callerSession)
587587
);
588588
}
589-
this.log('EVENT DATA\n', eventData);
590589
progress = await this.invokeHandler(
591590
this.callerSession,
592591
request,

tests/lib/resource.test.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ describe('when getting resource', () => {
249249
});
250250

251251
test('entrypoint redacting credentials', async () => {
252-
expect.assertions(13);
252+
expect.assertions(5);
253253
const spyPublishLogEvent = jest.spyOn<any, any>(
254254
LogPublisher.prototype,
255255
'publishLogEvent'
@@ -283,19 +283,6 @@ describe('when getting resource', () => {
283283
expect(spyPrepareLogStream).toBeCalledTimes(1);
284284
expect(spyPublishLogEvent).toHaveBeenCalled();
285285
expect(mockPublishMessage).toHaveBeenCalled();
286-
mockPublishMessage.mock.calls.forEach((value: any[]) => {
287-
const message = value[0] as string;
288-
if (message && message.startsWith('EVENT DATA')) {
289-
expect(message).toMatch(/bearerToken: '<REDACTED>'/);
290-
expect(message).toMatch(
291-
/providerCredentials: {\s+accessKeyId: '<REDACTED>',\s+secretAccessKey: '<REDACTED>',\s+sessionToken: '<REDACTED>'\s+}/
292-
);
293-
expect(message).toMatch(
294-
/callerCredentials: {\s+accessKeyId: '<REDACTED>',\s+secretAccessKey: '<REDACTED>',\s+sessionToken: '<REDACTED>'\s+}/
295-
);
296-
expect(message).toMatch(/stack\/sample-stack\/<REDACTED>/);
297-
}
298-
});
299286
});
300287

301288
test('entrypoint with callback context', async () => {

0 commit comments

Comments
 (0)