NPE when a devfile command references theia
See original GitHub issueHello! I had two components in my devFile and a lot of commands. I used minikube and chectl to start workspace from the devfile. My workspace was stuck every time and I couldn’t understand what’s the problem with my devfile.
The problem was solved when I replaced the value of the component
field theia-editor
by che-dev
for one of the commands.
So, my question is: can I define theia-editor
as component
for commands?
If no, can we display some warning message for user for this case? For example, I get error:
when I just miss some letter for component field. So, maybe we can do something similar for described case.
Maybe something wrong with my devfile, please take a look (I simplified the devfile as possible and left only two commands and two components - for example):
apiVersion: 1.0.0
metadata:
name: che
projects:
- name: che-theia
source:
type: git
location: 'https://github.com/eclipse/che-theia.git'
components:
-
alias: che-dev
type: dockerimage
image: eclipse/che-theia-dev:next
mountSources: true
endpoints:
- name: "theia-dev"
port: 3130
attributes:
protocol: tcp
public: 'true'
memoryLimit: 4Gi
-
alias: theia-editor
reference: >-
https://raw.githubusercontent.com/eclipse/che-plugin-registry/master/v3/plugins/eclipse/che-theia/next/meta.yaml
type: cheEditor
commands:
- name: theia:build
actions:
- type: exec
component: che-dev
command: >
yarn
workdir: /projects/theia
- name: theia:run:watch
actions:
- type: exec
component: theia-editor
command: >
yarn watch
workdir: /projects/theia
Thanks in advance!
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (9 by maintainers)
Top GitHub Comments
@RomanNikitenko
It should work and I see no reason why we should deny it.
I debugged a workspace start with your Devfile and the reason of failing is NPE
The actual cause is hidden here https://github.com/eclipse/che/blob/f601f1652795048641001387c1ef13192f38a224/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/wsplugins/model/ExtendedPluginFQN.java#L38
It’s related to https://github.com/eclipse/che/pull/13297
I’m working on this