Skip to content

Commit 95f89bf

Browse files
authored
Merge branch 'main' into merge-back/2.39.1
2 parents f188fac + eaaba39 commit 95f89bf

File tree

93 files changed

+1038
-190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+1038
-190
lines changed

packages/@aws-cdk-containers/ecs-service-extensions/test/integ.assign-public-ip.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import { SubnetType, Vpc } from '@aws-cdk/aws-ec2';
32
import { ContainerImage } from '@aws-cdk/aws-ecs';
43
import { CnameRecord, PublicHostedZone } from '@aws-cdk/aws-route53';

packages/@aws-cdk-containers/ecs-service-extensions/test/integ.imported-environment.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import { Vpc } from '@aws-cdk/aws-ec2';
32
import { Cluster, ContainerImage } from '@aws-cdk/aws-ecs';
43
import { App, NestedStack, Stack } from '@aws-cdk/core';

packages/@aws-cdk/aws-amplify/test/integ.app-asset-deployment.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import * as path from 'path';
32
import { Asset } from '@aws-cdk/aws-s3-assets';
43
import { App, Stack, StackProps } from '@aws-cdk/core';

packages/@aws-cdk/aws-apigateway/test/authorizers/integ.request-authorizer.lit.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import * as path from 'path';
32
import * as lambda from '@aws-cdk/aws-lambda';
43
import { App, Stack } from '@aws-cdk/core';

packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer-iam-role.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import * as path from 'path';
32
import * as iam from '@aws-cdk/aws-iam';
43
import * as lambda from '@aws-cdk/aws-lambda';

packages/@aws-cdk/aws-apigateway/test/authorizers/integ.token-authorizer.lit.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import * as path from 'path';
32
import * as lambda from '@aws-cdk/aws-lambda';
43
import { App, Stack } from '@aws-cdk/core';

packages/@aws-cdk/aws-apigateway/test/integ.cors.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import * as path from 'path';
32
import * as lambda from '@aws-cdk/aws-lambda';
43
import { App, Stack, StackProps } from '@aws-cdk/core';

packages/@aws-cdk/aws-apigatewayv2-authorizers/test/http/integ.user-pool.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import * as path from 'path';
32
import { HttpApi, HttpMethod } from '@aws-cdk/aws-apigatewayv2';
43
import { HttpLambdaIntegration } from '@aws-cdk/aws-apigatewayv2-integrations';

packages/@aws-cdk/aws-chatbot/test/integ.chatbot-logretention.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import * as iam from '@aws-cdk/aws-iam';
32
import * as logs from '@aws-cdk/aws-logs';
43
import * as cdk from '@aws-cdk/core';
@@ -31,4 +30,3 @@ const app = new cdk.App();
3130
new ChatbotLogRetentionInteg(app, 'ChatbotLogRetentionInteg');
3231

3332
app.synth();
34-

