Not possible to deploy Theia plugins with sidecar container
See original GitHub issueDescribe the bug
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 for execution.
The plugin has an external dependency on java, and according to the documentation I should define a sidecar container providing the external dependencies needed. However, when I add the containers
part in the yaml, the Che workspace loads the sidecar container but ignores completely the Theia plugin.
Che version
other (please specify in additional context)
Steps to reproduce
Start a workspace from this devfile (the failing plugin 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'
The plugin’s 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
Expected behavior
Start of sidecar container and front-end plugin at the same time. Communication between them
Runtime
Kubernetes (vanilla)
Screenshots
No response
Installation method
other (please specify in additional context)
Environment
Amazon
Eclipse Che Logs
No response
Additional context
No response
Issue Analytics
- State:
- Created a year ago
- Comments:18 (10 by maintainers)
You can use
read -p
in a command like in this example. This is a command line prompt though. But it does the job.@davidgarcia-kairosds Most likely, it’s because the task is executed in the main theia container, but not in the sidecar. You can specify a sidecar in the command definition in your Devfile. See the examples here. Note, the
component
propery corresponds to the component’salias
.