Skip to content

Commit 92cf8c4

Browse files
authored
Patch boto process to cover shap mismatch boto to schema (#4275)
1 parent 5999083 commit 92cf8c4

File tree

13 files changed

+63
-54
lines changed

13 files changed

+63
-54
lines changed

scripts/boto/update_schemas_from_boto.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,16 @@ def build_resource_type_patches(
8383
with open(os.path.join(boto_path, *service_path), "r") as f:
8484
boto_d = json.load(f)
8585
shape_type = boto_d.get("shapes", {}).get(patch.shape, {}).get("type")
86+
8687
for field in ["enum", "pattern", "max", "min"]:
8788
value = boto_d.get("shapes", {}).get(patch.shape, {}).get(field)
8889
if not value:
8990
continue
9091
if field in ["enum", "pattern"]:
91-
if any(f in schema_data for f in ["enum", "pattern"]):
92+
if any(
93+
f in schema_data
94+
for f in ["enum", "pattern", "properties", "items"]
95+
):
9296
continue
9397
elif field == "max":
9498
if any(

src/cfnlint/data/schemas/patches/extensions/all/aws_billingconductor_customlineitem/boto.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,15 @@
33
"op": "add",
44
"path": "/properties/Description/minLength",
55
"value": 1
6+
},
7+
{
8+
"op": "add",
9+
"path": "/properties/PresentationDetails/properties/Service/maxLength",
10+
"value": 128
11+
},
12+
{
13+
"op": "add",
14+
"path": "/properties/PresentationDetails/properties/Service/minLength",
15+
"value": 1
616
}
717
]

src/cfnlint/data/schemas/patches/extensions/all/aws_ec2_capacityreservation/boto.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@
8181
"ipam",
8282
"ipam-external-resource-verification-token",
8383
"ipam-pool",
84+
"ipam-prefix-list-resolver",
85+
"ipam-prefix-list-resolver-target",
8486
"ipam-resource-discovery",
8587
"ipam-resource-discovery-association",
8688
"ipam-scope",

src/cfnlint/data/schemas/patches/extensions/all/aws_ec2_capacityreservationfleet/boto.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,8 @@
11351135
"ipam",
11361136
"ipam-external-resource-verification-token",
11371137
"ipam-pool",
1138+
"ipam-prefix-list-resolver",
1139+
"ipam-prefix-list-resolver-target",
11381140
"ipam-resource-discovery",
11391141
"ipam-resource-discovery-association",
11401142
"ipam-scope",

src/cfnlint/data/schemas/patches/extensions/all/aws_ec2_launchtemplate/boto.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@
8888
"ipam",
8989
"ipam-external-resource-verification-token",
9090
"ipam-pool",
91+
"ipam-prefix-list-resolver",
92+
"ipam-prefix-list-resolver-target",
9193
"ipam-resource-discovery",
9294
"ipam-resource-discovery-association",
9395
"ipam-scope",
@@ -1487,6 +1489,8 @@
14871489
"ipam",
14881490
"ipam-external-resource-verification-token",
14891491
"ipam-pool",
1492+
"ipam-prefix-list-resolver",
1493+
"ipam-prefix-list-resolver-target",
14901494
"ipam-resource-discovery",
14911495
"ipam-resource-discovery-association",
14921496
"ipam-scope",
Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
11
[
22
{
33
"op": "add",
4-
"path": "/properties/ContactPostPassDurationSeconds/maximum",
5-
"value": 480
4+
"path": "/definitions/DataflowEndpoint/properties/Mtu/maximum",
5+
"value": 1500
66
},
77
{
88
"op": "add",
9-
"path": "/properties/ContactPostPassDurationSeconds/minimum",
10-
"value": 120
9+
"path": "/definitions/DataflowEndpoint/properties/Mtu/minimum",
10+
"value": 1400
1111
},
1212
{
1313
"op": "add",
14-
"path": "/properties/ContactPrePassDurationSeconds/maximum",
15-
"value": 480
14+
"path": "/definitions/RangedSocketAddress/properties/Name/pattern",
15+
"value": "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"
1616
},
1717
{
1818
"op": "add",
19-
"path": "/properties/ContactPrePassDurationSeconds/minimum",
20-
"value": 120
19+
"path": "/definitions/RangedSocketAddress/properties/Name/maxLength",
20+
"value": 16
21+
},
22+
{
23+
"op": "add",
24+
"path": "/definitions/RangedSocketAddress/properties/Name/minLength",
25+
"value": 7
2126
},
2227
{
2328
"op": "add",
@@ -31,32 +36,27 @@
3136
},
3237
{
3338
"op": "add",
34-
"path": "/definitions/RangedSocketAddress/properties/Name/pattern",
35-
"value": "^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$"
36-
},
37-
{
38-
"op": "add",
39-
"path": "/definitions/RangedSocketAddress/properties/Name/maxLength",
40-
"value": 16
39+
"path": "/properties/EndpointDetails/maxItems",
40+
"value": 500
4141
},
4242
{
4343
"op": "add",
44-
"path": "/definitions/RangedSocketAddress/properties/Name/minLength",
45-
"value": 7
44+
"path": "/properties/ContactPrePassDurationSeconds/maximum",
45+
"value": 480
4646
},
4747
{
4848
"op": "add",
49-
"path": "/definitions/DataflowEndpoint/properties/Mtu/maximum",
50-
"value": 1500
49+
"path": "/properties/ContactPrePassDurationSeconds/minimum",
50+
"value": 120
5151
},
5252
{
5353
"op": "add",
54-
"path": "/definitions/DataflowEndpoint/properties/Mtu/minimum",
55-
"value": 1400
54+
"path": "/properties/ContactPostPassDurationSeconds/maximum",
55+
"value": 480
5656
},
5757
{
5858
"op": "add",
59-
"path": "/properties/EndpointDetails/maxItems",
60-
"value": 500
59+
"path": "/properties/ContactPostPassDurationSeconds/minimum",
60+
"value": 120
6161
}
6262
]

src/cfnlint/data/schemas/patches/extensions/all/aws_groundstation_missionprofile/boto.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
[
2+
{
3+
"op": "add",
4+
"path": "/properties/ContactPrePassDurationSeconds/maximum",
5+
"value": 21600
6+
},
27
{
38
"op": "add",
49
"path": "/properties/ContactPostPassDurationSeconds/maximum",
510
"value": 21600
611
},
712
{
813
"op": "add",
9-
"path": "/properties/ContactPrePassDurationSeconds/maximum",
14+
"path": "/properties/MinimumViableContactDurationSeconds/maximum",
1015
"value": 21600
1116
},
17+
{
18+
"op": "add",
19+
"path": "/properties/MinimumViableContactDurationSeconds/minimum",
20+
"value": 1
21+
},
1222
{
1323
"op": "add",
1424
"path": "/definitions/DataflowEdge/maxItems",
@@ -26,13 +36,13 @@
2636
},
2737
{
2838
"op": "add",
29-
"path": "/properties/MinimumViableContactDurationSeconds/maximum",
30-
"value": 21600
39+
"path": "/properties/TrackingConfigArn/maxLength",
40+
"value": 424
3141
},
3242
{
3343
"op": "add",
34-
"path": "/properties/MinimumViableContactDurationSeconds/minimum",
35-
"value": 1
44+
"path": "/properties/TrackingConfigArn/minLength",
45+
"value": 82
3646
},
3747
{
3848
"op": "add",
@@ -53,15 +63,5 @@
5363
"op": "add",
5464
"path": "/definitions/StreamsKmsKey/properties/KmsAliasName/minLength",
5565
"value": 1
56-
},
57-
{
58-
"op": "add",
59-
"path": "/properties/TrackingConfigArn/maxLength",
60-
"value": 424
61-
},
62-
{
63-
"op": "add",
64-
"path": "/properties/TrackingConfigArn/minLength",
65-
"value": 82
6666
}
6767
]

src/cfnlint/data/schemas/patches/extensions/all/aws_lambda_function/boto.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"java11",
2424
"java17",
2525
"java21",
26+
"java25",
2627
"java8",
2728
"java8.al2",
2829
"nodejs",
@@ -46,6 +47,7 @@
4647
"python3.11",
4748
"python3.12",
4849
"python3.13",
50+
"python3.14",
4951
"python3.6",
5052
"python3.7",
5153
"python3.8",

src/cfnlint/data/schemas/patches/extensions/all/aws_resourcegroups_group/boto.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@
2424
"path": "/definitions/ResourceQuery/properties/Type/minLength",
2525
"value": 1
2626
},
27-
{
28-
"op": "add",
29-
"path": "/definitions/Query/pattern",
30-
"value": "[\\s\\S]*"
31-
},
3227
{
3328
"op": "add",
3429
"path": "/definitions/Query/maxLength",

src/cfnlint/data/schemas/patches/extensions/all/aws_s3vectors_index/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)