Skip to content

Commit

Permalink
Merge branch 'main' into firehose-readme-logging-clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Oct 23, 2024
2 parents 852aa02 + fee2cf8 commit af32dfa
Show file tree
Hide file tree
Showing 54 changed files with 683 additions and 431 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2301,6 +2301,58 @@ integTest('hotswap deployment supports AppSync APIs with many functions',
}),
);

integTest('hotswap ECS deployment respects properties override', withDefaultFixture(async (fixture) => {
// Update the CDK context with the new ECS properties
let ecsMinimumHealthyPercent = 100;
let ecsMaximumHealthyPercent = 200;
let cdkJson = JSON.parse(await fs.readFile(path.join(fixture.integTestDir, 'cdk.json'), 'utf8'));
cdkJson = {
...cdkJson,
hotswap: {
ecs: {
minimumHealthyPercent: ecsMinimumHealthyPercent,
maximumHealthyPercent: ecsMaximumHealthyPercent,
},
},
};

await fs.writeFile(path.join(fixture.integTestDir, 'cdk.json'), JSON.stringify(cdkJson));

// GIVEN
const stackArn = await fixture.cdkDeploy('ecs-hotswap', {
captureStderr: false,
});

// WHEN
await fixture.cdkDeploy('ecs-hotswap', {
options: [
'--hotswap',
],
modEnv: {
DYNAMIC_ECS_PROPERTY_VALUE: 'new value',
},
});

const describeStacksResponse = await fixture.aws.cloudFormation.send(
new DescribeStacksCommand({
StackName: stackArn,
}),
);

const clusterName = describeStacksResponse.Stacks?.[0].Outputs?.find(output => output.OutputKey == 'ClusterName')?.OutputValue!;
const serviceName = describeStacksResponse.Stacks?.[0].Outputs?.find(output => output.OutputKey == 'ServiceName')?.OutputValue!;

// THEN
const describeServicesResponse = await fixture.aws.ecs.send(
new DescribeServicesCommand({
cluster: clusterName,
services: [serviceName],
}),
);
expect(describeServicesResponse.services?.[0].deploymentConfiguration?.minimumHealthyPercent).toEqual(ecsMinimumHealthyPercent);
expect(describeServicesResponse.services?.[0].deploymentConfiguration?.maximumPercent).toEqual(ecsMaximumHealthyPercent);
}));

async function listChildren(parent: string, pred: (x: string) => Promise<boolean>) {
const ret = new Array<string>();
for (const child of await fs.readdir(parent, { encoding: 'utf-8' })) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,15 @@ export class AutoScalingConfiguration extends cdk.Resource implements IAutoScali
}

/**
* The ARN of the Auto Scaling Configuration.
* @attribute
*/
* The ARN of the Auto Scaling Configuration.
* @attribute
*/
readonly autoScalingConfigurationArn: string;

/**
* The name of the Auto Scaling Configuration.
* @attribute
*/
* The name of the Auto Scaling Configuration.
* @attribute
*/
readonly autoScalingConfigurationName: string;

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-apprunner-alpha/lib/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,8 @@ export abstract class Source {
}

/**
* Called when the Job is initialized to allow this object to bind.
*/
* Called when the Job is initialized to allow this object to bind.
*/
public abstract bind(scope: Construct): SourceConfig;
}

Expand Down
20 changes: 10 additions & 10 deletions packages/@aws-cdk/aws-apprunner-alpha/lib/vpc-connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ export interface VpcConnectorProps {
readonly securityGroups?: ec2.ISecurityGroup[];

/**
* The name for the VpcConnector.
*
* @default - a name generated by CloudFormation
*/
* The name for the VpcConnector.
*
* @default - a name generated by CloudFormation
*/
readonly vpcConnectorName?: string;
}

Expand Down Expand Up @@ -109,9 +109,9 @@ export class VpcConnector extends cdk.Resource implements IVpcConnector {
}

/**
* The ARN of the VPC connector.
* @attribute
*/
* The ARN of the VPC connector.
* @attribute
*/
readonly vpcConnectorArn: string;

/**
Expand All @@ -121,9 +121,9 @@ export class VpcConnector extends cdk.Resource implements IVpcConnector {
readonly vpcConnectorRevision: number;

/**
* The name of the VPC connector.
* @attribute
*/
* The name of the VPC connector.
* @attribute
*/
readonly vpcConnectorName: string;

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-gamelift-alpha/lib/alias.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ export class Alias extends AliasBase {
public readonly aliasId: string;

/**
* The ARN of the alias.
*/
* The ARN of the alias.
*/
public readonly aliasArn: string;

/**
Expand Down
8 changes: 4 additions & 4 deletions packages/@aws-cdk/aws-gamelift-alpha/lib/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ export interface BuildProps {
readonly buildName?: string;

/**
* Version of this build
*
* @default No version
*/
* Version of this build
*
* @default No version
*/
readonly buildVersion?: string;

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-gamelift-alpha/lib/fleet-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,8 @@ export abstract class FleetBase extends cdk.Resource implements IFleet {
}

/**
* The Identifier of the fleet.
*/
* The Identifier of the fleet.
*/
public abstract readonly fleetId: string;

/**
Expand Down
8 changes: 4 additions & 4 deletions packages/@aws-cdk/aws-gamelift-alpha/lib/game-server-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,10 @@ export interface GameServerGroupProps {
readonly deleteOption?: DeleteOption;

/**
* Indicates how GameLift FleetIQ balances the use of Spot Instances and On-Demand Instances in the game server group.
*
* @default SPOT_PREFERRED
*/
* Indicates how GameLift FleetIQ balances the use of Spot Instances and On-Demand Instances in the game server group.
*
* @default SPOT_PREFERRED
*/
readonly balancingStrategy?: BalancingStrategy;
}

Expand Down
74 changes: 37 additions & 37 deletions packages/@aws-cdk/aws-gamelift-alpha/lib/ingress-rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ export enum Protocol {
*/
export interface PortProps {
/**
* The protocol for the range
*/
* The protocol for the range
*/
readonly protocol: Protocol;

/**
* A starting value for a range of allowed port numbers.
*
* For fleets using Windows and Linux builds, only ports 1026-60000 are valid.
*/
* A starting value for a range of allowed port numbers.
*
* For fleets using Windows and Linux builds, only ports 1026-60000 are valid.
*/
readonly fromPort: number;

/**
* An ending value for a range of allowed port numbers. Port numbers are end-inclusive.
* This value must be higher than `fromPort`.
*
* For fleets using Windows and Linux builds, only ports 1026-60000 are valid.
*
* @default the `fromPort` value
*/
* An ending value for a range of allowed port numbers. Port numbers are end-inclusive.
* This value must be higher than `fromPort`.
*
* For fleets using Windows and Linux builds, only ports 1026-60000 are valid.
*
* @default the `fromPort` value
*/
readonly toPort?: number;
}

Expand All @@ -42,8 +42,8 @@ export interface PortProps {
*/
export class Port {
/**
* A single TCP port
*/
* A single TCP port
*/
public static tcp(port: number): Port {
return new Port({
protocol: Protocol.TCP,
Expand All @@ -53,8 +53,8 @@ export class Port {
}

/**
* A TCP port range
*/
* A TCP port range
*/
public static tcpRange(startPort: number, endPort: number) {
return new Port({
protocol: Protocol.TCP,
Expand All @@ -64,8 +64,8 @@ export class Port {
}

/**
* Any TCP traffic
*/
* Any TCP traffic
*/
public static allTcp() {
return new Port({
protocol: Protocol.TCP,
Expand All @@ -75,8 +75,8 @@ export class Port {
}

/**
* A single UDP port
*/
* A single UDP port
*/
public static udp(port: number): Port {
return new Port({
protocol: Protocol.UDP,
Expand All @@ -86,8 +86,8 @@ export class Port {
}

/**
* A UDP port range
*/
* A UDP port range
*/
public static udpRange(startPort: number, endPort: number) {
return new Port({
protocol: Protocol.UDP,
Expand All @@ -97,8 +97,8 @@ export class Port {
}

/**
* Any UDP traffic
*/
* Any UDP traffic
*/
public static allUdp() {
return new Port({
protocol: Protocol.UDP,
Expand Down Expand Up @@ -127,13 +127,13 @@ export class Port {
export interface IPeer {

/**
* A unique identifier for this connection peer
*/
* A unique identifier for this connection peer
*/
readonly uniqueId: string;

/**
* Produce the ingress rule JSON for the given connection
*/
* Produce the ingress rule JSON for the given connection
*/
toJson(): any;
}

Expand All @@ -147,15 +147,15 @@ export interface IPeer {
*/
export class Peer {
/**
* Create an IPv4 peer from a CIDR
*/
* Create an IPv4 peer from a CIDR
*/
public static ipv4(cidrIp: string): IPeer {
return new CidrIPv4(cidrIp);
}

/**
* Any IPv4 address
*/
* Any IPv4 address
*/
public static anyIpv4(): IPeer {
return new AnyIPv4();
}
Expand Down Expand Up @@ -188,8 +188,8 @@ class CidrIPv4 implements IPeer {
}

/**
* Produce the ingress rule JSON for the given connection
*/
* Produce the ingress rule JSON for the given connection
*/
public toJson(): any {
return { ipRange: this.cidrIp };
}
Expand All @@ -213,8 +213,8 @@ class AnyIPv4 extends CidrIPv4 {
*/
export interface IngressRule {
/**
* The port range used for ingress traffic
*/
* The port range used for ingress traffic
*/
readonly port: Port;

/**
Expand Down
24 changes: 12 additions & 12 deletions packages/@aws-cdk/aws-kinesisfirehose-alpha/lib/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ import * as kinesis from 'aws-cdk-lib/aws-kinesis';
*/
interface SourceConfig {
/**
* Configuration for using a Kinesis Data Stream as a source for the delivery stream.
*
* This will be returned by the _bind method depending on what type of Source class is specified.
*
* @default - Kinesis Data Stream Source configuration property is not provided.
*/
* Configuration for using a Kinesis Data Stream as a source for the delivery stream.
*
* This will be returned by the _bind method depending on what type of Source class is specified.
*
* @default - Kinesis Data Stream Source configuration property is not provided.
*/
readonly kinesisStreamSourceConfiguration?: CfnDeliveryStream.KinesisStreamSourceConfigurationProperty;

/**
* Configuration for using an MSK (Managed Streaming for Kafka) cluster as a source for the delivery stream.
*
* This will be returned by the _bind method depending on what type of Source class is specified.
*
* @default - MSK Source configuration property is not provided.
*/
* Configuration for using an MSK (Managed Streaming for Kafka) cluster as a source for the delivery stream.
*
* This will be returned by the _bind method depending on what type of Source class is specified.
*
* @default - MSK Source configuration property is not provided.
*/
readonly mskSourceConfiguration?: CfnDeliveryStream.MSKSourceConfigurationProperty;
}

Expand Down
Loading

0 comments on commit af32dfa

Please sign in to comment.