Skip to content

Commit 3f66109

Browse files
authored
fix: ensure we check the latest resource for status (#35)
Issue [#2180](aws-controllers-k8s/community#2180) Description of changes: Currently we have been checking the desired status in post_set_output. At that point the desired resource will not have been updated with the latest Status from the describe output, leading the controller to be in an endless reconciliation loop By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 570bbaa commit 3f66109

File tree

7 files changed

+6
-27
lines changed

7 files changed

+6
-27
lines changed

apis/v1alpha1/ack-generate-metadata.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
ack_generate_info:
2-
build_date: "2025-03-27T16:36:00Z"
3-
build_hash: 980cb1e4734f673d16101cf55206b84ca639ec01
2+
build_date: "2025-04-11T22:07:51Z"
3+
build_hash: 0909e7f0adb8ffe4120a8c20d5d58b991f2539e9
44
go_version: go1.24.1
5-
version: v0.44.0
5+
version: v0.44.0-3-g0909e7f
66
api_directory_checksum: ebeb6f826282ad9134ca78efd74dc9125898fddf
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.32.6

apis/v1alpha1/generator.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ resources:
5858
code: customPreCompare(delta, a, b)
5959
sdk_update_post_request:
6060
code: return desired, nil
61-
sdk_create_post_set_output:
62-
template_path: hooks/file_system/sdk_create_post_set_output.go.tpl
6361
sdk_create_post_build_request:
6462
template_path: hooks/file_system/sdk_create_post_build_request.go.tpl
6563
sdk_read_many_post_set_output:

generator.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ resources:
5858
code: customPreCompare(delta, a, b)
5959
sdk_update_post_request:
6060
code: return desired, nil
61-
sdk_create_post_set_output:
62-
template_path: hooks/file_system/sdk_create_post_set_output.go.tpl
6361
sdk_create_post_build_request:
6462
template_path: hooks/file_system/sdk_create_post_build_request.go.tpl
6563
sdk_read_many_post_set_output:

pkg/resource/file_system/hooks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func filesystemActive(r *resource) bool {
8282
return false
8383
}
8484
cs := *r.ko.Status.LifeCycleState
85-
lifeCycleState := string(svcapitypes.LifeCycleState_available)
85+
lifeCycleState := string(svcsdktypes.LifeCycleStateAvailable)
8686
return cs == lifeCycleState
8787
}
8888

pkg/resource/file_system/sdk.go

Lines changed: 1 addition & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/hooks/file_system/sdk_create_post_set_output.go.tpl

Lines changed: 0 additions & 8 deletions
This file was deleted.

templates/hooks/file_system/sdk_read_many_post_set_output.go.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
return nil, err
33
}
44
if !filesystemActive(&resource{ko}) {
5-
return &resource{ko}, requeueWaitState(r)
5+
return &resource{ko}, requeueWaitState(&resource{ko})
66
}

0 commit comments

Comments
 (0)