csharp
csharp copied to clipboard
Some generated methods lacking ConfigureAwait(false)
Describe the bug
I was looking at something else and noticed some of the generated methods lack a ConfigureAwait(false) and do not dispose _result like the other methods do.
Here is the code I'm referring to: https://github.com/kubernetes-client/csharp/blob/3dae1cf299df50fb1c62f00b0f5fe04cc4856c41/src/LibKubernetesGenerator/templates/OperationsExtensions.cs.template#L91-L96
Is this by design, or should it have ConfigureAwait(false) and using var _result like the other operations?
Kubernetes C# SDK Client Version v13
Server Kubernetes Version n/a
Dotnet Runtime Version n/a
To Reproduce n/a
Expected behavior n/a
KubeConfig n/a
Where do you run your app with Kubernetes SDK (please complete the following information): n/a
Additional context n/a
good catch could you please send pr to fix
good catch could you please send pr to fix
Sure.
/assign
Looking into it a little more, I don't think these methods actually work, or don't work anymore if they did previously.
When I try to use ConnectGetNamespacedPodExecAsync, I get an HTTP 400 error with the message Upgrade request required.
So I'm guessing this is a bigger issue, that the client should support handling an upgrade request from the server, to switch to websockets (probably not worth worrying about SPDY at this point since it is being deprecated).
I see that there already is a client.WebSocketNamespacedPodExecAsync and it works, but it is not generated from the swagger. I don't know, maybe this is sufficient for the purposes of this client, but if that is the case, what, if anything should be done with the generated methods that don't work?
I'll take a look at it a little more when I get some time, to see how handling the upgrade might work. Maybe I'll look at some of the other clients to see what they're doing.
cleaning up watch and streaming (connect) is on my todo list for long the first step is to refactor the template system which got merge recently
however, i believe websocket related is still working as you tested. another todo is to support http2
thanks for reporting it
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues 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 as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues 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 as fresh with
/remove-lifecycle rotten - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues 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:
- Reopen this issue with
/reopen - Mark this issue as fresh with
/remove-lifecycle rotten - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues 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 closedYou can:
- Reopen this issue with
/reopen- Mark this issue as fresh with
/remove-lifecycle rotten- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.