-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support auto configuring code generators with meta code-generator cmd #14
Comments
Similar to my comment in #15, have you seen the code-generator scripts in the root of this repo, recently merged? These take care of running the generators for you and configuring them correctly: https://github.com/kubernetes/code-generator/blob/master/generate-groups.sh (great work with apiserver-builder by the way!) |
Thanks! @munnerz where does the script compile the code from? does it check it out? Also, the script does not seem to run a number of the code generators - openapi, protobuf, etc. Are these run by another script? |
The idea generally is to vendor the entire There isn't another script for those generators at the moment (or support for it in the existing one). That is definitely something to look into 😄 /cc @sttts |
I think there was previously discussion about making this into a golang app actually. It was decided to put it into a script for the time being (as opposed to an initial version of the PR which was a bash library) to make the transition to a full CLI tool easier. |
This is related to kubernetes/kubernetes#53524, maybe even is part of it. |
It's not complete, suitable for sample-apiserver mainly. And as written in kubernetes/kubernetes#53524 this is an intermediate step before we have a better solution, e.g. a golang based tool. |
@sttts Glad to hear it. Thanks for the context. I may have someone who can work on really building upon this to produce a consumer centric solution - including a golang script and all of the accoutrements (good built in help documentation w/ examples, error checking and messaging, packaging of artifacts, etc). If we put together a PR that took the existing script evolved it, would you be willing to find a reviewer? What would you like to see in terms of a design proposal? I have a number of items for polish / chrome we could apply to really make the the experience magical. Some examples:
|
@sttts Also, should I go ahead and close this and the other issue then, and put them under the issue you referenced? |
@pwittrock sounds really great! Reviewing shouldn't be a big problem. I am happy to support with that myself, and I am sure the other people working in this area will offer review time too. What I would like is a write-up of how this should look like, i.e. a proposal (in a GDoc first) with
I agree, let's switch over to the other issue. |
closed in favor of kubernetes/kubernetes#53524 |
User story: As a contributor, I would like to run the set of of supported code-generators against a project following the Kubernetes code structure and conventions without having to manually configure each of them and understand each of their specific semantics.
Background: The code-generator repo has a dozen different code generator commands. Each of the code generator commands takes a different set of flags derived from the directories present in the project. Configure each code generator for every new project or API extension should not be necessary. Instead, we should automatically configure each code generator based which directories are present.
Proof of concept implemented here
The text was updated successfully, but these errors were encountered: