-
Notifications
You must be signed in to change notification settings - Fork 667
Introduce package kube-types: add generators for OpenShift and KubeVirt TypeScript definitions #1813
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
Conversation
|
Hi @suomiy. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: suomiy The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed some package names from generated object names because the names would be too long (as discussed in #1773).
There are some conflicts between the different packages so I had to leave some in form of short prefixes.
Please give me some feedback what are your thoughts on this. And which packages should be namespaced and what prefixes to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also kubevirt and openshift have some conflicts between them, but I have not done anything about that because they live in separate folders and the user can import them separately.
|
/assign @alecmerdler |
|
/test e2e-aws-console-olm |
|
@alecmerdler can you please take a look? |
|
Things to consider:
|
|
/retest |
|
In general, I like the idea of having comprehensive & updated types. Thanks for working on that. My concerns are just related to maintainability.
Exactly. I think it's better to keep the generated files or source for their generation in the repo. And commit changes wisely. In addition, it must be straightforward to do a build in an offline environment (which is already resolved for npm).
IMO, this complexity out-weights benefits in the long-term.
I agree we do not need to care much about syntax in the generated code as long as the process for its creation is clear. |
|
@alecmerdler can we proceed with this now for 4.3 ? |
|
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
|
/lifecycle frozen |
|
@suomiy: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
@atiratree: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
stale |
This PR adds complete types with documentation for all Kubernetes/OpenShift/KubeVirt objects (please see old #1773 for more details).
The types are generated from OpenAPI specification taken from
This PR uses openapi-generator instead of autorest which was mentioned in the last PR.
I found many problems with autorest:
swagger.json.openapi-generatorworked quite well for me, but I still had to do few necessary changes in post processing phase.Algorithm:
ENVvariable)pathskey to inhibit API generation )openapi-generatorwhich should generate just the modelsIoK8sApiCoreV1SecretFromJSON)import { exists, mapValues } from '../runtime';) for these functions'./'to prevent circular dependenciesIoK8sApiCoreV1PodwithV1Pod@spadgett @alecmerdler @christianvogt @vojtechszocs