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
CoreV1API_readNamespacedPodLog doesn't work and contains a segfault #222
Comments
read pod logs is a non-restful compliant API, I suspect that we will need to write custom code to correctly handle it. |
It works after the code change. I'll submit a PR. I'm writing a c++ client that wraps this library: https://github.com/homer6/kubepp |
Unfortunately, that code is generated. If we want to make changes, we need to change the upstream generator (and validate that it doesn't break other API calls) cc @ityuhui |
Also, for your C++ client, I would also recommend you take a code generation approach, since it is basically impossible to keep up with the breadth of the Kubernetes API without code generation. |
That makes sense. However, I'm finding that a number of function calls are not working as expected. By implementing each call individually, I'm able to validate that the calls are working as expected. So far, I've only implemented a handful of methods and most of them have failed in different ways. Sorry for the poor feedback. I'm actually really excited to keep going with wrapping this library. |
As @brendandburns said, the code in this library is generated by openapi-generator/libcurl https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/C-libcurl Code changes you commit to this repository will be removed on the next generating. Feel free to submit your PR here and we can review the code changes and suggest changes to openapi-generator/libcurl. Don't wait for all changes to be done to submit your PR as your PR is just for review. Only 1 or 2 changes are OK. |
The text/plain header is being rejected:
Commenting out that header makes it work again. However, when it proceeds it'll segfault on the strdup line if there aren't any pod logs (null pointer).
I moved the strdup into the null pointer guard and it works now for pods both with and without logs.
The text was updated successfully, but these errors were encountered: