aws-controllers-k8s / community

AWS Controllers for Kubernetes (ACK) is a project enabling you to manage AWS services from Kubernetes
https://aws-controllers-k8s.github.io/community/
Apache License 2.0
2.44k stars 258 forks source link

Refactor to remove duplicate creation of `ackmodel` in pipeline #1209

Open brycahta opened 2 years ago

brycahta commented 2 years ago

Summary

The code-generator takes ackmodel as an input (i.e. CRDs), processes the data alongside config, and applies templates against the updated data to output Go code. Each command in the pipeline, api and controller, constructs ackmodel itself, which is inefficient and creates an implicit dependency on $SERVICE-controller (the repo for which we are generating code). These problems can be solved by adding ackmodel to the existing ACK cache and loading the model from cache (or create if not present) in both commands. This solution ensures ackmodel is created once per pipeline (i.e. a given api version) and also removes the need to check API version in the $SERVICE-controller repo.

Context

This is the parent issue to track and implement changes to refactor ackmodel in the code-generator pipeline. The proposal detailing the approach can be found here. Changes to how ackmodel is created are not in the scope of this issue.

Implementation

ack-bot commented 2 years ago

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 commented 2 years ago

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

ack-bot commented 2 years ago

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Provide feedback via https://github.com/aws-controllers-k8s/community. /close

ack-bot commented 2 years ago

@ack-bot: Closing this issue.

In response to [this](https://github.com/aws-controllers-k8s/community/issues/1209#issuecomment-1205885492): >Rotten issues close after 30d of inactivity. >Reopen the issue with `/reopen`. >Provide feedback via https://github.com/aws-controllers-k8s/community. >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
a-hilaly commented 2 years ago

/lifecycle frozen