Skip to content

Commit 4f9814c

Browse files
authored
chore: Upgrade to CDK 2.155.0 (#623)
1 parent 31a3a0c commit 4f9814c

File tree

15 files changed

+156
-127
lines changed

15 files changed

+156
-127
lines changed

.projen/deps.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projenrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const project = new awscdk.AwsCdkConstructLibrary({
77
author: 'Amir Szekely',
88
authorAddress: 'amir@cloudsnorkel.com',
99
stability: Stability.EXPERIMENTAL,
10-
cdkVersion: '2.123.0', // 2.21.1 for lambda url, 2.29.0 for Names.uniqueResourceName(), 2.50.0 for JsonPath.base64Encode, 2.77.0 for node 16, 2.110.0 for ib lifecycle, 2.123.0 for lambda logs
10+
cdkVersion: '2.155.0', // 2.21.1 for lambda url, 2.29.0 for Names.uniqueResourceName(), 2.50.0 for JsonPath.base64Encode, 2.77.0 for node 16, 2.110.0 for ib lifecycle, 2.123.0 for lambda logs, 2.155.0 for launch template throughput
1111
defaultReleaseBranch: 'main',
1212
name: '@cloudsnorkel/cdk-github-runners',
1313
repositoryUrl: 'https://github.com/CloudSnorkel/cdk-github-runners.git',

package.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/image-builders/aws-image-builder/builder.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ export class AwsImageBuilderRunnerImageBuilder extends RunnerImageBuilderBase {
471471
description: 'Custom resource handler that triggers CodeBuild to build runner images',
472472
timeout: cdk.Duration.minutes(3),
473473
logGroup: singletonLogGroup(this, SingletonLogType.RUNNER_IMAGE_BUILD),
474-
logFormat: lambda.LogFormat.JSON,
474+
loggingFormat: lambda.LoggingFormat.JSON,
475475
});
476476
oldDeleter.addToRolePolicy(new iam.PolicyStatement({
477477
effect: iam.Effect.DENY,
@@ -931,7 +931,7 @@ export class AwsImageBuilderRunnerImageBuilder extends RunnerImageBuilderBase {
931931
}),
932932
],
933933
logGroup: singletonLogGroup(this, SingletonLogType.RUNNER_IMAGE_BUILD),
934-
logFormat: lambda.LogFormat.JSON,
934+
loggingFormat: lambda.LoggingFormat.JSON,
935935
timeout: cdk.Duration.minutes(10),
936936
});
937937

@@ -958,7 +958,7 @@ export class AwsImageBuilderFailedBuildNotifier implements cdk.IAspect {
958958
const topic = new sns.Topic(scope, 'Image Builder Builds');
959959
const filter = new FilterFailedBuildsFunction(scope, 'Image Builder Builds Filter', {
960960
logGroup: singletonLogGroup(scope, SingletonLogType.RUNNER_IMAGE_BUILD),
961-
logFormat: lambda.LogFormat.JSON,
961+
loggingFormat: lambda.LoggingFormat.JSON,
962962
environment: {
963963
TARGET_TOPIC_ARN: targetTopic.topicArn,
964964
},

src/image-builders/aws-image-builder/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export abstract class ImageBuilderObjectBase extends cdk.Resource {
4040
}),
4141
],
4242
logGroup: singletonLogGroup(this, SingletonLogType.RUNNER_IMAGE_BUILD),
43-
logFormat: lambda.LogFormat.JSON,
43+
loggingFormat: lambda.LoggingFormat.JSON,
4444
timeout: cdk.Duration.minutes(5),
4545
});
4646
}

src/image-builders/codebuild.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ export class CodeBuildRunnerImageBuilder extends RunnerImageBuilderBase {
354354
description: 'Custom resource handler that triggers CodeBuild to build runner images',
355355
timeout: cdk.Duration.minutes(3),
356356
logGroup: singletonLogGroup(this, SingletonLogType.RUNNER_IMAGE_BUILD),
357-
logFormat: lambda.LogFormat.JSON,
357+
loggingFormat: lambda.LoggingFormat.JSON,
358358
});
359359

