0

I am trying to deploy a custom Theia plugin on a Che workspace. The plugin is intended to execute a task on the hosting system to generate some code. So it will ask the user for some input parameters (a REST service specification file, and a destination folder in which to generate the output), then create a system task and pass to it the parameters to execute. When tested on a local installation of Theia (without Che), the plugin works as expected. But when deployed on a Che environment, the task fails to execute due to a missing dependency:

(node:115) UnhandledPromiseRejectionWarning: Error: /bin/sh: java: not found

After much googling, and digging into the Che documentation, I found that the most likely way to go is with sidecar container. But when I add the containers part in the yaml, the Che workspace loads the sidecar container, but ignores completely the Theia plugin.

Can someone please give me some hints?

This is the devfile for the Che workspace (the failing one is perftestgen_plugin, second from the end):

apiVersion: 1.0.0
metadata:
  name: david-custom-theia-imagef6hsw
projects:
  - name: smartclide-devfiles
    source:
      location: 'https://github.com/eclipse-researchlabs/smartclide-devfiles.git'
      type: git
      branch: v0.0.9
components:
  - id: redhat/vscode-yaml/latest
    type: chePlugin
  - type: chePlugin
    reference: 'https://raw.githubusercontent.com/eclipse-researchlabs/smartclide-devfiles/test/plugins_meta.yaml'
  - type: chePlugin
    reference: 'https://raw.githubusercontent.com/eclipse-researchlabs/smartclide-devfiles/test/perfTestGen-plugin.yaml'
    alias: perftestgen_plugin
  - type: cheEditor
    reference: 'https://github.com/eclipse-researchlabs/smartclide-devfiles/raw/4bd4a0dc7a40665086c92ca5fcebd086f5e39009/editor_meta.yaml'

And my plugin's metadata (meta.yaml) is as follows:

apiVersion: v2
publisher: Kairos Digital Solutions
name: smartclide-perftest-plugin
version: 0.0.3-rc6
type: Theia plugin
displayName: SmartCLIDE Performance Tests Generator
title: SmartCLIDE Performance Tests Generator Plugin
description: Che Plug-in to generate performance tests for a given OpenAPI endpoint spec.
icon: https://www.eclipse.org/che/images/logo-eclipseche.svg
repository: https://github.com/eclipse-researchlabs/smartclide-perftestgen-theia
firstPublicationDate: "2021-04-27"
category: Other
spec:
  containers:
    - image: quay.io/eclipse/che-java11-maven:7.32.1  
  extensions:
    - https://github.com/eclipse-researchlabs/smartclide-perftestgen-theia/releases/download/v0.0.3-rc6/smartclide_perftestgen_theia.theia

I found this issue on stackOverflow which looked similar to my case, but still no way. Che loads either the Theia plugin or the sidecar container, but not both...

0 Answers0