community
community copied to clipboard
Replace hard-coded use cases with templates in code-generator
Summary
Logic for ACK's use case is hard-coded in functions related to Go code generation. For example, ack prefix is used in late_initialize.go and ackerrors are used in set_resource.go. The solution is to abstract these hard-coded values into templates and expose them as new configs in ackgenconfig so users can input paths to their template files in generator.yaml
Context
The proposal detailing the approach can be found here.
Implementation
- [ ] Abstract hard-coded logic out of
late_initialize.gointo a template - [ ] Create a new
ackgenconfigso users can provide template in generator.yaml - [ ] Add relevant test(s) and test locally with a service controller using
late initializefeature - [ ] Repeat for remaining hard-coded areas: ACKResourceMetadata, ackerrors, crd.go.tpl
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
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle rotten
/lifecycle frozen