kubernetes-client / javascript

Javascript client
Apache License 2.0
1.96k stars 494 forks source link

Misleading watch example uses watchObj.metadata.resourceVersion #1493

Open jimjaeger opened 6 months ago

jimjaeger commented 6 months ago

Describe the bug The example https://github.com/kubernetes-client/javascript/blob/master/examples/typescript/watch/watch-example.ts describes the following access "watchObj.metadata.resourceVersion". But in the implementation https://github.com/kubernetes-client/javascript/blob/master/src/watch.ts#L125 the watchObj has only object and type.

How about changing the example to watchObj.object.metadata.resourceVersion or change the call directly to object.metadata.resourceVersion?

k8s-triage-robot commented 3 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

jimjaeger commented 3 months ago

/remove-lifecycle stale

k8s-triage-robot commented 1 week ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

jimjaeger commented 1 week ago

/remove-lifecycle stale