kubernetes-client / kubernetes-client/csharp

Obsolete obsolete tag on WatchAsync?

Open
#1,758 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
1.2k
Forks
307
Avg merge
7d 9h
Merged PRs (30d)
6

Description

https://github.com/kubernetes-client/csharp/blob/2fff4cb7b6e7bef86fca16844450f87354db57e3/src/KubernetesClient/WatcherExt.cs#L76

I upgraded from 17.0.14 to 19.0.2 and noticed this behaviour.

                    await foreach (var (type, item) in response.WatchAsync<V1Pod, V1PodList>(onError: e => throw e, cancellationToken: stoppingToken).WithCancellation(stoppingToken))

This does not work, so I tried to follow the instruction of the obsolete tag, but I can't seem to find the correct WatchAsync method.
What am I missing?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/KubernetesClient/WatcherExt.cs line 76 and inspect the obsolete annotation and available WatchAsync overloads. Reproduce the reported await-foreach call against versions 17.0.14 and 19.0.2, then verify that the guidance identifies a callable method and that the documented watch pattern works with cancellation.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.