Skip to content

Commit

Permalink
Merge branch 'master' into minor-network-mode-casefix
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Feb 1, 2022
2 parents d88dc89 + 1947d7c commit a7f2db4
Show file tree
Hide file tree
Showing 60 changed files with 1,109 additions and 407 deletions.
86 changes: 43 additions & 43 deletions .github/workflows/issue-label-assign.yml

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

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.

## [1.142.0](https://github.com/aws/aws-cdk/compare/v1.141.0...v1.142.0) (2022-01-28)


### Features

* **cfnspec:** cloudformation spec v53.1.0 ([#18680](https://github.com/aws/aws-cdk/issues/18680)) ([f385059](https://github.com/aws/aws-cdk/commit/f38505911a3e140a9cb6b269bdf22abe9803c515))
* **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)
* **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)
* **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))
* **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))


### Bug Fixes

* **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)
* **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)

## [1.141.0](https://github.com/aws/aws-cdk/compare/v1.140.0...v1.141.0) (2022-01-27)


Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
},
"resolutions": {
"colors": "1.4.0",
"string-width": "^4.2.3"
"string-width": "^4.2.3",
"markdown-it": "^12.3.2"
},
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@aws-cdk/cfn2ts": "0.0.0",
"jest": "^27.4.7",
"@aws-cdk/pkglint": "0.0.0",
"@aws-cdk/assert-internal": "0.0.0"
"@aws-cdk/assertions": "0.0.0"
},
"dependencies": {
"@aws-cdk/aws-applicationautoscaling": "0.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import { Match, Template } from '@aws-cdk/assertions';
import * as appmesh from '@aws-cdk/aws-appmesh';
import * as ecs from '@aws-cdk/aws-ecs';
import * as cdk from '@aws-cdk/core';
Expand Down Expand Up @@ -34,7 +34,7 @@ describe('appmesh', () => {

// THEN
// Ensure that task has an App Mesh sidecar
expect(stack).toHaveResource('AWS::ECS::TaskDefinition', {
Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', {
ContainerDefinitions: [
{
Cpu: 256,
Expand Down Expand Up @@ -210,7 +210,7 @@ describe('appmesh', () => {
});

// Ensure that the service has the right settings
expect(stack).toHaveResource('AWS::ECS::Service', {
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
Cluster: {
Ref: 'productionenvironmentclusterC6599D2D',
},
Expand Down Expand Up @@ -256,8 +256,6 @@ describe('appmesh', () => {
Ref: 'myservicetaskdefinitionF3E2D86F',
},
});


});

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

expect(stack).toHaveResourceLike('AWS::ECS::Service', {
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
DeploymentConfiguration: {
MaximumPercent: 200,
MinimumHealthyPercent: 100,
},
DesiredCount: 1,
});


});

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

expect(stack).toHaveResourceLike('AWS::ECS::Service', {
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
DeploymentConfiguration: {
MaximumPercent: 150,
MinimumHealthyPercent: 100,
},
DesiredCount: 2,
});


});

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

expect(stack).toHaveResourceLike('AWS::ECS::Service', {
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
DeploymentConfiguration: {
MaximumPercent: 150,
MinimumHealthyPercent: 100,
},
DesiredCount: 3,
});


});

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

expect(stack).toHaveResourceLike('AWS::ECS::Service', {
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
DeploymentConfiguration: {
MaximumPercent: 125,
MinimumHealthyPercent: 100,
},
DesiredCount: 4,
});


});

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

expect(stack).toHaveResourceLike('AWS::ECS::Service', {
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
DeploymentConfiguration: {
MaximumPercent: 125,
MinimumHealthyPercent: 100,
},
DesiredCount: 8,
});


});

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

// THEN
expect(stack).toHaveResource('AWS::ECS::TaskDefinition');


Template.fromStack(stack).hasResource('AWS::ECS::TaskDefinition', Match.anyValue());
});