packages/@aws-cdk/aws-cloudformation/test/integ.core-custom-resources.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
/*
32
* Stack verification steps:
43
* - Deploy with `--no-clean`

packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-assets.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import * as path from 'path';
32
import * as lambda from '@aws-cdk/aws-lambda';
43
import { App, NestedStack, Stack } from '@aws-cdk/core';

packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi-refs.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import * as sns from '@aws-cdk/aws-sns';
32
import { App, Fn, NestedStack, Stack } from '@aws-cdk/core';
43

packages/@aws-cdk/aws-cloudformation/test/integ.nested-stacks-multi.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import * as sns from '@aws-cdk/aws-sns';
32
import { App, NestedStack, Stack } from '@aws-cdk/core';
43
import { Construct } from 'constructs';

packages/@aws-cdk/aws-cognito/test/integ.user-pool-domain-cfdist.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import { App, CfnOutput, RemovalPolicy, Stack } from '@aws-cdk/core';
32
import { UserPool } from '../lib';
43

@@ -26,4 +25,4 @@ new CfnOutput(stack, 'Domain', {
2625

2726
new CfnOutput(stack, 'CloudFrontDomainName', {
2827
value: domain.cloudFrontDomainName,
29-
});
28+
});

packages/@aws-cdk/aws-dynamodb/test/integ.global-replicas-provisioned.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import * as cdk from '@aws-cdk/core';
32
import * as dynamodb from '../lib';
43

packages/@aws-cdk/aws-dynamodb/test/integ.global.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import { App, RemovalPolicy, Stack, StackProps } from '@aws-cdk/core';
32
import { Construct } from 'constructs';
43
import * as dynamodb from '../lib';

packages/@aws-cdk/aws-ecr/test/integ.imagescan.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import * as cdk from '@aws-cdk/core';
32
import * as ecr from '../lib';
43

packages/@aws-cdk/aws-ecs/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -868,13 +868,15 @@ taskDefinition.addContainer('TheContainer', {
868868
### splunk Log Driver
869869

870870
```ts
871+
declare const secret: secretsmanager.Secret;
872+
871873
// Create a Task Definition for the container to start
872874
const taskDefinition = new ecs.Ec2TaskDefinition(this, 'TaskDef');
873875
taskDefinition.addContainer('TheContainer', {
874876
image: ecs.ContainerImage.fromRegistry('example-image'),
875877
memoryLimitMiB: 256,
876878
logging: ecs.LogDrivers.splunk({
877-
token: SecretValue.secretsManager('my-splunk-token'),
879+
secretToken: secret,
878880
url: 'my-splunk-url',
879881
}),
880882
});

packages/@aws-cdk/aws-ecs/lib/log-drivers/splunk-log-driver.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,8 @@ export interface SplunkLogDriverProps extends BaseLogDriverProps {
3737
*
3838
* The splunk-token is added to the SecretOptions property of the Log Driver Configuration. So the secret value will not be
3939
* resolved or viewable as plain text.
40-
*
41-
* Please provide at least one of `token` or `secretToken`.
42-
* @default - If secret token is not provided, then the value provided in `token` will be used.
4340
*/
44-
readonly secretToken?: Secret;
41+
readonly secretToken: Secret;
4542

