Skip to content

Commit ae285b7

Browse files
committed
fix: enhance object key generation in getObjectKey function to include namespace and name for improved uniqueness
1 parent 76312ed commit ae285b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/kuviewAtom.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const PENDING_CHANGES = new Map<string, _change_operation>();
3434

3535
function getObjectKey(object: KubernetesObject): string {
3636
// it is suprising that sometimes the uid is not unique, so we need to check the apiVersion and kind as well
37-
return `${object.apiVersion}/${object.kind}:${object.metadata.uid}`;
37+
return `${object.apiVersion}/${object.kind}:${object.metadata.namespace}/${object.metadata.name}:${object.metadata.uid}`;
3838
}
3939

4040
export function handleEvent(event: KuviewEvent) {
@@ -91,6 +91,7 @@ export function useGVKSyncHook(gvk: string) {
9191
});
9292

9393
if (updated) {
94+
console.log("updated", gvk, operations);
9495
setObjects(newObjects);
9596
}
9697
};

0 commit comments

Comments
 (0)