Skip to content

Commit

Permalink
Merge branch 'main' into disable-xray-statemachine
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jul 31, 2024
2 parents 83351db + 4104043 commit e61f2fc
Show file tree
Hide file tree
Showing 21 changed files with 73 additions and 25 deletions.
10 changes: 10 additions & 0 deletions packages/@aws-cdk/aws-apprunner-alpha/lib/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ export class Runtime {
*/
public static readonly NODEJS_16 = Runtime.of('NODEJS_16')

/**
* NodeJS 18
*/
public static readonly NODEJS_18 = Runtime.of('NODEJS_18')

/**
* PHP 8.1
*/
Expand All @@ -212,6 +217,11 @@ export class Runtime {
*/
public static readonly PYTHON_3 = Runtime.of('PYTHON_3')

/**
* Python 3.11
*/
public static readonly PYTHON_311 = Runtime.of('PYTHON_311')

/**
* Ruby 3.1
*/
Expand Down
8 changes: 4 additions & 4 deletions packages/@aws-cdk/aws-kinesisanalytics-flink-alpha/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Kinesis Analytics Flink
# Kinesis Analytics Flink
<!--BEGIN STABILITY BANNER-->

---
Expand Down Expand Up @@ -46,7 +46,7 @@ const flinkApp = new flink.Application(this, 'Application', {
},
},
// ...
runtime: flink.Runtime.FLINK_1_18,
runtime: flink.Runtime.FLINK_1_19,
code: flink.ApplicationCode.fromBucket(bucket, 'my-app.jar'),
});
```
Expand All @@ -59,7 +59,7 @@ snapshotting, monitoring, and parallelism.
declare const bucket: s3.Bucket;
const flinkApp = new flink.Application(this, 'Application', {
code: flink.ApplicationCode.fromBucket(bucket, 'my-app.jar'),
runtime: flink.Runtime.FLINK_1_18,
runtime: flink.Runtime.FLINK_1_19,
checkpointingEnabled: true, // default is true
checkpointInterval: Duration.seconds(30), // default is 1 minute
minPauseBetweenCheckpoints: Duration.seconds(10), // default is 5 seconds
Expand All @@ -80,7 +80,7 @@ declare const bucket: s3.Bucket;
declare const vpc: ec2.Vpc;
const flinkApp = new flink.Application(this, 'Application', {
code: flink.ApplicationCode.fromBucket(bucket, 'my-app.jar'),
runtime: flink.Runtime.FLINK_1_18,
runtime: flink.Runtime.FLINK_1_19,
vpc,
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ export class Runtime {
/** Flink Version 1.18 */
public static readonly FLINK_1_18 = Runtime.of('FLINK-1_18');

/** Flink Version 1.19 */
public static readonly FLINK_1_19 = Runtime.of('FLINK-1_19');

/** Create a new Runtime with with an arbitrary Flink version string */
public static of(value: string) {
return new Runtime(value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ describe('Application', () => {
stack = new core.Stack();
bucket = new s3.Bucket(stack, 'CodeBucket');
requiredProps = {
runtime: flink.Runtime.FLINK_1_11,
runtime: flink.Runtime.FLINK_1_19,
code: flink.ApplicationCode.fromBucket(bucket, 'my-app.jar'),
};
});

test('default Flink Application', () => {
new flink.Application(stack, 'FlinkApplication', {
runtime: flink.Runtime.FLINK_1_11,
runtime: flink.Runtime.FLINK_1_19,
code: flink.ApplicationCode.fromBucket(bucket, 'my-app.jar'),
applicationName: 'MyFlinkApplication',
});

Template.fromStack(stack).hasResourceProperties('AWS::KinesisAnalyticsV2::Application', {
ApplicationName: 'MyFlinkApplication',
RuntimeEnvironment: 'FLINK-1_11',
RuntimeEnvironment: 'FLINK-1_19',
ServiceExecutionRole: {
'Fn::GetAtt': [
'FlinkApplicationRole2F7BCBF6',
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
"SnapshotsEnabled": true
}
},
"RuntimeEnvironment": "FLINK-1_18",
"RuntimeEnvironment": "FLINK-1_19",
"ServiceExecutionRole": {
"Fn::GetAtt": [
"AppRole1AF9B530",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const fileKey = asset.s3ObjectKey;
///! show
new flink.Application(stack, 'App', {
code: flink.ApplicationCode.fromBucket(bucket, fileKey),
runtime: flink.Runtime.FLINK_1_18,
runtime: flink.Runtime.FLINK_1_19,
});
///! hide

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
"SnapshotsEnabled": true
}
},
"RuntimeEnvironment": "FLINK-1_18",
"RuntimeEnvironment": "FLINK-1_19",
"ServiceExecutionRole": {
"Fn::GetAtt": [
"AppRole1AF9B530",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const stack = new core.Stack(app, 'FlinkAppTest');

const flinkApp = new flink.Application(stack, 'App', {
code: flink.ApplicationCode.fromAsset(path.join(__dirname, 'code-asset')),
runtime: flink.Runtime.FLINK_1_18,
runtime: flink.Runtime.FLINK_1_19,
});

new cloudwatch.Alarm(stack, 'Alarm', {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@
}
]
},
"RuntimeEnvironment": "FLINK-1_18",
"RuntimeEnvironment": "FLINK-1_19",
"ServiceExecutionRole": {
"Fn::GetAtt": [
"AppRole1AF9B530",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const vpc = new ec2.Vpc(stack, 'VPC', { restrictDefaultSecurityGroup: false });

new flink.Application(stack, 'App', {
code: flink.ApplicationCode.fromAsset(path.join(__dirname, 'code-asset')),
runtime: flink.Runtime.FLINK_1_18,
runtime: flink.Runtime.FLINK_1_19,
vpc,
});

Expand Down
7 changes: 7 additions & 0 deletions packages/@aws-cdk/aws-location-alpha/lib/place-index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ export interface PlaceIndexProps {
/**
* A name for the place index
*
* Must be between 1 and 100 characters and contain only alphanumeric characters,
* hyphens, periods and underscores.
*
* @default - A name is automatically generated
*/
readonly placeIndexName?: string;
Expand Down Expand Up @@ -175,6 +178,10 @@ export class PlaceIndex extends PlaceIndexBase {
public readonly placeIndexUpdateTime: string;

constructor(scope: Construct, id: string, props: PlaceIndexProps = {}) {
if (props.description && !Token.isUnresolved(props.description) && props.description.length > 1000) {
throw new Error(`\`description\` must be between 0 and 1000 characters. Received: ${props.description.length} characters`);
}

