As reported by @bryantson, it appears that the k8s plugin in CRW 2 (and thus Che 7.3) requires the yaml extension too.
It seems we need to append this line [0] into this plugin's meta.yaml [1] so that the kubernetes plugin will ALSO load the yaml plugin on startup.
We should do the same in upstream for Che plugin registry too.
Sounds like something for the plugins team?
@JPinkney is this a question for you?
Note that adding the extension there would solve the problem, but would also make the kubernetes plugin incompatible with vscode-yaml (since you'd be running two instances of the extension in that case).
Yeah, this is a very interesting problem.
If vscode-kubernetes-tools packages vscode-yaml with it and you also turn on the vscode-yaml che plugin you'd technically have two running instances of vscode-yaml I believe
Also, vscode-quarkus is looking at using vscode-yaml for some features: https://github.com/redhat-developer/vscode-quarkus/pull/189 so that would need to be in the meta.yaml for vscode-quarkus as well.
So, it seems that no short workaround for this. @amisevsk Can you clarify what do you mean by two instances? I edited the file, but I still see one Openshift pod instance of plugin registry.
@bryantson It shouldn't be an issue for your use case, but in general, if we add the yaml extension to the kubernetes one, as suggested by @nickboldt, then we leave the potential for user-created workspaces that run into an issue of two instances of vscode-yaml running. For example, the devfile
#[...]
components:
- id: redhat/vscode-yaml/latest
type: chePlugin
- id: ms-kubernetes-tools/vscode-kubernetes-tools/latest
type: chePlugin
would start with two instances of the vscode-yaml extension running, which could cause conflicts.
Looking into it a little more, Theia should be downloading the appropriate vsix; I can't see any errors when I start a basic workspace with the k8s plugin installed (on hosted Che, so 7.3.2).
In the vscode-kubernetes-tools container, I have
sh-5.0$ ls -l /tmp/vscode-unpacked/
total 0
drwxr-xr-x. 3 user root 80 Jan 16 19:37 ms-kubernetes-tools.vscode-kubernetes-tools.latest.pzskdzrdkq.vscode-kubernetes-tools-1.0.4.vsix
drwxr-xr-x. 3 user root 80 Jan 16 19:37 redhat_vscode_yaml.vsix
and the output of the plugin shows no errors:
LOG:PLUGIN_HOST(1): PluginManagerExtImpl/init()
LOG:PLUGIN_HOST(1): initializing([email protected] with /remote-endpoint/node_modules/@theia/plugin-ext-vscode/lib/node/plugin-vscode-init.js)
LOG:Debugger contribution has been registered: draft
LOG:PLUGIN_HOST(1): initializing([email protected] with /remote-endpoint/node_modules/@theia/plugin-ext-vscode/lib/node/plugin-vscode-init.js)
WARN:Unsupported activation events: onFileSystem:k8smsx, please open an issue: https://github.com/eclipse-theia/theia/issues/new
WARN:ms-kubernetes-tools.vscode-kubernetes-tools extension will be activated eagerly.
LOG:PLUGIN_HOST(1): PluginManagerExtImpl/loadPlugin(/tmp/vscode-unpacked/redhat_vscode_yaml.vsix/extension/out/src/extension)
LOG:PLUGIN_HOST(1): PluginManagerExtImpl/loadPlugin(/tmp/vscode-unpacked/ms-kubernetes-tools.vscode-kubernetes-tools.latest.pzskdzrdkq.vscode-kubernetes-tools-1.0.4.vsix/extension/out/src/extension)
LOG:Debug configuration provider has been registered: draft
LOG:You registered cluster type aks
LOG:You registered cluster type acs
LOG:You registered cluster type minikube
We need a proper dependency mechanism between Che plugins.
One thing I noticed but haven't dug into deeply:
From this it seems that a dependency mechanism wouldn't immediately solve our problems.
Investigating this issue a little more deeply has led me to two additional issues:
ms-kubernetes-tools/vscode-kubernetes-tools/latest don't work in airgap deployments: https://github.com/eclipse/che/issues/15795