-
Notifications
You must be signed in to change notification settings - Fork 532
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
not possible to set a client timeout #1613
Comments
/assign |
hmm, I'm having a bit of trouble with this issue, not because of the implementation, but because how the library's API is structured right now, the configuration object (where undoubtedly we would need to store the config value for the timeout) is built in this function, but we'd need to add a new parameter to tl;dr: in order to implement this feature, we'd need to change the signature of the |
I would say yes but it should definitely be an optional argument and probably an object so that it's easier to extend and adapt in the future. @brendanburns any concerns regarding this? |
I think it is totally fine to add an optional typed parameter to the |
After starting to work on this and looking a bit more into it, I've come to the conclusion that this can not be implemented right now 😕. All the code that handles the HTTP requests is generated with the library So 90% of the functionality for this feature needs to be done on the OpenAPI generator (and I'm assuming it'd need to be done across all the languages they support). |
@elizabeth-dev I did not look to deep into it, but I think this needs to be implemented in: https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/typescript (or |
I think that this is the place where you would want to add the timeout code: In general that project is pretty good about merging PRs for specific runtimes. As I splunked through the code though, I realized you can also make the change here: https://github.com/kubernetes-client/javascript/blob/release-1.x/src/config.ts#L470 And I'm pretty sure that it will work. That's the |
Has there been any progress on this issue? I'm encountering the following error: |
Describe the bug
At the moment, it seems not possible to set a client timeout since node-fetch requires passing an AbortController instance to the fetch request option's signal.
** Client Version **
1.0.0-rc3
To Reproduce
Expected behavior
It would be great to set a client's timeout when creating a k8sApi instance or invoking a request
The text was updated successfully, but these errors were encountered: