Skip to content

Commit

Permalink
chore(release): 2.55.1 (#23368)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Dec 16, 2022
2 parents 077d77d + 1686170 commit 30f1ae4
Show file tree
Hide file tree
Showing 24 changed files with 1,021 additions and 418 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.v2.alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.55.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.55.0-alpha.0...v2.55.1-alpha.0) (2022-12-16)

## [2.55.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.54.0-alpha.0...v2.55.0-alpha.0) (2022-12-14)


Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.55.1](https://github.com/aws/aws-cdk/compare/v2.55.0...v2.55.1) (2022-12-16)


### Bug Fixes

* **s3-deployment:** source markers missing when there are multiple sources ([0bb0181](https://github.com/aws/aws-cdk/commit/0bb01815b2fa7708ded6a72e220916e2388993cf)), closes [#23321](https://github.com/aws/aws-cdk/issues/23321) [40aws-cdk/aws-s3-deployment/lib/lambda/index.py#L64](https://github.com/40aws-cdk/aws-s3-deployment/lib/lambda/index.py/issues/L64) [40aws-cdk/aws-s3-deployment/lib/lambda/index.py#L137](https://github.com/40aws-cdk/aws-s3-deployment/lib/lambda/index.py/issues/L137)

## [2.55.0](https://github.com/aws/aws-cdk/compare/v2.54.0...v2.55.0) (2022-12-14)


Expand Down
4 changes: 4 additions & 0 deletions packages/@aws-cdk/aws-s3-deployment/lib/bucket-deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ export class BucketDeployment extends Construct {
return this.sources.reduce((acc, source) => {
if (source.markers) {
acc.push(source.markers);
// if there are more than 1 source, then all sources
// require markers (custom resource will throw an error otherwise)
} else if (this.sources.length > 1) {
acc.push({});
}
return acc;
}, [] as Array<Record<string, any>>);
Expand Down
20 changes: 20 additions & 0 deletions packages/@aws-cdk/aws-s3-deployment/test/bucket-deployment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,26 @@ test('can add sources with addSource', () => {
});
});

test('if any source has markers then all sources have markers', () => {
const app = new cdk.App();
const stack = new cdk.Stack(app, 'Test');
const bucket = new s3.Bucket(stack, 'Bucket');
const deployment = new s3deploy.BucketDeployment(stack, 'Deploy', {
sources: [s3deploy.Source.data('my/path.txt', 'helloWorld')],
destinationBucket: bucket,
});
deployment.addSource(s3deploy.Source.asset(path.join(__dirname, 'my-website')));

const result = app.synth();
const content = readDataFile(result, 'my/path.txt');
expect(content).toStrictEqual('helloWorld');
Template.fromStack(stack).hasResourceProperties('Custom::CDKBucketDeployment', {
SourceMarkers: [
{},
{},
],
});
});

function readDataFile(casm: cxapi.CloudAssembly, relativePath: string): string {
const assetDirs = readdirSync(casm.directory).filter(f => f.startsWith('asset.'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ def aws_command(*args):
def cfn_send(event, context, responseStatus, responseData={}, physicalResourceId=None, noEcho=False, reason=None):

responseUrl = event['ResponseURL']
logger.info(responseUrl)

responseBody = {}
responseBody['Status'] = responseStatus
Expand Down Expand Up @@ -306,4 +305,4 @@ def replace_markers(filename, markers):

# # delete the original file and rename the new one to the original
os.remove(filename)
os.rename(outfile, filename)
os.rename(outfile, filename)

Large diffs are not rendered by default.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
helloworld
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>Hello, S3 bucket deployments!</h1>
<img src="rabir2v.gif">
Loading

0 comments on commit 30f1ae4

Please sign in to comment.