Closed jim-docker closed 3 years ago
Can't reproduce just yet. In any case it's correct that the symlink is from ~/Library/Application Support/Lens/node_modules/
to ~/.k8slens/extensions/
.
This is what probably happened:
/Users/<username>/.k8slens/extensions/lens-extension-cc
At this point /Users/<username>/Library/Application Support/Lens/node_modules/@mirantis/lens-extension-cc
still points to the old /Users/<username>/.k8slens/extensions/lens-extension-cc
.
I think the fix would be actually run npm uninstall (or something) to remove it from node_modules. It's already removed from package.json and /Users/<username>/.k8slens/extensions
Users encountering this bug can for now remove the broken symlink manually from e.g. /Users/<username>/Library/Application Support/Lens/node_modules/@publisher/extension
.
This is what probably happened:
- User copied extension to
/Users/<username>/.k8slens/extensions/lens-extension-cc
- User uninstalled extension from the UI (or just deleting the folder manually).
- User installed extension from the Lens UI.
Yep, that's what happened... 😄 (I just deleted the folder manually, which was a symlink in my case, because that's also how I had installed the extension in the first place...)
Should be fixed (well enough) now.
We could still handle the following case: user removes the extension manually and then starts Lens. Even in this case the broken symlink should be fixed on the next install.
When installing an extension from tarball through the UI it appears to install successfully, and can be enabled but does not actually get loaded.
Root cause is actually the symlink points to a non-existent folder.
From the logs:
~/Library/Application Support/Lens/node_modules/@mirantis/lens-extension-cc
is a symlink pointing to~/.k8slens/extensions/lens-extension-cc
but the extension is actually installed in~/.k8slens/extensions/mirantis--lens-extension-cc
Apart from this, it seems odd that the link is created in
~/Library/Application Support/Lens/node_modules/
and points to the files installed in~/.k8slens/extensions/
. Shouldn't it be the other way around? The extension should actually be installed under~/Library/Application Support/Lens/node_modules/
and a link to it be created in~/.k8slens/extensions/
?affects 4.0.0