-
Notifications
You must be signed in to change notification settings - Fork 519
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
Request is fully deprecated as of February 11 2020. #414
Comments
This is generated by the open api code generator. Looks like we could switch to Axios. Is there a preference for a particular HTTP client library? |
Axios is pretty "big"... The "replacement" is https://github.com/mikeal/bent but I haven't tried it yet... |
Unfortunately to use an alternate library it needs to first be integrated into the code generator that we use: |
We could try fetch, but it's not node native, so we'd have to use the node-fetch package (not a blocker though) I will look into this. |
Switching to fetch is going to be broken until this issue is resolved somehow: OpenAPITools/openapi-generator#3694 The generator is going to generate a broken path. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Not sure what the movement is here, but can I suggest |
@jschluchter GOT looks nice but unfortunately doesn't have a openapi client generator. |
I am currently exploring how to resolve #165 it looks like the decision made here could impact that. To choose a library to make the HTTP calls we need to choose one of the following:
Ignoring the deprecated and experimental ones. Also ignoring the JavaScript ones as having the types for such a large API is certainly useful. I would say that
@chadbr what makes We'll rule out
With that in mind we have the following: Suitable CandiateWould be a good replacement, working for both front and backends.
May be SuitableSubject to questions raised.
Would work with compatibility changesWith further work for NodeJSThese libraries would need some additional work to make compatible with NodeJS.
With further work for BrowserThese libraries would need some additional work to make compatible with the browser.
Not suitable
This is based on my observations, I've tried to back up claims where possible. I'm happy to attempt the refactor but before going too far I'd like to be sure that we made the right decision. |
Wow thanks for the detailed write-up @d-cs Just to give my 2 cents on a preference basis. I prefer Regarding the browser support, I think they should be tackled separately but still taking into account this fact. |
@drubin not a problem 😄 , I don't want us to get weighed down with deciding which direction to go. I think it's important to get this fixed sooner rather than later. I agree with your comment about browser support, I was tinkering and found that a lot of features could be included for frontend using webpack. Another thought around |
Given the pervasive dependency on |
Hi guys, what is the state of this issue? Which library would be taken forward to work in browser environment? |
@alex-klimov there's no current implementation that works in the browser (nor any concrete plan to develop one) we're definitely open to it, but not currently under development. Accessing Kubernetes from the browser is a little weird anyway, since most clusters use custom certificate authorities, and you can't load a custom CA inside the browser. |
Thank you, Brendan for the update! Regarding authentication, yes, I have read through this issue, where it was discussed #165 I was researching what would be required to provide web dashboard with basic diagnostic/health investigations for vanilla Kubernetes clusters. My goal was to have as little moving parts as possible. And, yes, it looks like the proxy or bearer token authentication support enabled in the cluster would be a requirement to make that web dashboard to connect to the cluster. |
@d-cs thanks for the write-up above. Would you mind having another look at https://github.com/sindresorhus/got ? In our projects (TypeScript codebase, NodeJS runtime) we've been using the HTTP client https://github.com/sindresorhus/got for more than a year now, with good results. I selected it in particular for its timeout control, error handling, configurable retrying behavior. I would love to add to this discussion here that I hope that in the future this library is going to expose fine-grained timeout control for the underlying HTTP client and will also offer configurable retrying behavior for transient errors (such as for connect() timeouts or 5xx responses), also see #544. Hope that we all agree that this helps a lot towards building resilient systems. As a north star we may want to look at https://boto3.amazonaws.com/v1/documentation/api/latest/guide/retries.html for inspiration :-).
I asked for "Expose options for underlying http client" about a year ago: mikeal/bent#59 -- nothing moved, a no-go criterion I think. About Axios, it's worth pointing out that as of today it does still not support connect() timeout control: axios/axios#1739 -- a no-go IMO -- this library here should absolutely allow for configuring the connect() timeout separately from other timeouts. Huh. I feel like an evangelist trying to push for better error handling in the world of client libraries in the node/ts/js ecosystem. |
As per the generator docs, typescript-fetch should produce a node compatible version. |
@flyboarder it's not just about being node compatible. We need it to be API compatible. Meaning that any user of this API doesn't have to update their code. I don't believe that is the case with the fetch generator (though we could test and see) We could take a one-off breaking change, but this library has lots of users as far as I can tell from the npm stats and it seems pretty drastic to break them all. |
I think that a one off breaking change would be acceptable (especially since this package isn't even |
FYI, I have implemented an informer based on axios, if you want to try it out, feel free to do so. https://github.com/XiaocongDong/kubernetes-axios-informer. |
@gustaff-weldon It isn't introducing, this discussion is about removing that dependency. The best way forward would be to switch to a generator based on |
@Nokel81 what I mean is this client is a recommended kubernetes node client, and when installed it is introducing old This should have higher priority. |
@gustaff-weldon The only version of |
@ftqo Looks like it is me who's missing sth here. I just tried a clean project with just a kube-client and it is as you say: In our project, even after yarn dedupe it still resolves json-schema to old version. Which is unexpected. |
This looks to have been addressed with #812 so probably can be closed? |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
/lifecycle frozen |
is there a released version already replacing the request library? |
I'd love to understand the status of this library. Since it is rather official it discourages from creating alternative k8s clients, but to have it still be based on request after 3+ years makes me kind of lose hope. Is there still ongoing work to move to a version without this dependency? What are the roadblocks? Kubernetes is pushed by the largest companies in the industry and javascript/typescript is maybe the number 1 language in use today, still we have an official library dependent on a library (used for security-critical parts of the functionality) that has been unmaintained and deprecated for 3.5 years. |
Hello from the future! I would also like to know what's going on with this update. 1.0.x has been in RC status for nearly a year, and https://github.com/kubernetes-client/javascript/blob/master/FETCH_MIGRATION.md is now almost 2 years out of date. |
Hello, the update is still in progress and is happening in the We are moving pretty slow as we all mainly do it in our spare time. I would believe (but did not test it to be honest) that the release-1.x branch is able to work properly in a lot of scenarios and depending on what you want to achieve you could start using it. There is a release available on npm: https://www.npmjs.com/package/@kubernetes/client-node/v/1.0.0-rc4 Feel free to contribute to speed thing up. :) |
Has anybody done a write-up thus far describing the way this vulnerability interacts with the client itself? That is, does using this client meaningfully introduce an attack vector for the SSRF or is this more of a cosmetic introduction of a vulnerable dependency to the tree? |
Has anyone considered https://www.npmjs.com/package/@cypress/request as a replacement? We used it as a drop-in replacement for I'm not sure what the implications would be for this library, so just a suggestion. It would be nice to have this resolved :) Edit: if contributors are needed, I would be open to submitting the fix as well! |
As stated here request is fully deprecated. The reasons are described in this issue .
I think it is the time to choose an alternative, considering this kubernetes client is used on some production applications.
These are the current alternatives.
The text was updated successfully, but these errors were encountered: