Enhance AbstractKubernetes SendRequest extensibility
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.
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: wimoy / name: William Moy (79bf45c489a93f8014efa64563d78d88416b9fcb)
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: wimoy
Once this PR has been reviewed and has the lgtm label, please assign tg123 for approval by writing /assign @tg123 in a comment. For more information see:The Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Welcome @wimoy!
It looks like this is your first PR to kubernetes-client/csharp 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.
You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.
You can also check if kubernetes-client/csharp has its own contribution guidelines.
You may want to refer to our testing guide if you run into trouble with your tests not passing.
If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!
Thank you, and welcome to Kubernetes. :smiley:
/LGTM
btw could you please add an example or document how to mock/test Kubernetes client?
better to illustrate why the change is needed and help others in similar situations
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:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale - Mark this issue or PR as rotten with
/lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
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
- ~~OWNERS~~ [brendandburns]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment