community
community copied to clipboard
Refactor `ackgenconfig` into 2 categories: Generate & API Inference
Summary
ackgenconfig
is used and implemented in a variety of ways throughout the code-generator codebase. Due to this dispersion and inconsistency, it is becoming increasingly difficult to navigate and contribute to code-generator. The updated encapsulations as a result of splitting ackgenconfig
into 2 categories will result in a cleaner, more intuitive codebase to alleviate these concerns.
Context
This is the parent issue to track and implement changes to categorize ackgenconfig. The proposal detailing the approach can be found here.
Implementation
- [x] Move
pkg/generate/config/config.go
topkg/config/config.go
- [x] Migrate
pkg/generate/config
access topkg/config
package - [x] Align naming and return types for APIs in
pkg/config
package - [ ] Split
pkg/config/config.go
intopkg/config/generate.go
andpkg/config/inference.go
@brycahta spot on. let's do this!
Initial Research on Config Cats 🐱
Inference/How to create CRD
- GetAllRenames()
- GetAPIVersions()
- OperationIsIgnored()
- GetResourcePrintOrderByName()
- GetResourceShortNames()
- GetResourceFieldByPath()
- ResourceIsIgnored()
Generate/How to generate Go code
- GetTerminalExceptionCodes()
- ListOpMatchFieldNames()
- GetOverrideValues()
- GetCustomCheckRequiredFieldsMissingMethod()
- GetCustomImplementation()
- GetSetOutputCustomMethodName()
- GetOutputWrapperFieldPath()
- GetCustomUpdateMethodName()
- GetReconcileRequeueOnSuccessSeconds()
- ResourceDisplaysAgeColumn()
- GetUpdateConditionsCustomMethodName()
- GetCompareIgnoredFields()
- GetResourceConfig()
- ResourceSetsSingleAttribute()
- ResourceDisplaysAgeColumn()
- ResourceContainsAttributesMap()
- ResourceIsAdoptable()
- GetCustomListFieldMembers()
Both/Not a clear category
- GetOperationConfig()
- GetResourceFieldName()
- GetResourceFields()
Discussed with @jaypipes offline and putting the "splitting into categories" task on hold for now. After working on some of the code, I'm not convinced this abstraction makes the code any cleaner or more intuitive. I'll pivot to refactoring generate
package and note any patterns with config use/access to see if a better pattern arises.
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
/lifecycle frozen