Skip to content

Commit 22fe3cc

Browse files
committed
Filter on ServiceID
- Add hook to fail fast if ServiceID not set - Add hook to include ServiceID as filter for ReadMany API request - undo code-gen change to fail matching criteria check for nil Status fields
1 parent 237e492 commit 22fe3cc

File tree

8 files changed

+42
-12
lines changed

8 files changed

+42
-12
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2025-07-22T22:13:44Z"
2+
build_date: "2025-07-24T18:21:24Z"
33
build_hash: b2dc0f44e0b08f041de14c3944a5cc005ba97c8f
44
go_version: go1.24.5
55
version: v0.50.0
66
api_directory_checksum: d162a6e9df2d4861d6c01d42047402b51f341293
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.32.6
99
generator_config_info:
10-
file_checksum: a3b7769e44651dbf7cdf955e76e47458b3436550
10+
file_checksum: c1b1b2a01e8d9f0971cc42f937b92fc9bb0d2987
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/generator.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,6 +1075,10 @@ resources:
10751075
template_path: hooks/vpc_endpoint_service_configuration/sdk_update_pre_build_request.go.tpl
10761076
sdk_read_many_post_set_output:
10771077
template_path: hooks/vpc_endpoint_service_configuration/sdk_read_many_post_set_output.go.tpl
1078+
sdk_read_many_pre_build_request:
1079+
template_path: hooks/vpc_endpoint_service_configuration/sdk_read_many_pre_build_request.go.tpl
1080+
sdk_read_many_post_build_request:
1081+
template_path: hooks/vpc_endpoint_service_configuration/sdk_read_many_post_build_request.go.tpl
10781082
VpcPeeringConnection:
10791083
fields:
10801084
VpcId:

generator.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,6 +1075,10 @@ resources:
10751075
template_path: hooks/vpc_endpoint_service_configuration/sdk_update_pre_build_request.go.tpl
10761076
sdk_read_many_post_set_output:
10771077
template_path: hooks/vpc_endpoint_service_configuration/sdk_read_many_post_set_output.go.tpl
1078+
sdk_read_many_pre_build_request:
1079+
template_path: hooks/vpc_endpoint_service_configuration/sdk_read_many_pre_build_request.go.tpl
1080+
sdk_read_many_post_build_request:
1081+
template_path: hooks/vpc_endpoint_service_configuration/sdk_read_many_post_build_request.go.tpl
10781082
VpcPeeringConnection:
10791083
fields:
10801084
VpcId:

pkg/resource/elastic_ip_address/sdk.go

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/resource/vpc_endpoint_service_configuration/sdk.go

Lines changed: 10 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if r.ko.Status.ServiceID != nil {
2+
input.ServiceIds = []string{*r.ko.Status.ServiceID}
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if r.ko.Status.ServiceID == nil {
2+
return nil, ackerr.NotFound
3+
}

test/e2e/tests/test_vpc_endpoint_service_configuration_adoption.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,27 +94,33 @@ def test_vpc_endpoint_service_configuration_adopt_update(self, ec2_client, vpc_e
9494
ec2_validator = EC2Validator(ec2_client)
9595
ec2_validator.assert_vpc_endpoint_service_configuration(resource_id)
9696

97-
endpoint_service_config = ec2_validator.get_vpc_endpoint_service_configuration(resource_id)
97+
updated_endpoint_service_config = ec2_validator.get_vpc_endpoint_service_configuration(resource_id)
9898

99-
actual_tags = endpoint_service_config['Tags']
99+
actual_tags = updated_endpoint_service_config['Tags']
100100
tags.assert_ack_system_tags(actual_tags)
101101

102102
name_tag = next((tag for tag in actual_tags if tag['Key'] == 'Name'), None)
103103
assert name_tag is not None
104104

105-
new_tag = {'Key': 'TestName', 'Value': 'test-value'}
105+
name_tag = {'key': 'Name', 'value': name_tag['Value']}
106+
new_tag = {'key': 'TestName', 'value': 'test-value'}
106107
updates = {
107108
"spec": {"tags": [name_tag, new_tag]}
108109
}
110+
109111
k8s.patch_custom_resource(ref, updates)
110112
time.sleep(MODIFY_WAIT_AFTER_SECONDS)
111113

112114
assert k8s.wait_on_condition(ref, "ACK.ResourceSynced", "True", wait_periods=5)
113115

114-
endpoint_service_config = ec2_validator.get_vpc_endpoint_service_configuration(resource_id)
116+
updated_endpoint_service_config = ec2_validator.get_vpc_endpoint_service_configuration(resource_id)
117+
assert updated_endpoint_service_config is not None
118+
assert 'Tags' in updated_endpoint_service_config
119+
120+
expected_tags = [{"Key": name_tag['key'], "Value": name_tag['value']}, {"Key": new_tag['key'], "Value": new_tag['value']}]
115121
tags.assert_equal_without_ack_tags(
116-
actual=endpoint_service_config['Tags'],
117-
expected=[name_tag, new_tag],
122+
actual=updated_endpoint_service_config['Tags'],
123+
expected=expected_tags,
118124
)
119125

120126

0 commit comments

Comments
 (0)