question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not possible to deploy Theia plugins with sidecar container

See original GitHub issue

Describe 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:open
  • Created a year ago
  • Comments:18 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
l0rdcommented, Sep 26, 2022

The plugin intention is to collect required user data (like where to generate the output) before executing the action. Can this be done through devfile commands?

You can use read -p in a command like in this example. This is a command line prompt though. But it does the job.

0reactions
azatsarynnyycommented, Sep 29, 2022

when executing my plugin, I am now getting an error saying Task has exited with code 127.

@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’s alias.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running Hosted Plugins in a Sidecar Container - Theia Community
Plug-ins /VSCode extensions are executed in sidecar containers of Eclipse Che workspaces. (so on a separate instance of Theia) Eclipse Che is container...
Read more >
Chapter 4. Customizing developer environments
The plug-in relies on dependencies or it has a back end. It runs in its own sidecar container, and all dependencies are packaged...
Read more >
Re: [che-dev] Maybe it's time to admit - Eclipse
* Run plugins that depend on che-sidecar-node in the Theia container. As far as I know (apart from node versions), we're not really...
Read more >
Recently Active 'eclipse-che' Questions - Stack Overflow
Cannot deploy Theia plugin on Che with sidecar container. I am trying to deploy a custom Theia ... not able to connect to...
Read more >
Devfile v2 and the DevWorkspace Operator - Part 1
The recommended way to specify a che-theia plugin in a workspace is to ... it is not possible to colocate the devile with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found