Skip to content

Commit a7f2db4

Browse files
authored
Merge branch 'master' into minor-network-mode-casefix
2 parents d88dc89 + 1947d7c commit a7f2db4

60 files changed

Lines changed: 1109 additions & 407 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/issue-label-assign.yml

Lines changed: 43 additions & 43 deletions
Large diffs are not rendered by default.

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
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.
44

5+
## [1.142.0](https://github.com/aws/aws-cdk/compare/v1.141.0...v1.142.0) (2022-01-28)
6+
7+
8+
### Features
9+
10+
* **cfnspec:** cloudformation spec v53.1.0 ([#18680](https://github.com/aws/aws-cdk/issues/18680)) ([f385059](https://github.com/aws/aws-cdk/commit/f38505911a3e140a9cb6b269bdf22abe9803c515))
11+
* **cloudfront-origins:** extend `readTimeout` maximum value for `HttpOriginProps` ([#18697](https://github.com/aws/aws-cdk/issues/18697)) ([e64de67](https://github.com/aws/aws-cdk/commit/e64de677cdfc014f68e92b204f4728e60a8bb111)), closes [#18628](https://github.com/aws/aws-cdk/issues/18628)
12+
* **eks:** cluster logging ([#18112](https://github.com/aws/aws-cdk/issues/18112)) ([872277b](https://github.com/aws/aws-cdk/commit/872277b9e853dbf5f2cac84b5afb6d26e0ed5659)), closes [#4159](https://github.com/aws/aws-cdk/issues/4159)
13+
* **iotevents:** allow setting description, evaluation method and key of DetectorModel ([#18644](https://github.com/aws/aws-cdk/issues/18644)) ([2eeaebc](https://github.com/aws/aws-cdk/commit/2eeaebc3cdc9c5c7ef3fa312b3d1abca265dcbb6))
14+
* **lambda-python:** support setting environment vars for bundling ([#18635](https://github.com/aws/aws-cdk/issues/18635)) ([30e2233](https://github.com/aws/aws-cdk/commit/30e223333fef0b0d7f12287dab170a34e092d7fa))
15+
16+
17+
### Bug Fixes
18+
19+
* **aws-lambda-nodejs:** pre compilation with tsc is not being run ([#18062](https://github.com/aws/aws-cdk/issues/18062)) ([7ac7221](https://github.com/aws/aws-cdk/commit/7ac7221aff3c612ab80e7812c371b11c56e5db0a)), closes [#18002](https://github.com/aws/aws-cdk/issues/18002)
20+
* **pipelines:** undeployable due to dependency cycle ([#18686](https://github.com/aws/aws-cdk/issues/18686)) ([009d689](https://github.com/aws/aws-cdk/commit/009d68912267de9dcf4136a7d80a652a891b7bb9)), closes [#18492](https://github.com/aws/aws-cdk/issues/18492) [#18673](https://github.com/aws/aws-cdk/issues/18673)
21+
522
## [1.141.0](https://github.com/aws/aws-cdk/compare/v1.140.0...v1.141.0) (2022-01-27)
623

724

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
},
3333
"resolutions": {
3434
"colors": "1.4.0",
35-
"string-width": "^4.2.3"
35+
"string-width": "^4.2.3",
36+
"markdown-it": "^12.3.2"
3637
},
3738
"repository": {
3839
"type": "git",

packages/@aws-cdk-containers/ecs-service-extensions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"@aws-cdk/cfn2ts": "0.0.0",
4545
"jest": "^27.4.7",
4646
"@aws-cdk/pkglint": "0.0.0",
47-
"@aws-cdk/assert-internal": "0.0.0"
47+
"@aws-cdk/assertions": "0.0.0"
4848
},
4949
"dependencies": {
5050
"@aws-cdk/aws-applicationautoscaling": "0.0.0",

packages/@aws-cdk-containers/ecs-service-extensions/test/appmesh.test.ts

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@aws-cdk/assert-internal/jest';
1+
import { Match, Template } from '@aws-cdk/assertions';
22
import * as appmesh from '@aws-cdk/aws-appmesh';
33
import * as ecs from '@aws-cdk/aws-ecs';
44
import * as cdk from '@aws-cdk/core';
@@ -34,7 +34,7 @@ describe('appmesh', () => {
3434

3535
// THEN
3636
// Ensure that task has an App Mesh sidecar
37-
expect(stack).toHaveResource('AWS::ECS::TaskDefinition', {
37+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', {
3838
ContainerDefinitions: [
3939
{
4040
Cpu: 256,
@@ -210,7 +210,7 @@ describe('appmesh', () => {
210210
});
211211

212212
// Ensure that the service has the right settings
213-
expect(stack).toHaveResource('AWS::ECS::Service', {
213+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
214214
Cluster: {
215215
Ref: 'productionenvironmentclusterC6599D2D',
216216
},
@@ -256,8 +256,6 @@ describe('appmesh', () => {
256256
Ref: 'myservicetaskdefinitionF3E2D86F',
257257
},
258258
});
259-
260-
261259
});
262260

263261
test('should have the right maximumPercentage at desired count == 1', () => {
@@ -288,15 +286,13 @@ describe('appmesh', () => {
288286
desiredCount: 1,
289287
});
290288

291-
expect(stack).toHaveResourceLike('AWS::ECS::Service', {
289+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
292290
DeploymentConfiguration: {
293291
MaximumPercent: 200,
294292
MinimumHealthyPercent: 100,
295293
},
296294
DesiredCount: 1,
297295
});
298-
299-
300296
});
301297

302298
test('should have the right maximumPercentage at desired count == 2', () => {
@@ -327,15 +323,13 @@ describe('appmesh', () => {
327323
desiredCount: 2,
328324
});
329325

330-
expect(stack).toHaveResourceLike('AWS::ECS::Service', {
326+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
331327
DeploymentConfiguration: {
332328
MaximumPercent: 150,
333329
MinimumHealthyPercent: 100,
334330
},
335331
DesiredCount: 2,
336332
});
337-
338-
339333
});
340334

341335
test('should have the right maximumPercentage at desired count == 3', () => {
@@ -366,15 +360,13 @@ describe('appmesh', () => {
366360
desiredCount: 3,
367361
});
368362

369-
expect(stack).toHaveResourceLike('AWS::ECS::Service', {
363+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
370364
DeploymentConfiguration: {
371365
MaximumPercent: 150,
372366
MinimumHealthyPercent: 100,
373367
},
374368
DesiredCount: 3,
375369
});
376-
377-
378370
});
379371

380372
test('should have the right maximumPercentage at desired count == 4', () => {
@@ -405,15 +397,13 @@ describe('appmesh', () => {
405397
desiredCount: 4,
406398
});
407399

408-
expect(stack).toHaveResourceLike('AWS::ECS::Service', {
400+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
409401
DeploymentConfiguration: {
410402
MaximumPercent: 125,
411403
MinimumHealthyPercent: 100,
412404
},
413405
DesiredCount: 4,
414406
});
415-
416-
417407
});
418408

419409
test('should have the right maximumPercentage at desired count > 4', () => {
@@ -444,15 +434,13 @@ describe('appmesh', () => {
444434
desiredCount: 8,
445435
});
446436

447-
expect(stack).toHaveResourceLike('AWS::ECS::Service', {
437+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
448438
DeploymentConfiguration: {
449439
MaximumPercent: 125,
450440
MinimumHealthyPercent: 100,
451441
},
452442
DesiredCount: 8,
453443
});
454-
455-
456444
});
457445

458446
test('should be able to create multiple App Mesh enabled services and connect', () => {
@@ -516,9 +504,7 @@ describe('appmesh', () => {
516504
greeterService.connectTo(greetingService);
517505

518506
// THEN
519-
expect(stack).toHaveResource('AWS::ECS::TaskDefinition');
520-
521-
507+
Template.fromStack(stack).hasResource('AWS::ECS::TaskDefinition', Match.anyValue());
522508
});
523509

524510
test('should detect when attempting to connect services from two different envs', () => {
@@ -572,7 +558,5 @@ describe('appmesh', () => {
572558
expect(() => {
573559
developmentNameService.connectTo(productionNameService);
574560
}).toThrow(/Unable to connect service 'name-development' in environment 'development' to service 'name-production' in environment 'production' because services can not be connected across environment boundaries/);
575-
576-
577561
});
578562
});

packages/@aws-cdk-containers/ecs-service-extensions/test/assign-public-ip.test.ts

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@aws-cdk/assert-internal/jest';
1+
import { Template } from '@aws-cdk/assertions';
22
import * as autoscaling from '@aws-cdk/aws-autoscaling';
33
import * as ec2 from '@aws-cdk/aws-ec2';
44
import * as ecs from '@aws-cdk/aws-ecs';
@@ -29,15 +29,13 @@ describe('assign public ip', () => {
2929
});
3030

3131
// THEN
32-
expect(stack).toHaveResourceLike('AWS::ECS::Service', {
32+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
3333
NetworkConfiguration: {
3434
AwsvpcConfiguration: {
3535
AssignPublicIp: 'ENABLED',
3636
},
3737
},
3838
});
39-
40-
4139
});
4240

4341
test('errors when adding a public ip to ec2-backed service', () => {
@@ -76,8 +74,6 @@ describe('assign public ip', () => {
7674
serviceDescription,
7775
});
7876
}).toThrow(/Fargate/i);
79-
80-
8177
});
8278

8379
test('should not add a task record manager by default', () => {
@@ -103,8 +99,6 @@ describe('assign public ip', () => {
10399

104100
// THEN
105101
expect(service.ecsService.node.tryFindChild('TaskRecordManager')).toBeUndefined();
106-
107-
108102
});
109103

110104
test('should add a task record manager when dns is requested', () => {
@@ -138,8 +132,6 @@ describe('assign public ip', () => {
138132

139133
// THEN
140134
expect(service.ecsService.node.tryFindChild('TaskRecordManager')).toBeDefined();
141-
142-
143135
});
144136

145137
test('task record manager listens for ecs events', () => {
@@ -172,7 +164,7 @@ describe('assign public ip', () => {
172164
});
173165

174166
// THEN
175-
expect(stack).toHaveResourceLike('AWS::Events::Rule', {
167+
Template.fromStack(stack).hasResourceProperties('AWS::Events::Rule', {
176168
EventPattern: {
177169
'source': ['aws.ecs'],
178170
'detail-type': [
@@ -185,7 +177,7 @@ describe('assign public ip', () => {
185177
},
186178
});
187179

188-
expect(stack).toHaveResourceLike('AWS::Events::Rule', {
180+
Template.fromStack(stack).hasResourceProperties('AWS::Events::Rule', {
189181
EventPattern: {
190182
'source': ['aws.ecs'],
191183
'detail-type': [
@@ -197,7 +189,5 @@ describe('assign public ip', () => {
197189
},
198190
},
199191
});
200-
201-
202192
});
203193
});

packages/@aws-cdk-containers/ecs-service-extensions/test/cloudwatch-agent.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@aws-cdk/assert-internal/jest';
1+
import { Template } from '@aws-cdk/assertions';
22
import * as ecs from '@aws-cdk/aws-ecs';
33
import * as cdk from '@aws-cdk/core';
44
import { CloudwatchAgentExtension, Container, Environment, Service, ServiceDescription } from '../lib';
@@ -27,7 +27,7 @@ describe('cloudwatch agent', () => {
2727
});
2828

2929
// THEN
30-
expect(stack).toHaveResource('AWS::ECS::TaskDefinition', {
30+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', {
3131
ContainerDefinitions: [
3232
{
3333
Cpu: 256,
@@ -102,8 +102,5 @@ describe('cloudwatch agent', () => {
102102
],
103103
},
104104
});
105-
106-
107105
});
108-
109106
});

packages/@aws-cdk-containers/ecs-service-extensions/test/container.test.ts

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@aws-cdk/assert-internal/jest';
1+
import { Template } from '@aws-cdk/assertions';
22
import * as autoscaling from '@aws-cdk/aws-autoscaling';
33
import * as ec2 from '@aws-cdk/aws-ec2';
44
import * as ecs from '@aws-cdk/aws-ecs';
@@ -46,9 +46,9 @@ describe('container', () => {
4646
});
4747

4848
// THEN
49-
expect(stack).toCountResources('AWS::ECS::Service', 1);
49+
Template.fromStack(stack).resourceCountIs('AWS::ECS::Service', 1);
5050

51-
expect(stack).toHaveResource('AWS::ECS::TaskDefinition', {
51+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', {
5252
ContainerDefinitions: [
5353
{
5454
Cpu: 256,
@@ -86,8 +86,6 @@ describe('container', () => {
8686
],
8787
},
8888
});
89-
90-
9189
});
9290

9391
test('should be able to enable default logging behavior - with enable default log driver feature flag', () => {
@@ -129,12 +127,12 @@ describe('container', () => {
129127
});
130128

131129
// THEN
132-
expect(stack).toCountResources('AWS::ECS::Service', 1);
130+
Template.fromStack(stack).resourceCountIs('AWS::ECS::Service', 1);
133131

134132
// Ensure that the log group was created
135-
expect(stack).toHaveResource('AWS::Logs::LogGroup');
133+
Template.fromStack(stack).resourceCountIs('AWS::Logs::LogGroup', 1);
136134

137-
expect(stack).toHaveResource('AWS::ECS::TaskDefinition', {
135+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', {
138136
ContainerDefinitions: [
139137
{
140138
Cpu: 256,
@@ -184,8 +182,6 @@ describe('container', () => {
184182
],
185183
},
186184
});
187-
188-
189185
});
190186

191187
test('should be able to add user-provided log group in the log driver options', () => {
@@ -228,12 +224,12 @@ describe('container', () => {
228224
});
229225

230226
// THEN
231-
expect(stack).toCountResources('AWS::ECS::Service', 1);
227+
Template.fromStack(stack).resourceCountIs('AWS::ECS::Service', 1);
232228

233229
// Ensure that the log group was created
234-
expect(stack).toHaveResource('AWS::Logs::LogGroup');
230+
Template.fromStack(stack).resourceCountIs('AWS::Logs::LogGroup', 1);
235231

236-
expect(stack).toHaveResource('AWS::ECS::TaskDefinition', {
232+
Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', {
237233
ContainerDefinitions: [
238234
{
239235
Cpu: 256,
@@ -283,8 +279,6 @@ describe('container', () => {
283279
],
284280
},
285281
});
286-
287-
288282
});
289283

290284
test('should error when log group is provided in the container extension and another observability extension is added', () => {
@@ -312,5 +306,4 @@ describe('container', () => {
312306
});
313307
}).toThrow(/Log configuration already specified. You cannot provide a log group for the application container of service 'my-service' while also adding log configuration separately using service extensions./);
314308
});
315-
316309
});

0 commit comments

Comments
 (0)