-
Notifications
You must be signed in to change notification settings - Fork 306
Enhance AbstractKubernetes SendRequest extensibility #994
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
Conversation
|
|
|
Welcome @wimoy! |
|
/LGTM |
|
btw could you please add an example or document how to mock/test Kubernetes client? better to illustrate why the change is needed |
|
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 |
|
/approve Sorry I missed this PR... |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brendandburns, wimoy The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
We want to use a Polly to handle retries in the KubernetesClient send request code path. HttpRequestMessage and HttpContent objects can only be passed in once to an HttpClient.SendAsync call. On each retry, a new HttpRequestMessage needs to be constructed; the previous HttpRequestMessage cannot be reused. We want the send request extensibility point in KubernetesClient to provide the underlying data used to construct the HttpRequestMessage instead of providing the HttpRequestMessage itself.
This PR generalizes the existing send request extensibility without making the contract more complicated.