4643
/**
4744
* Path to your Splunk Enterprise, self-service Splunk Cloud instance, or Splunk

packages/@aws-cdk/aws-ecs/test/splunk-log-driver.test.ts

-12
Original file line numberDiff line numberDiff line change
@@ -209,16 +209,4 @@ describe('splunk log driver', () => {
209209
],
210210
});
211211
});
212-
213-
test('throws when neither token nor secret token are provided', () => {
214-
expect(() => {
215-
td.addContainer('Container', {
216-
image,
217-
logging: ecs.LogDrivers.splunk({
218-
url: 'my-splunk-url',
219-
}),
220-
memoryLimitMiB: 128,
221-
});
222-
}).toThrow('Please provide either token or secretToken.');
223-
});
224212
});

packages/@aws-cdk/aws-eks/test/integ.alb-controller.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// !cdk-integ pragma:ignore-assets pragma:disable-update-workflow
1+
/// !cdk-integ pragma:disable-update-workflow
22
import * as ec2 from '@aws-cdk/aws-ec2';
33
import { App, CfnOutput, Duration, Stack } from '@aws-cdk/core';
44
import * as cdk8s from 'cdk8s';

packages/@aws-cdk/aws-eks/test/integ.eks-bottlerocket-ng.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// !cdk-integ pragma:ignore-assets pragma:disable-update-workflow
1+
/// !cdk-integ pragma:disable-update-workflow
22
import * as ec2 from '@aws-cdk/aws-ec2';
33
import * as iam from '@aws-cdk/aws-iam';
44
import { App, Stack } from '@aws-cdk/core';

packages/@aws-cdk/aws-eks/test/integ.eks-cluster-handlers-vpc.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// !cdk-integ pragma:ignore-assets pragma:disable-update-workflow
1+
/// !cdk-integ pragma:disable-update-workflow
22
import { App, Stack } from '@aws-cdk/core';
33
import * as eks from '../lib';
44

packages/@aws-cdk/aws-eks/test/integ.eks-cluster-private-endpoint.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// !cdk-integ pragma:ignore-assets pragma:disable-update-workflow
1+
/// !cdk-integ pragma:disable-update-workflow
22
import * as ec2 from '@aws-cdk/aws-ec2';
33
import * as iam from '@aws-cdk/aws-iam';
44
import { App, Stack } from '@aws-cdk/core';

packages/@aws-cdk/aws-eks/test/integ.eks-cluster.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// !cdk-integ pragma:ignore-assets pragma:disable-update-workflow
1+
/// !cdk-integ pragma:disable-update-workflow
22
import * as path from 'path';
33
import * as ec2 from '@aws-cdk/aws-ec2';
44
import * as iam from '@aws-cdk/aws-iam';

packages/@aws-cdk/aws-eks/test/integ.eks-inference.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// !cdk-integ pragma:ignore-assets pragma:disable-update-workflow
1+
/// !cdk-integ pragma:disable-update-workflow
22
import * as ec2 from '@aws-cdk/aws-ec2';
33
import { App, Stack } from '@aws-cdk/core';
44
import * as eks from '../lib';

packages/@aws-cdk/aws-eks/test/integ.eks-oidc-provider.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import { App, Stack } from '@aws-cdk/core';
32
import * as eks from '../lib';
43

packages/@aws-cdk/aws-eks/test/integ.fargate-cluster.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// !cdk-integ pragma:ignore-assets pragma:disable-update-workflow
1+
/// !cdk-integ pragma:disable-update-workflow
22
import { App, Stack } from '@aws-cdk/core';
33
import * as eks from '../lib';
44

packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch.custom-kms-key.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import { EbsDeviceVolumeType } from '@aws-cdk/aws-ec2';
32
import * as iam from '@aws-cdk/aws-iam';
43
import * as kms from '@aws-cdk/aws-kms';

packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import { EbsDeviceVolumeType } from '@aws-cdk/aws-ec2';
32
import * as iam from '@aws-cdk/aws-iam';
43
import { App, RemovalPolicy, Stack, StackProps } from '@aws-cdk/core';

packages/@aws-cdk/aws-elasticsearch/test/integ.elasticsearch.unsignedbasicauth.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import { App, RemovalPolicy, Stack, StackProps } from '@aws-cdk/core';
32
import { Construct } from 'constructs';
43
import * as es from '../lib';

packages/@aws-cdk/aws-events-targets/test/aws-api/integ.aws-api.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import * as events from '@aws-cdk/aws-events';
32
import * as cdk from '@aws-cdk/core';
43
import * as targets from '../../lib';

packages/@aws-cdk/aws-events-targets/test/event-bus/integ.event-bus.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import * as events from '@aws-cdk/aws-events';
32
import * as sqs from '@aws-cdk/aws-sqs';
43
import * as cdk from '@aws-cdk/core';

packages/@aws-cdk/aws-events-targets/test/logs/integ.log-group.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import * as events from '@aws-cdk/aws-events';
32
import * as logs from '@aws-cdk/aws-logs';
43
import * as sqs from '@aws-cdk/aws-sqs';
@@ -86,4 +85,3 @@ logEvents.node.addDependency(putEvent);
8685
logEvents.assertAtPath('events.0.message', ExpectedResult.stringLikeRegexp(expectedValue));
8786

8887
app.synth();
89-

packages/@aws-cdk/aws-globalaccelerator-endpoints/test/integ.globalaccelerator.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// !cdk-integ pragma:ignore-assets
21
import * as ec2 from '@aws-cdk/aws-ec2';
32
import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2';
43
import * as ga from '@aws-cdk/aws-globalaccelerator';

packages/@aws-cdk/aws-glue/README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ new glue.Job(this, 'PythonSparkStreamingJob', {
7272
### Python Shell Jobs
7373

7474
A Python shell job runs Python scripts as a shell and supports a Python version that depends on the AWS Glue version you are using.
75-
This can be used to schedule and run tasks that don't require an Apache Spark environment.
75+
This can be used to schedule and run tasks that don't require an Apache Spark environment. Currently, three flavors are supported:
76+
77+
* PythonVersion.TWO (2.7; EOL)
78+
* PythonVersion.THREE (3.6)
79+
* PythonVersion.THREE_NINE (3.9)
7680

7781
```ts
7882
declare const bucket: s3.Bucket;

packages/@aws-cdk/aws-glue/lib/job-executable.ts

+8
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ export enum PythonVersion {
7575
* Python 3 (the exact version depends on GlueVersion and JobCommand used)
7676
*/
7777
THREE = '3',
78+
79+
/**
80+
* Python 3.9 (the exact version depends on GlueVersion and JobCommand used)
81+
*/
82+
THREE_NINE = '3.9',
7883
}
7984

