Skip to content

Commit 4cbb790

Browse files
authored
fix(batch): JobQueue uses wrong id for underlying CfnJobQueue (#25269)
Closes #25248. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent aee537a commit 4cbb790

File tree

31 files changed

+747
-675
lines changed

31 files changed

+747
-675
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/batch/integ.job-definition-events.js.snapshot/batch-events.assets.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"version": "31.0.0",
33
"files": {
4-
"0776292c0a44d9b0a502c6e8f5151f85ce0df1368d7a891bc5eb433c315e0c24": {
4+
"d7dcc67b92ba98cf8898af8fd31d31f46001867bc6458f3c816a77850e10a990": {
55
"source": {
66
"path": "batch-events.template.json",
77
"packaging": "file"
88
},
99
"destinations": {
1010
"current_account-current_region": {
1111
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12-
"objectKey": "0776292c0a44d9b0a502c6e8f5151f85ce0df1368d7a891bc5eb433c315e0c24.json",
12+
"objectKey": "d7dcc67b92ba98cf8898af8fd31d31f46001867bc6458f3c816a77850e10a990.json",
1313
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
1414
}
1515
}

packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/batch/integ.job-definition-events.js.snapshot/batch-events.template.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"State": "ENABLED"
4545
}
4646
},
47-
"MyQueue4F9177CF": {
47+
"MyQueueE6CA6235": {
4848
"Type": "AWS::Batch::JobQueue",
4949
"Properties": {
5050
"ComputeEnvironmentOrder": [
@@ -139,7 +139,7 @@
139139
"Resource": [
140140
{
141141
"Fn::GetAtt": [
142-
"MyQueue4F9177CF",
142+
"MyQueueE6CA6235",
143143
"JobQueueArn"
144144
]
145145
},
@@ -168,7 +168,7 @@
168168
{
169169
"Arn": {
170170
"Fn::GetAtt": [
171-
"MyQueue4F9177CF",
171+
"MyQueueE6CA6235",
172172
"JobQueueArn"
173173
]
174174
},
@@ -198,7 +198,7 @@
198198
{
199199
"Arn": {
200200
"Fn::GetAtt": [
201-
"MyQueue4F9177CF",
201+
"MyQueueE6CA6235",
202202
"JobQueueArn"
203203
]
204204
},

packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/batch/integ.job-definition-events.js.snapshot/manifest.json

+12-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"validateOnSynth": false,
1818
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
1919
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
20-
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0776292c0a44d9b0a502c6e8f5151f85ce0df1368d7a891bc5eb433c315e0c24.json",
20+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/d7dcc67b92ba98cf8898af8fd31d31f46001867bc6458f3c816a77850e10a990.json",
2121
"requiresBootstrapStackVersion": 6,
2222
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
2323
"additionalDependencies": [
@@ -45,10 +45,10 @@
4545
"data": "ComputeEnvironmentC570994D"
4646
}
4747
],
48-
"/batch-events/MyQueue/MyQueue": [
48+
"/batch-events/MyQueue/Resource": [
4949
{
5050
"type": "aws:cdk:logicalId",
51-
"data": "MyQueue4F9177CF"
51+
"data": "MyQueueE6CA6235"
5252
}
5353
],
5454
"/batch-events/container/ExecutionRole/Resource": [
@@ -110,6 +110,15 @@
110110
"type": "aws:cdk:logicalId",
111111
"data": "CheckBootstrapVersion"
112112
}
113+
],
114+
"MyQueue4F9177CF": [
115+
{
116+
"type": "aws:cdk:logicalId",
117+
"data": "MyQueue4F9177CF",
118+
"trace": [
119+
"!!DESTRUCTIVE_CHANGES: WILL_DESTROY"
120+
]
121+
}
113122
]
114123
},
115124
"displayName": "batch-events"

packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/batch/integ.job-definition-events.js.snapshot/tree.json

+58-58
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"id": "ImportBatchServiceRole",
2121
"path": "batch-events/ComputeEnvironment/BatchServiceRole/ImportBatchServiceRole",
2222
"constructInfo": {
23-
"fqn": "constructs.Construct",
24-
"version": "10.1.270"
23+
"fqn": "aws-cdk-lib.Resource",
24+
"version": "0.0.0"
2525
}
2626
},
2727
"Resource": {
@@ -59,14 +59,14 @@
5959
}
6060
},
6161
"constructInfo": {
62-
"fqn": "constructs.Construct",
63-
"version": "10.1.270"
62+
"fqn": "aws-cdk-lib.aws_iam.CfnRole",
63+
"version": "0.0.0"
6464
}
6565
}
6666
},
6767
"constructInfo": {
68-
"fqn": "constructs.Construct",
69-
"version": "10.1.270"
68+
"fqn": "aws-cdk-lib.aws_iam.Role",
69+
"version": "0.0.0"
7070
}
7171
},
7272
"Resource": {
@@ -86,8 +86,8 @@
8686
}
8787
},
8888
"constructInfo": {
89-
"fqn": "constructs.Construct",
90-
"version": "10.1.270"
89+
"fqn": "aws-cdk-lib.aws_batch.CfnComputeEnvironment",
90+
"version": "0.0.0"
9191
}
9292
}
9393
},
@@ -100,9 +100,9 @@
100100
"id": "MyQueue",
101101
"path": "batch-events/MyQueue",
102102
"children": {
103-
"MyQueue": {
104-
"id": "MyQueue",
105-
"path": "batch-events/MyQueue/MyQueue",
103+
"Resource": {
104+
"id": "Resource",
105+
"path": "batch-events/MyQueue/Resource",
106106
"attributes": {
107107
"aws:cdk:cloudformation:type": "AWS::Batch::JobQueue",
108108
"aws:cdk:cloudformation:props": {
@@ -122,8 +122,8 @@
122122
}
123123
},
124124
"constructInfo": {
125-
"fqn": "constructs.Construct",
126-
"version": "10.1.270"
125+
"fqn": "aws-cdk-lib.aws_batch.CfnJobQueue",
126+
"version": "0.0.0"
127127
}
128128
}
129129
},
@@ -144,8 +144,8 @@
144144
"id": "ImportExecutionRole",
145145
"path": "batch-events/container/ExecutionRole/ImportExecutionRole",
146146
"constructInfo": {
147-
"fqn": "constructs.Construct",
148-
"version": "10.1.270"
147+
"fqn": "aws-cdk-lib.Resource",
148+
"version": "0.0.0"
149149
}
150150
},
151151
"Resource": {
@@ -169,14 +169,14 @@
169169
}
170170
},
171171
"constructInfo": {
172-
"fqn": "constructs.Construct",
173-
"version": "10.1.270"
172+
"fqn": "aws-cdk-lib.aws_iam.CfnRole",
173+
"version": "0.0.0"
174174
}
175175
}
176176
},
177177
"constructInfo": {
178-
"fqn": "constructs.Construct",
179-
"version": "10.1.270"
178+
"fqn": "aws-cdk-lib.aws_iam.Role",
179+
"version": "0.0.0"
180180
}
181181
}
182182
},
@@ -225,8 +225,8 @@
225225
}
226226
},
227227
"constructInfo": {
228-
"fqn": "constructs.Construct",
229-
"version": "10.1.270"
228+
"fqn": "aws-cdk-lib.aws_batch.CfnJobDefinition",
229+
"version": "0.0.0"
230230
}
231231
},
232232
"EventsRole": {
@@ -237,8 +237,8 @@
237237
"id": "ImportEventsRole",
238238
"path": "batch-events/MyJob/EventsRole/ImportEventsRole",
239239
"constructInfo": {
240-
"fqn": "constructs.Construct",
241-
"version": "10.1.270"
240+
"fqn": "aws-cdk-lib.Resource",
241+
"version": "0.0.0"
242242
}
243243
},
244244
"Resource": {
@@ -262,8 +262,8 @@
262262
}
263263
},
264264
"constructInfo": {
265-
"fqn": "constructs.Construct",
266-
"version": "10.1.270"
265+
"fqn": "aws-cdk-lib.aws_iam.CfnRole",
266+
"version": "0.0.0"
267267
}
268268
},
269269
"DefaultPolicy": {
@@ -284,7 +284,7 @@
284284
"Resource": [
285285
{
286286
"Fn::GetAtt": [
287-
"MyQueue4F9177CF",
287+
"MyQueueE6CA6235",
288288
"JobQueueArn"
289289
]
290290
},
@@ -305,20 +305,20 @@
305305
}
306306
},
307307
"constructInfo": {
308-
"fqn": "constructs.Construct",
309-
"version": "10.1.270"
308+
"fqn": "aws-cdk-lib.aws_iam.CfnPolicy",
309+
"version": "0.0.0"
310310
}
311311
}
312312
},
313313
"constructInfo": {
314-
"fqn": "constructs.Construct",
315-
"version": "10.1.270"
314+
"fqn": "aws-cdk-lib.aws_iam.Policy",
315+
"version": "0.0.0"
316316
}
317317
}
318318
},
319319
"constructInfo": {
320-
"fqn": "constructs.Construct",
321-
"version": "10.1.270"
320+
"fqn": "aws-cdk-lib.aws_iam.Role",
321+
"version": "0.0.0"
322322
}
323323
}
324324
},
@@ -344,7 +344,7 @@
344344
"id": "Target0",
345345
"arn": {
346346
"Fn::GetAtt": [
347-
"MyQueue4F9177CF",
347+
"MyQueueE6CA6235",
348348
"JobQueueArn"
349349
]
350350
},
@@ -365,14 +365,14 @@
365365
}
366366
},
367367
"constructInfo": {
368-
"fqn": "constructs.Construct",
369-
"version": "10.1.270"
368+
"fqn": "aws-cdk-lib.aws_events.CfnRule",
369+
"version": "0.0.0"
370370
}
371371
}
372372
},
373373
"constructInfo": {
374-
"fqn": "constructs.Construct",
375-
"version": "10.1.270"
374+
"fqn": "aws-cdk-lib.aws_events.Rule",
375+
"version": "0.0.0"
376376
}
377377
},
378378
"Timer2": {
@@ -392,7 +392,7 @@
392392
"id": "Target0",
393393
"arn": {
394394
"Fn::GetAtt": [
395-
"MyQueue4F9177CF",
395+
"MyQueueE6CA6235",
396396
"JobQueueArn"
397397
]
398398
},
@@ -425,14 +425,14 @@
425425
}
426426
},
427427
"constructInfo": {
428-
"fqn": "constructs.Construct",
429-
"version": "10.1.270"
428+
"fqn": "aws-cdk-lib.aws_events.CfnRule",
429+
"version": "0.0.0"
430430
}
431431
}
432432
},
433433
"constructInfo": {
434-
"fqn": "constructs.Construct",
435-
"version": "10.1.270"
434+
"fqn": "aws-cdk-lib.aws_events.Rule",
435+
"version": "0.0.0"
436436
}
437437
},
438438
"Queue": {
@@ -447,8 +447,8 @@
447447
"aws:cdk:cloudformation:props": {}
448448
},
449449
"constructInfo": {
450-
"fqn": "constructs.Construct",
451-
"version": "10.1.270"
450+
"fqn": "aws-cdk-lib.aws_sqs.CfnQueue",
451+
"version": "0.0.0"
452452
}
453453
},
454454
"Policy": {
@@ -498,42 +498,42 @@
498498
}
499499
},
500500
"constructInfo": {
501-
"fqn": "constructs.Construct",
502-
"version": "10.1.270"
501+
"fqn": "aws-cdk-lib.aws_sqs.CfnQueuePolicy",
502+
"version": "0.0.0"
503503
}
504504
}
505505
},
506506
"constructInfo": {
507-
"fqn": "constructs.Construct",
508-
"version": "10.1.270"
507+
"fqn": "aws-cdk-lib.aws_sqs.QueuePolicy",
508+
"version": "0.0.0"
509509
}
510510
}
511511
},
512512
"constructInfo": {
513-
"fqn": "constructs.Construct",
514-
"version": "10.1.270"
513+
"fqn": "aws-cdk-lib.aws_sqs.Queue",
514+
"version": "0.0.0"
515515
}
516516
},
517517
"BootstrapVersion": {
518518
"id": "BootstrapVersion",
519519
"path": "batch-events/BootstrapVersion",
520520
"constructInfo": {
521-
"fqn": "constructs.Construct",
522-
"version": "10.1.270"
521+
"fqn": "aws-cdk-lib.CfnParameter",
522+
"version": "0.0.0"
523523
}
524524
},
525525
"CheckBootstrapVersion": {
526526
"id": "CheckBootstrapVersion",
527527
"path": "batch-events/CheckBootstrapVersion",
528528
"constructInfo": {
529-
"fqn": "constructs.Construct",
530-
"version": "10.1.270"
529+
"fqn": "aws-cdk-lib.CfnRule",
530+
"version": "0.0.0"
531531
}
532532
}
533533
},
534534
"constructInfo": {
535-
"fqn": "constructs.Construct",
536-
"version": "10.1.270"
535+
"fqn": "aws-cdk-lib.Stack",
536+
"version": "0.0.0"
537537
}
538538
},
539539
"Tree": {
@@ -546,8 +546,8 @@
546546
}
547547
},
548548
"constructInfo": {
549-
"fqn": "constructs.Construct",
550-
"version": "10.1.270"
549+
"fqn": "aws-cdk-lib.App",
550+
"version": "0.0.0"
551551
}
552552
}
553553
}

0 commit comments

Comments
 (0)