kubernetes-client / gen

Common generator scripts for all client libraries
Apache License 2.0
148 stars 148 forks source link

Fixes CRD preprocess aborting #163

Closed yue9944882 closed 4 years ago

yue9944882 commented 4 years ago

the preprocess script aborts when handling multiple CRDs w/ KUBERNETES_CRD_GROUP_PREFIX unset, this pull fixes the behavior.

Making model `v1beta1.FederatedDeployment` inline as object...
Making model `v1beta1.FederatedTypeConfig` inline as object...
Using built-in v1.ListMeta
Using built-in v1.ListMeta
Using built-in v1.ListMeta
    out_spec = process_swagger(in_spec, args.client_language, crd_mode)
  File "//preprocess_spec.py", line 178, in process_swagger
    clean_crd_meta(spec)
  File "//preprocess_spec.py", line 127, in clean_crd_meta
    v['properties']['metadata'].pop('properties')
  File "/usr/lib/python2.7/collections.py", line 160, in pop
    raise KeyError(key)
KeyError: 'properties'
yue9944882 commented 4 years ago

@brendandburns @aespinosa

aespinosa commented 4 years ago

lgtm. thanks for exposing that test case!

brendandburns commented 4 years ago

/lgtm /approve

k8s-ci-robot commented 4 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, yue9944882

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-client/gen/blob/master/OWNERS)~~ [brendandburns] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment