1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Do not make watch requests without resourceVersion (#3089)

* Do not make watch requests without resourceVersion

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>

* Check resource version from given namespace

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala 2021-06-17 14:09:48 +03:00 committed by GitHub
parent 7988f068cb
commit 54eaaefe62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -332,6 +332,10 @@ export abstract class KubeObjectStore<T extends KubeObject = any> extends ItemSt
}
private watchNamespace(namespace: string, abortController: AbortController) {
if (!this.api.getResourceVersion(namespace)) {
return;
}
let timedRetry: NodeJS.Timeout;
const watch = () => this.api.watch({
namespace,