Skip to content

Commit 92a2bff

Browse files
author
Guido van der Hart
committed
Add check to not update locations if nothing changed
1 parent 874abea commit 92a2bff

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed
+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2024-07-23T12:21:24Z"
3-
build_hash: 14cef51778d471698018b6c38b604181a6948248
4-
go_version: go1.22.1
5-
version: v0.34.0
6-
api_directory_checksum: 8086a888d9ac00c5b0269cfdfc126d955bb831d6
2+
build_date: "2024-08-23T13:01:30Z"
3+
build_hash: c30e0689877bfe2083e7b2f84e1c450d2ba9bf2e
4+
go_version: go1.22.4
5+
version: v0.38.0-2-gc30e068
6+
api_directory_checksum: fcc2a039096955dfeb2eb1dbd94def23713aeb03
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.49.0
99
generator_config_info:
10-
file_checksum: a841c574fab5ddf8a35ade3ba90e7f6713255d7e
10+
file_checksum: aaca78853a15611ad9b6b6abec9a4e8989b103a9
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

pkg/resource/cidr_collection/hooks.go

+5
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ func (rm *resourceManager) customUpdateCidrCollection(
115115
}
116116
oldLocations := rm.oldLocations(latest)
117117

118+
// Do not update Locations if nothing changed
119+
if reflect.DeepEqual(newLocations, oldLocations) {
120+
return &resource{ko}, nil
121+
}
122+
118123
// First remove old Locations as there is no api call for updating cidr Collection locations
119124
if oldLocations != nil {
120125
input.SetChanges(oldLocations)

0 commit comments

Comments
 (0)