if (props.placeIndexName && !Token.isUnresolved(props.placeIndexName) && !/^[-.\w]{1,100}$/.test(props.placeIndexName)) {
throw new Error(`Invalid place index name. The place index name must be between 1 and 100 characters and contain only alphanumeric characters, hyphens, periods and underscores. Received: ${props.placeIndexName}`);
}
Expand Down
28 changes: 28 additions & 0 deletions packages/@aws-cdk/aws-location-alpha/test/place-index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,34 @@ test('create a place index', () => {
});
});

test('create a place index with description', () => {
new PlaceIndex(stack, 'PlaceIndex', {
description: 'my-description',
});

Template.fromStack(stack).hasResourceProperties('AWS::Location::PlaceIndex', {
DataSource: 'Esri',
IndexName: 'PlaceIndex',
Description: 'my-description',
});
});

test('creates a place index with empty description', () => {
new PlaceIndex(stack, 'PlaceIndex', {
description: '',
});

Template.fromStack(stack).hasResourceProperties('AWS::Location::PlaceIndex', {
Description: '',
});
});

test('throws with invalid description', () => {
expect(() => new PlaceIndex(stack, 'PlaceIndex', {
description: 'a'.repeat(1001),
})).toThrow('`description` must be between 0 and 1000 characters. Received: 1001 characters');
});

test('throws with invalid name', () => {
expect(() => new PlaceIndex(stack, 'PlaceIndex', {
placeIndexName: 'inv@lid',
Expand Down

0 comments on commit e61f2fc

Please sign in to comment.