Open brycahta opened 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
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
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: Closing this issue.
/lifecycle frozen
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
andcontroller
, constructsackmodel
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 addingackmodel
to the existing ACK cache and loading the model from cache (or create if not present) in both commands. This solution ensuresackmodel
is created once per pipeline (i.e. a given api version) and also removes the need to checkAPI 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
ackmodel
to expose fields for json serializationgetLatestAPIVersion()
. Add an optional cli input for both commands,apiVersion
, and use stable version as defaultloadModel
logic to loadackmodel
from cacheackmodel
or create its own using cli args (ex:apiVersion
) if not present