Skip to content

Commit

Permalink
Add check to not update locations if nothing changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Guido van der Hart committed Aug 23, 2024
1 parent 874abea commit 92a2bff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
12 changes: 6 additions & 6 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ack_generate_info:
build_date: "2024-07-23T12:21:24Z"
build_hash: 14cef51778d471698018b6c38b604181a6948248
go_version: go1.22.1
version: v0.34.0
api_directory_checksum: 8086a888d9ac00c5b0269cfdfc126d955bb831d6
build_date: "2024-08-23T13:01:30Z"
build_hash: c30e0689877bfe2083e7b2f84e1c450d2ba9bf2e
go_version: go1.22.4
version: v0.38.0-2-gc30e068
api_directory_checksum: fcc2a039096955dfeb2eb1dbd94def23713aeb03
api_version: v1alpha1
aws_sdk_go_version: v1.49.0
generator_config_info:
file_checksum: a841c574fab5ddf8a35ade3ba90e7f6713255d7e
file_checksum: aaca78853a15611ad9b6b6abec9a4e8989b103a9
original_file_name: generator.yaml
last_modification:
reason: API generation
5 changes: 5 additions & 0 deletions pkg/resource/cidr_collection/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ func (rm *resourceManager) customUpdateCidrCollection(
}
oldLocations := rm.oldLocations(latest)

// Do not update Locations if nothing changed
if reflect.DeepEqual(newLocations, oldLocations) {
return &resource{ko}, nil
}

// First remove old Locations as there is no api call for updating cidr Collection locations
if oldLocations != nil {
input.SetChanges(oldLocations)
Expand Down

0 comments on commit 92a2bff

Please sign in to comment.