Skip to content

Commit

Permalink
feat(batch): Stabilize Batch (#27059)
Browse files Browse the repository at this point in the history
graduates the alpha module.

All users of any `ManagedComputeEnvironment` who left `updateToLatestImageVersion` unspecified will see it default to `undefined` instead of `true`. *If you use `FargateComputeEnvironment`, this upgrade may cause deployment errors; destroy the Fargate CE and recreate it to resolve this, if encountered.* 


Related: #27054.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
comcalvi authored Sep 9, 2023
1 parent c3a4b7b commit 5fc707a
Show file tree
Hide file tree
Showing 156 changed files with 1,660 additions and 4,739 deletions.
1 change: 0 additions & 1 deletion packages/@aws-cdk-testing/framework-integ/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/aws-batch-alpha": "0.0.0",
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^0.0.0",
"@aws-cdk/pkglint": "0.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "32.0.0",
"version": "34.0.0",
"files": {
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
"source": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":"34.0.0"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "32.0.0",
"version": "34.0.0",
"testCases": {
"BatchUniqueNameTest/DefaultTest": {
"stacks": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "32.0.0",
"version": "34.0.0",
"artifacts": {
"stack.assets": {
"type": "cdk:asset-manifest",
Expand All @@ -17,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/dcf58b3d7fe509c8815682983476ddf759ae76a3c8a96611f347f5d93c687a68.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e2eaf0fb41de8615776ee9813c04181a22a8f86834fa954df1a3194806486725.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"version": "32.0.0",
"version": "34.0.0",
"files": {
"dcf58b3d7fe509c8815682983476ddf759ae76a3c8a96611f347f5d93c687a68": {
"e2eaf0fb41de8615776ee9813c04181a22a8f86834fa954df1a3194806486725": {
"source": {
"path": "stack.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "dcf58b3d7fe509c8815682983476ddf759ae76a3c8a96611f347f5d93c687a68.json",
"objectKey": "e2eaf0fb41de8615776ee9813c04181a22a8f86834fa954df1a3194806486725.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
"ComputeEnvironmentC570994D": {
"Type": "AWS::Batch::ComputeEnvironment",
"Properties": {
"Type": "unmanaged",
"ServiceRole": {
"Fn::GetAtt": [
"ComputeEnvironmentBatchServiceRole3533BE31",
"Arn"
]
},
"State": "ENABLED"
"State": "ENABLED",
"Type": "unmanaged"
}
},
"MyQueueE6CA6235": {
Expand Down Expand Up @@ -125,7 +125,6 @@
"MyJob8719E923": {
"Type": "AWS::Batch::JobDefinition",
"Properties": {
"Type": "container",
"ContainerProperties": {
"Environment": [],
"ExecutionRoleArn": {
Expand All @@ -151,7 +150,8 @@
"EC2"
],
"RetryStrategy": {},
"Timeout": {}
"Timeout": {},
"Type": "container"
}
},
"MyJobEventsRoleCF43C336": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@
"attributes": {
"aws:cdk:cloudformation:type": "AWS::Batch::ComputeEnvironment",
"aws:cdk:cloudformation:props": {
"type": "unmanaged",
"serviceRole": {
"Fn::GetAtt": [
"ComputeEnvironmentBatchServiceRole3533BE31",
"Arn"
]
},
"state": "ENABLED"
"state": "ENABLED",
"type": "unmanaged"
}
},
"constructInfo": {
Expand All @@ -92,7 +92,7 @@
}
},
"constructInfo": {
"fqn": "aws-cdk-lib.Resource",
"fqn": "aws-cdk-lib.aws_batch.UnmanagedComputeEnvironment",
"version": "0.0.0"
}
},
Expand Down Expand Up @@ -128,7 +128,7 @@
}
},
"constructInfo": {
"fqn": "aws-cdk-lib.Resource",
"fqn": "aws-cdk-lib.aws_batch.JobQueue",
"version": "0.0.0"
}
},
Expand Down Expand Up @@ -250,8 +250,8 @@
}
},
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.2.55"
"fqn": "aws-cdk-lib.aws_batch.EcsEc2ContainerDefinition",
"version": "0.0.0"
}
},
"MyJob": {
Expand All @@ -264,7 +264,6 @@
"attributes": {
"aws:cdk:cloudformation:type": "AWS::Batch::JobDefinition",
"aws:cdk:cloudformation:props": {
"type": "container",
"containerProperties": {
"image": "test-repo",
"environment": [],
Expand All @@ -290,7 +289,8 @@
"EC2"
],
"retryStrategy": {},
"timeout": {}
"timeout": {},
"type": "container"
}
},
"constructInfo": {
Expand Down Expand Up @@ -392,7 +392,7 @@
}
},
"constructInfo": {
"fqn": "aws-cdk-lib.Resource",
"fqn": "aws-cdk-lib.aws_batch.EcsJobDefinition",
"version": "0.0.0"
}
},
Expand Down Expand Up @@ -479,7 +479,7 @@
"path": "BatchUniqueNameTest/DefaultTest/Default",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.2.55"
"version": "10.2.70"
}
},
"DeployAssert": {
Expand Down Expand Up @@ -525,7 +525,7 @@
"path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.2.55"
"version": "10.2.70"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as integ from '@aws-cdk/integ-tests-alpha';
import { ContainerImage } from 'aws-cdk-lib/aws-ecs';
import { App, Size, Stack } from 'aws-cdk-lib';
import * as events from 'aws-cdk-lib/aws-events';
import * as targets from 'aws-cdk-lib/aws-events-targets';
import * as integ from '@aws-cdk/integ-tests-alpha';
import * as batch from '../lib';
import { App, Size, Stack } from 'aws-cdk-lib/core';
import * as batch from 'aws-cdk-lib/aws-batch';

const app = new App();
const stack = new Stack(app, 'stack');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import * as path from 'path';
import { Vpc } from 'aws-cdk-lib/aws-ec2';
import { DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';
import { ContainerImage, FargatePlatformVersion } from 'aws-cdk-lib/aws-ecs';
import * as efs from 'aws-cdk-lib/aws-efs';
import * as ecs from 'aws-cdk-lib/aws-ecs';
import * as efs from 'aws-cdk-lib/aws-efs';
import * as secretsmanager from 'aws-cdk-lib/aws-secretsmanager';
import * as ssm from 'aws-cdk-lib/aws-ssm';
import { App, Duration, Size, Stack } from 'aws-cdk-lib';
import * as integ from '@aws-cdk/integ-tests-alpha';
import * as batch from '../lib';
import { DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';
import * as path from 'path';
import * as secretsmanager from 'aws-cdk-lib/aws-secretsmanager';
import * as batch from 'aws-cdk-lib/aws-batch';

const app = new App();
const stack = new Stack(app, 'stack');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "33.0.0",
"version": "34.0.0",
"files": {
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
"source": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":"34.0.0"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "33.0.0",
"version": "34.0.0",
"testCases": {
"BatchEcsJobDefinitionTest/DefaultTest": {
"stacks": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "32.0.0",
"version": "34.0.0",
"artifacts": {
"stack.assets": {
"type": "cdk:asset-manifest",
Expand All @@ -17,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a8db080420a6ed60209e00bb93fe2579b81f60509f47e3a9723b2ba4b0c50b01.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d59d4c8d6a4337c0200d456ba8f39ddfcd76fe7ade6600d23e1687e6fab2980c.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"version": "33.0.0",
"version": "34.0.0",
"files": {
"0c8afaea64b37b6c143f96d8a69d57de3f487324a501b01a76df82b8f8bfee8d": {
"d59d4c8d6a4337c0200d456ba8f39ddfcd76fe7ade6600d23e1687e6fab2980c": {
"source": {
"path": "stack.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "0c8afaea64b37b6c143f96d8a69d57de3f487324a501b01a76df82b8f8bfee8d.json",
"objectKey": "d59d4c8d6a4337c0200d456ba8f39ddfcd76fe7ade6600d23e1687e6fab2980c.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"EksJobDefn6E91457D": {
"Type": "AWS::Batch::JobDefinition",
"Properties": {
"Type": "container",
"EksProperties": {
"PodProperties": {
"Containers": [
Expand Down Expand Up @@ -95,7 +94,8 @@
}
},
"RetryStrategy": {},
"Timeout": {}
"Timeout": {},
"Type": "container"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"id": "EksContainer",
"path": "stack/EksContainer",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.2.52"
"fqn": "aws-cdk-lib.aws_batch.EksContainerDefinition",
"version": "0.0.0"
}
},
"EksJobDefn": {
Expand All @@ -26,7 +26,6 @@
"attributes": {
"aws:cdk:cloudformation:type": "AWS::Batch::JobDefinition",
"aws:cdk:cloudformation:props": {
"type": "container",
"eksProperties": {
"podProperties": {
"containers": [
Expand Down Expand Up @@ -118,7 +117,8 @@
}
},
"retryStrategy": {},
"timeout": {}
"timeout": {},
"type": "container"
}
},
"constructInfo": {
Expand All @@ -128,7 +128,7 @@
}
},
"constructInfo": {
"fqn": "aws-cdk-lib.Resource",
"fqn": "aws-cdk-lib.aws_batch.EksJobDefinition",
"version": "0.0.0"
}
},
Expand Down Expand Up @@ -167,7 +167,7 @@
"path": "BatchEcsJobDefinitionTest/DefaultTest/Default",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.2.52"
"version": "10.2.70"
}
},
"DeployAssert": {
Expand Down Expand Up @@ -213,7 +213,7 @@
"path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.2.52"
"version": "10.2.70"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ContainerImage } from 'aws-cdk-lib/aws-ecs';
import { App, Stack, Size } from 'aws-cdk-lib';
import * as integ from '@aws-cdk/integ-tests-alpha';
import * as batch from '../lib';
import * as batch from 'aws-cdk-lib/aws-batch';

const app = new App();
const stack = new Stack(app, 'stack');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "32.0.0",
"version": "34.0.0",
"files": {
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
"source": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":"34.0.0"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "31.0.0",
"version": "34.0.0",
"testCases": {
"BatchEcsJobDefinitionTest/DefaultTest": {
"stacks": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "33.0.0",
"version": "34.0.0",
"artifacts": {
"stack.assets": {
"type": "cdk:asset-manifest",
Expand All @@ -17,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0c8afaea64b37b6c143f96d8a69d57de3f487324a501b01a76df82b8f8bfee8d.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4aa63dc2410e527912a2abc501a3d3eff66d21949c7a314e7818bb8eb4a2cc40.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down
Loading

0 comments on commit 5fc707a

Please sign in to comment.