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
Running ./hack/update-openapi-spec.sh leaves api/openapi-spec/swagger.json file empty #96161
Comments
/sig api-machinery |
cc @knight42 |
@xing-yang Hi, thanks for the report, but it is a bit weird that I could not reproduce locally:
and besides, @liggitt Could you reproduce? |
@knight42 Someone else also ran into this same problem and asked a question on sig-api-machinery slack yesterday. So I'm not the only one who ran into this. |
@xing-yang could you change the args passed to curl in |
since it is already late here(UTC+8), I would check this issue again tomorrow 😴 |
@knight42 I was the "someone else" who ran into this problem :) I changed the script to use
Actually, it was 403 without the "S", too, but that is visible only if curl is executed in verbose mode. |
@janosi Hi, thanks for your information. Given that the apiserver returned 403, I suspect the flag
In addition, I think you could try changing the curl command in
and see if the problem is solved. |
@knight42 I tried the following and it worked for me. swagger.json is no longer empty.
curl version:
|
@xing-yang Thanks for your confirmation, and I have filed #96204 to address this issue. |
@knight42 I can confirm, it works with the changed curl command.
|
/triage accepted |
What happened:
After running ./hack/update-openapi-spec.sh with the latest code, api/openapi-spec/swagger.json file became empty even when no changes were made in the code.
What you expected to happen:
After running ./hack/update-openapi-spec.sh with the latest code, api/openapi-spec/swagger.json file should not be changed when no changes were made in the code.
When I tried the same thing a few week back, I didn't encounter this problem.
How to reproduce it (as minimally and precisely as possible):
Download the latest kubernetes/kubernetes code and run the following script to update openapi spec.
api/openapi-spec/swagger.json became empty after this.
Anything else we need to know?:
There's a line in update-openapi-spec.sh that runs a curl command
curl -w "\n" -kfs --oauth2-bearer dummy_token https://127.0.0.1:8050/openapi/v2
.This line was changed a few days ago by this commit: cfc2b33
PR: #95856
I checked out the commit before cfc2b33 and ran /update-openapi-spec.sh. It works. swagger.json is not empty any more.
Is there any new setting required before running ./hack/update-openapi-spec.sh now?
Environment:
kubectl version
):cat /etc/os-release
):uname -a
):The text was updated successfully, but these errors were encountered: