csharp icon indicating copy to clipboard operation
csharp copied to clipboard

Some generated methods lacking ConfigureAwait(false)

Open brianpursley opened this issue 1 year ago • 4 comments

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

brianpursley avatar May 06 '24 21:05 brianpursley

good catch could you please send pr to fix

tg123 avatar May 06 '24 23:05 tg123

good catch could you please send pr to fix

Sure.

/assign

brianpursley avatar May 07 '24 15:05 brianpursley

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.

brianpursley avatar May 07 '24 18:05 brianpursley

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

tg123 avatar May 08 '24 18:05 tg123

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

k8s-triage-robot avatar Aug 20 '24 21:08 k8s-triage-robot

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

k8s-triage-robot avatar Sep 19 '24 22:09 k8s-triage-robot

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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 avatar Oct 19 '24 23:10 k8s-triage-robot

@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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

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.

k8s-ci-robot avatar Oct 19 '24 23:10 k8s-ci-robot