test('should detect when attempting to connect services from two different envs', () => {
Expand Down Expand Up @@ -572,7 +558,5 @@ describe('appmesh', () => {
expect(() => {
developmentNameService.connectTo(productionNameService);
}).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/);


});
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import { Template } from '@aws-cdk/assertions';
import * as autoscaling from '@aws-cdk/aws-autoscaling';
import * as ec2 from '@aws-cdk/aws-ec2';
import * as ecs from '@aws-cdk/aws-ecs';
Expand Down Expand Up @@ -29,15 +29,13 @@ describe('assign public ip', () => {
});

// THEN
expect(stack).toHaveResourceLike('AWS::ECS::Service', {
Template.fromStack(stack).hasResourceProperties('AWS::ECS::Service', {
NetworkConfiguration: {
AwsvpcConfiguration: {
AssignPublicIp: 'ENABLED',
},
},
});


});

test('errors when adding a public ip to ec2-backed service', () => {
Expand Down Expand Up @@ -76,8 +74,6 @@ describe('assign public ip', () => {
serviceDescription,
});
}).toThrow(/Fargate/i);


});

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

// THEN
expect(service.ecsService.node.tryFindChild('TaskRecordManager')).toBeUndefined();


});

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

// THEN
expect(service.ecsService.node.tryFindChild('TaskRecordManager')).toBeDefined();


});

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

// THEN
expect(stack).toHaveResourceLike('AWS::Events::Rule', {
Template.fromStack(stack).hasResourceProperties('AWS::Events::Rule', {
EventPattern: {
'source': ['aws.ecs'],
'detail-type': [
Expand All @@ -185,7 +177,7 @@ describe('assign public ip', () => {
},
});

expect(stack).toHaveResourceLike('AWS::Events::Rule', {
Template.fromStack(stack).hasResourceProperties('AWS::Events::Rule', {
EventPattern: {
'source': ['aws.ecs'],
'detail-type': [
Expand All @@ -197,7 +189,5 @@ describe('assign public ip', () => {
},
},
});


});
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import { Template } from '@aws-cdk/assertions';
import * as ecs from '@aws-cdk/aws-ecs';
import * as cdk from '@aws-cdk/core';
import { CloudwatchAgentExtension, Container, Environment, Service, ServiceDescription } from '../lib';
Expand Down Expand Up @@ -27,7 +27,7 @@ describe('cloudwatch agent', () => {
});

// THEN
expect(stack).toHaveResource('AWS::ECS::TaskDefinition', {
Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', {
ContainerDefinitions: [
{
Cpu: 256,
Expand Down Expand Up @@ -102,8 +102,5 @@ describe('cloudwatch agent', () => {
],
},
});


});

});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@aws-cdk/assert-internal/jest';
import { Template } from '@aws-cdk/assertions';
import * as autoscaling from '@aws-cdk/aws-autoscaling';
import * as ec2 from '@aws-cdk/aws-ec2';
import * as ecs from '@aws-cdk/aws-ecs';
Expand Down Expand Up @@ -46,9 +46,9 @@ describe('container', () => {
});

// THEN
expect(stack).toCountResources('AWS::ECS::Service', 1);
Template.fromStack(stack).resourceCountIs('AWS::ECS::Service', 1);

expect(stack).toHaveResource('AWS::ECS::TaskDefinition', {
Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', {
ContainerDefinitions: [
{
Cpu: 256,
Expand Down Expand Up @@ -86,8 +86,6 @@ describe('container', () => {
],
},
});


});

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

// THEN
expect(stack).toCountResources('AWS::ECS::Service', 1);
Template.fromStack(stack).resourceCountIs('AWS::ECS::Service', 1);

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

expect(stack).toHaveResource('AWS::ECS::TaskDefinition', {
Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', {
ContainerDefinitions: [
{
Cpu: 256,
Expand Down Expand Up @@ -184,8 +182,6 @@ describe('container', () => {
],
},
});


});

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

// THEN
expect(stack).toCountResources('AWS::ECS::Service', 1);
Template.fromStack(stack).resourceCountIs('AWS::ECS::Service', 1);

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

expect(stack).toHaveResource('AWS::ECS::TaskDefinition', {
Template.fromStack(stack).hasResourceProperties('AWS::ECS::TaskDefinition', {
ContainerDefinitions: [
{
Cpu: 256,
Expand Down Expand Up @@ -283,8 +279,6 @@ describe('container', () => {
],
},
});


});

test('should error when log group is provided in the container extension and another observability extension is added', () => {
Expand Down Expand Up @@ -312,5 +306,4 @@ describe('container', () => {
});
}).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./);
});

});
Loading

0 comments on commit a7f2db4

Please sign in to comment.