Skip to content

Commit

Permalink
chore: fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
GavinZZ committed Jan 14, 2025
1 parent 4cf55d3 commit 37555de
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ class Import extends ApplicationBase {
constructor(scope: Construct, id: string, attrs: { applicationArn: string; securityGroups?: ec2.ISecurityGroup[] }) {
super(scope, id);
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);
addConstructMetadata(this, attrs);

// Imported applications have no associated role or grantPrincipal
this.grantPrincipal = new iam.UnknownPrincipal({ resource: this });
Expand Down
5 changes: 3 additions & 2 deletions packages/@aws-cdk/aws-lambda-go-alpha/lib/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ export class GoFunction extends lambda.Function {

const runtime = props.runtime ?? lambda.Runtime.PROVIDED_AL2;
const architecture = props.architecture ?? lambda.Architecture.X86_64;
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);

super(scope, id, {
...props,
Expand All @@ -123,6 +121,9 @@ export class GoFunction extends lambda.Function {
}),
handler: 'bootstrap', // setting name to bootstrap so that the 'provided' runtime can also be used
});

// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);
}
}

5 changes: 3 additions & 2 deletions packages/@aws-cdk/aws-lambda-python-alpha/lib/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ export class PythonFunction extends Function {
if (props.runtime && props.runtime.family !== RuntimeFamily.PYTHON) {
throw new Error('Only `PYTHON` runtimes are supported.');
}
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);

super(scope, id, {
...props,
Expand All @@ -83,5 +81,8 @@ export class PythonFunction extends Function {
}),
handler: resolvedHandler,
});

// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);
}
}
5 changes: 3 additions & 2 deletions packages/@aws-cdk/aws-lambda-python-alpha/lib/layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ export class PythonLayerVersion extends lambda.LayerVersion {
// Entry and defaults
const entry = path.resolve(props.entry);
// Pick the first compatibleRuntime and compatibleArchitectures to use for bundling
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);
const runtime = compatibleRuntimes[0];
const architecture = compatibleArchitectures[0];

Expand All @@ -72,5 +70,8 @@ export class PythonLayerVersion extends lambda.LayerVersion {
...props.bundling,
}),
});

// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);
}
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-pipes-alpha/lib/pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class ImportedPipe extends PipeBase {
constructor(scope: Construct, id: string, pipeName: string) {
super(scope, id);
// Enhanced CDK Analytics Telemetry
addConstructMetadata(this, props);
addConstructMetadata(this, { pipeName: pipeName });
this.pipeName = pipeName;
this.pipeArn = Stack.of(this).formatArn({
service: 'pipes',
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-scheduler-alpha/lib/group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import * as cloudwatch from 'aws-cdk-lib/aws-cloudwatch';
import * as iam from 'aws-cdk-lib/aws-iam';
import { CfnScheduleGroup } from 'aws-cdk-lib/aws-scheduler';
import { Arn, ArnFormat, Aws, IResource, Names, RemovalPolicy, Resource, Stack } from 'aws-cdk-lib/core';
import { Construct } from 'constructs';
import { addConstructMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';
import { Construct } from 'constructs';

export interface GroupProps {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-scheduler-alpha/lib/schedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { Duration, IResource, Resource, Token } from 'aws-cdk-lib';
import * as cloudwatch from 'aws-cdk-lib/aws-cloudwatch';
import * as kms from 'aws-cdk-lib/aws-kms';
import { CfnSchedule } from 'aws-cdk-lib/aws-scheduler';
import { addConstructMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';
import { Construct } from 'constructs';
import { IGroup } from './group';
import { ScheduleExpression } from './schedule-expression';
import { IScheduleTarget } from './target';
import { addConstructMetadata } from 'aws-cdk-lib/core/lib/metadata-resource';

/**
* Interface representing a created or an imported `Schedule`.
Expand Down

0 comments on commit 37555de

Please sign in to comment.