Skip to content

Commit 2d9f8d3

Browse files
author
Guido van der Hart
committed
Add check to not update locations if nothing changed
1 parent 8e13474 commit 2d9f8d3

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2024-08-29T17:03:54Z"
2+
build_date: "2024-09-10T12:17:23Z"
33
build_hash: f8f98563404066ac3340db0a049d2e530e5c51cc
4-
go_version: go1.22.5
4+
go_version: go1.23.1
55
version: v0.38.1
6-
api_directory_checksum: 78fb7fd24a85da24b8de6246cad67ff3fb6598f8
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)

pkg/resource/cidr_collection/manager_factory.go

+5-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)