Open emenendez opened 4 years ago
Hii @emenendez , thanks for pointing this out, I think this requires a little bit of change ahead in hack
scripts. We shall fix it in the future, but these violation lines can be ignored for now.
Thanks so much! Unfortunately, I think the warnings are preventing the code generation from continuing as the generated code is not updated. Is there a way to get openapi-gen to ignore these warnings?
On Fri, Mar 27, 2020, 1:48 AM Hardik Dodiya notifications@github.com wrote:
Hii @emenendez https://github.com/emenendez , thanks for pointing this out, I think this requires a little bit of change ahead in hack scripts. We shall fix it in the future, but these violation lines can be ignored for now.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gardener/machine-controller-manager/issues/439#issuecomment-604861453, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5DFYW56WKACNDSKKMIZADRJRK3NANCNFSM4LTXSOIA .
I think while adding the provider, the generated code at prior places[eg. informers, listers] is sufficient, you can ignore the generation at the last step.
/priority critical
/priority normal
/priority critical
@yuzp1996 Command /add
is not available to you but only to a Maintainer, Member, Author.
Hi @yuzp1996 , are you facing any specific issue wrt this one?
If you are trying to generate the clients/APIs, you can simply run ./hack/generate-code
, the script should still work as expected, and these warnings can be ignored for now.
What happened:
While attempting to add a new provider type, following step 4 at https://github.com/gardener/machine-controller-manager/blob/master/docs/development/new_cp_support.md, I ran
./hack/generate-code
, but the script generated a number of "API rule violation" error messages and didn't update the code inpkg/openapi
.These error messages appear to be related to new linting added in kube-openapi, but I can't seem to figure out how to revert it to an earlier working version or disable these lints. There are errors for not just the code in this package (that's easy enough to update) but in dependent packages as well:
What you expected to happen:
The code in
pkg/openapi
should be updated.How to reproduce it (as minimally and precisely as possible):
git clone https://github.com/gardener/machine-controller-manager.git
cd machine-controller-manager
export GOPATH=<path to go installation>
git checkout v0.26.3
./hack/generate-code
Anything else we need to know:
Thanks so much for your help -- really appreciate it!
Environment:
Mac OS X, go 1.14
Note
This is how k8s solves it https://github.com/kubernetes/kubernetes/blob/6ad8c5c5963cf617d743a701f575bb97fb1a60b6/build/root/Makefile.generated_files#L440-L455