360360
const policy = new iam.Policy(this, 'CR Policy', {

src/providers/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ export function amiRootDevice(scope: Construct, ami?: string) {
516516
description: 'Custom resource handler that discovers the boot drive device name for a given AMI',
517517
timeout: cdk.Duration.minutes(1),
518518
logGroup: singletonLogGroup(scope, SingletonLogType.RUNNER_IMAGE_BUILD),
519-
logFormat: lambda.LogFormat.JSON,
519+
loggingFormat: lambda.LoggingFormat.JSON,
520520
initialPolicy: [
521521
new iam.PolicyStatement({
522522
actions: [

src/providers/ecs.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ export interface EcsRunnerProviderProps extends RunnerProviderProps {
174174

175175
interface EcsEc2LaunchTargetProps {
176176
readonly capacityProvider: string;
177-
readonly enableExecute: boolean;
178177
}
179178

180179
class EcsEc2LaunchTarget implements stepfunctions_tasks.IEcsLaunchTarget {
@@ -189,7 +188,6 @@ class EcsEc2LaunchTarget implements stepfunctions_tasks.IEcsLaunchTarget {
189188
return {
190189
parameters: {
191190
PropagateTags: ecs.PropagatedTagSource.TASK_DEFINITION,
192-
EnableExecuteCommand: this.props.enableExecute,
193191
CapacityProviderStrategy: [
194192
{
195193
CapacityProvider: this.props.capacityProvider,
@@ -547,8 +545,8 @@ export class EcsRunnerProvider extends BaseProvider implements IRunnerProvider {
547545
cluster: this.cluster,
548546
launchTarget: new EcsEc2LaunchTarget({
549547
capacityProvider: this.capacityProvider.capacityProviderName,
550-
enableExecute: this.image.os.isIn(Os._ALL_LINUX_VERSIONS),
551548
}),
549+
enableExecuteCommand: this.image.os.isIn(Os._ALL_LINUX_VERSIONS),
552550
assignPublicIp: this.assignPublicIp,
553551
containerOverrides: [
554552
{

src/providers/fargate.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ export interface FargateRunnerProviderProps extends RunnerProviderProps {
165165
*/
166166
interface EcsFargateLaunchTargetProps {
167167
readonly spot: boolean;
168-
readonly enableExecute: boolean;
169168
}
170169

171170
/**
@@ -187,7 +186,6 @@ class EcsFargateLaunchTarget implements stepfunctions_tasks.IEcsLaunchTarget {
187186
return {
188187
parameters: {
189188
PropagateTags: ecs.PropagatedTagSource.TASK_DEFINITION,
190-
EnableExecuteCommand: this.props.enableExecute,
191189
CapacityProviderStrategy: [
192190
{
193191
CapacityProvider: this.props.spot ? 'FARGATE_SPOT' : 'FARGATE',
@@ -464,8 +462,8 @@ export class FargateRunnerProvider extends BaseProvider implements IRunnerProvid
464462
cluster: this.cluster,
465463
launchTarget: new EcsFargateLaunchTarget({
466464
spot: this.spot,
467-
enableExecute: this.image.os.isIn(Os._ALL_LINUX_VERSIONS),
468465
}),
466+
enableExecuteCommand: this.image.os.isIn(Os._ALL_LINUX_VERSIONS),
469467
subnets: this.subnetSelection,
470468
assignPublicIp: this.assignPublicIp,
471469
securityGroups: this.securityGroups,

src/providers/lambda.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ export class LambdaRunnerProvider extends BaseProvider implements IRunnerProvide
338338
description: 'Function that updates a GitHub Actions runner function with the latest image digest after the image has been rebuilt',
339339
timeout: cdk.Duration.minutes(15),
340340
logGroup: singletonLogGroup(this, SingletonLogType.RUNNER_IMAGE_BUILD),
341-
logFormat: lambda.LogFormat.JSON,
341+
loggingFormat: lambda.LoggingFormat.JSON,
342342
});
343343

344344
updater.addToRolePolicy(new iam.PolicyStatement({

src/runner.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ export class GitHubRunners extends Construct implements ec2.IConnectable {
473473
},
474474
timeout: cdk.Duration.seconds(30),
475475
logGroup: singletonLogGroup(this, SingletonLogType.ORCHESTRATOR),
476-
logFormat: lambda.LogFormat.JSON,
476+
loggingFormat: lambda.LoggingFormat.JSON,
477477
...this.extraLambdaProps,
478478
},
479479
);
@@ -497,7 +497,7 @@ export class GitHubRunners extends Construct implements ec2.IConnectable {
497497
},
498498
timeout: cdk.Duration.seconds(30),
499499
logGroup: singletonLogGroup(this, SingletonLogType.ORCHESTRATOR),
500-
logFormat: lambda.LogFormat.JSON,
500+
loggingFormat: lambda.LoggingFormat.JSON,
501501
...this.extraLambdaProps,
502502
},
503503
);
@@ -528,7 +528,7 @@ export class GitHubRunners extends Construct implements ec2.IConnectable {
528528
},
529529
timeout: cdk.Duration.minutes(3),
530530
logGroup: singletonLogGroup(this, SingletonLogType.SETUP),
531-
logFormat: lambda.LogFormat.JSON,
531+
loggingFormat: lambda.LoggingFormat.JSON,
532532
...this.extraLambdaProps,
533533
},
534534
);
@@ -591,7 +591,7 @@ export class GitHubRunners extends Construct implements ec2.IConnectable {
591591
},
592592
timeout: cdk.Duration.minutes(3),
593593
logGroup: singletonLogGroup(this, SingletonLogType.SETUP),
594-
logFormat: lambda.LogFormat.JSON,
594+
loggingFormat: lambda.LoggingFormat.JSON,
595595
...this.extraLambdaProps,
596596
},
597597
);
@@ -635,7 +635,7 @@ export class GitHubRunners extends Construct implements ec2.IConnectable {
635635
...this.extraLambdaEnv,
636636
},
637637
logGroup: singletonLogGroup(this, SingletonLogType.ORCHESTRATOR),
638-
logFormat: lambda.LogFormat.JSON,
638+
loggingFormat: lambda.LoggingFormat.JSON,
639639
timeout: cdk.Duration.minutes(5),
640640
...this.extraLambdaProps,
641641
});

src/webhook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export class GithubWebhookHandler extends Construct {
8181
},
8282
timeout: cdk.Duration.seconds(31),
8383
logGroup: singletonLogGroup(this, SingletonLogType.ORCHESTRATOR),
84-
logFormat: lambda.LogFormat.JSON,
84+
loggingFormat: lambda.LoggingFormat.JSON,
8585
},
8686
);
8787

test/default.integ.snapshot/github-runners-test.assets.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "36.0.0",
2+
"version": "36.3.0",
33
"files": {
44
"64f83fc47e69ce862669fca14d759c3034fdbed3686b66dcf7bf9ff166f65c68": {
55
"source": {
@@ -79,15 +79,15 @@
7979
}
8080
}
8181
},
82-
"ed6cd104ff5f101d06dae8cb2b87cc6e6d69b9a22055b467ea6cae10ff023023": {
82+
"97f30e67419a1676a2215492723e5add1aa491caf0cbe2dd878fc4fab0468cd4": {
8383
"source": {
84-
"path": "asset.ed6cd104ff5f101d06dae8cb2b87cc6e6d69b9a22055b467ea6cae10ff023023",
84+
"path": "asset.97f30e67419a1676a2215492723e5add1aa491caf0cbe2dd878fc4fab0468cd4",
8585
"packaging": "zip"
8686
},
8787
"destinations": {
8888
"current_account-current_region": {
8989
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
90-
"objectKey": "ed6cd104ff5f101d06dae8cb2b87cc6e6d69b9a22055b467ea6cae10ff023023.zip",
90+
"objectKey": "97f30e67419a1676a2215492723e5add1aa491caf0cbe2dd878fc4fab0468cd4.zip",
9191
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
9292
}
9393
}
@@ -209,15 +209,15 @@
209209
}
210210
}
211211
},
212-
"0bfbe8634efd4c8c3e0bb6dcc818e7f60011863c359b6966bb50ea94549642e5": {
212+
"bdf474a164f615217e0702c26ada96931a06c49f175c267bfd2b35a006b799a8": {
213213
"source": {
214214
"path": "github-runners-test.template.json",
215215
"packaging": "file"
216216
},
217217
"destinations": {
218218
"current_account-current_region": {
219219
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
220-
"objectKey": "0bfbe8634efd4c8c3e0bb6dcc818e7f60011863c359b6966bb50ea94549642e5.json",
220+
"objectKey": "bdf474a164f615217e0702c26ada96931a06c49f175c267bfd2b35a006b799a8.json",
221221
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
222222
}
223223
}

0 commit comments

Comments
 (0)