8085
/**
@@ -300,6 +305,9 @@ export class JobExecutable {
300305
if (JobLanguage.PYTHON !== config.language && config.extraPythonFiles) {
301306
throw new Error('extraPythonFiles is not supported for languages other than JobLanguage.PYTHON');
302307
}
308+
if (config.pythonVersion === PythonVersion.THREE_NINE && config.type !== JobType.PYTHON_SHELL) {
309+
throw new Error('Specified PythonVersion PythonVersion.THREE_NINE is only supported for JobType Python Shell');
310+
}
303311
this.config = config;
304312
}
305313

packages/@aws-cdk/aws-glue/test/integ.job.ts

+16
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,20 @@ new glue.Job(stack, 'ShellJob', {
8686
},
8787
});
8888

89+
new glue.Job(stack, 'ShellJob39', {
90+
jobName: 'ShellJob39',
91+
executable: glue.JobExecutable.pythonShell({
92+
glueVersion: glue.GlueVersion.V1_0,
93+
pythonVersion: glue.PythonVersion.THREE_NINE,
94+
script,
95+
}),
96+
defaultArguments: {
97+
arg1: 'value1',
98+
arg2: 'value2',
99+
},
100+
tags: {
101+
key: 'value',
102+
},
103+
});
104+
89105
app.synth();

packages/@aws-cdk/aws-glue/test/job-executable.test.ts

+28
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ describe('GlueVersion', () => {
1414
test('of(customVersion) should set the name correctly', () => expect(glue.GlueVersion.of('CustomVersion').name).toEqual('CustomVersion'));
1515
});
1616

17+
describe('PythonVersion', () => {
18+
test('.TWO should set the name correctly', () => expect(glue.PythonVersion.TWO).toEqual('2'));
19+
20+
test('.THREE should set the name correctly', () => expect(glue.PythonVersion.THREE).toEqual('3'));
21+
22+
test('.THREE_NINE should set the name correctly', () => expect(glue.PythonVersion.THREE_NINE).toEqual('3.9'));
23+
});
24+
1725
describe('JobType', () => {
1826
test('.ETL should set the name correctly', () => expect(glue.JobType.ETL.name).toEqual('glueetl'));
1927

@@ -102,5 +110,25 @@ describe('JobExecutable', () => {
102110
})).toThrow(`Specified GlueVersion ${glueVersion.name} does not support PythonVersion 2`);
103111
});
104112
});
113+
114+
test('with PythonVersion set to PythonVersion.THREE_NINE and JobType not pythonshell should throw', () => {
115+
expect(() => glue.JobExecutable.of({
116+
type: glue.JobType.ETL,
117+
language: glue.JobLanguage.PYTHON,
118+
pythonVersion: glue.PythonVersion.THREE_NINE,
119+
script,
120+
glueVersion: glue.GlueVersion.V1_0,
121+
})).toThrow('Specified PythonVersion PythonVersion.THREE_NINE is only supported for JobType Python Shell');
122+
});
123+
124+
test('with PythonVersion PythonVersion.THREE_NINE and JobType pythonshell should succeed', () => {
125+
expect(glue.JobExecutable.of({
126+
type: glue.JobType.PYTHON_SHELL,
127+
glueVersion: glue.GlueVersion.V1_0,
128+
language: glue.JobLanguage.PYTHON,
129+
pythonVersion: glue.PythonVersion.THREE_NINE,
130+
script,
131+
})).toBeDefined();
132+
});
105133
});
106134
});

packages/@aws-cdk/aws-glue/test/job.integ.snapshot/aws-glue-job.assets.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "17.0.0",
2+
"version": "20.0.0",
33
"files": {
44
"432033e3218068a915d2532fa9be7858a12b228a2ae6e5c10faccd9097b1e855": {
55
"source": {
@@ -14,15 +14,15 @@
1414
}
1515
}
1616
},
17-
"9621659bccc489f1130729575d70f1c13a90dc7584eac90773642d7ad0cc1914": {
17+
"a44de72f7ea39efc17f8c7abc7e0c595ae4651b3e239851c49461fecf09bb151": {
1818
"source": {
1919
"path": "aws-glue-job.template.json",
2020
"packaging": "file"
2121
},
2222
"destinations": {
2323
"current_account-current_region": {
2424
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
25-
"objectKey": "9621659bccc489f1130729575d70f1c13a90dc7584eac90773642d7ad0cc1914.json",
25+
"objectKey": "a44de72f7ea39efc17f8c7abc7e0c595ae4651b3e239851c49461fecf09bb151.json",
2626
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
2727
}
2828
}

0 commit comments

Comments
 (0)