community icon indicating copy to clipboard operation
community copied to clipboard

ack-generate not working for GetAttributes based services

Open dlgordon opened this issue 2 years ago • 3 comments

Describe the bug The current (0.18.4) generator doesn't set CR fields for fields marked as is_attribute - this primarily concerns SQS and SNS which have a GetAttributes API call to retrieve the attributes of a Topic or a Queue. Note the discussion about this on https://github.com/aws-controllers-k8s/sqs-controller/pull/7/

Steps to reproduce

  • For an example, grab the current head of the SQS controller and the latest code-generator and run ack-generate
  • Note that the generated file pkg/resource/queue/sdk.go doesn't assign the attributes of the queue to the CR fields, which means that applying changes to the CRD object via kubectl doesn't propagate
  • To further confirm, create a Queue using the appropriate CR. Then update the resource. Note that the controller thinks the object is reconciled and thus doesn't update the actual Queue in AWS

Expected outcome

  • The appropriate CR fields are set so the reconciler works
  • When you push an updated Queue CR to K8s, the underlying resource is updated

dlgordon avatar May 13 '22 02:05 dlgordon

@dlgordon thanks for putting this issue together. I will work on this starting next week (just heading back from KubeCon today...)

jaypipes avatar May 21 '22 04:05 jaypipes

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close. Provide feedback via https://github.com/aws-controllers-k8s/community. /lifecycle stale

ack-bot avatar Aug 19 '22 05:08 ack-bot

/lifecycle frozen

a-hilaly avatar Aug 19 '22 12:08 a-hilaly

@jaypipes jsut curious what the status of this issue is. Looks like this is still a hard blocker for the SNS and SQS controller? Our team is adopting ACK as much as possible, would be cool to understand if there is a light at the end of the tunnel on SNS and SQS controller

TheRockyOng avatar Nov 02 '22 19:11 TheRockyOng

@dlgordon @TheRockyOng I have gotten the code-generator back in shape for SNS/SQS with these commits:

  • https://github.com/aws-controllers-k8s/code-generator/commit/39d7c30b8df3c44a9804f578cd6acc9a3f669b03
  • https://github.com/aws-controllers-k8s/code-generator/commit/e661ce95afc39b380653ca655503daebf1e1831b
  • https://github.com/aws-controllers-k8s/code-generator/commit/16f0e201b37a06b535370cc69e11adb934a22d33

So I think we can close this issue now.

SNS and SQS controllers have both been released in last couple weeks. I am continuing to work on update code paths for the attribute-based APIs.

jaypipes avatar Dec 27 '22 17:12 jaypipes

Nice one mate, hopefully have some time to look at these as well over the little holiday period.

hu-danielgo avatar Dec 27 '22 21:12 hu-danielgo

awesome news @jaypipes ! thanks for the great work

TheRockyOng avatar Dec 27 '22 21:12 TheRockyOng