Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE when a devfile command references theia #13842

Closed
RomanNikitenko opened this issue Jul 14, 2019 · 9 comments
Closed

NPE when a devfile command references theia #13842

RomanNikitenko opened this issue Jul 14, 2019 · 9 comments
Assignees
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@RomanNikitenko
Copy link
Member

RomanNikitenko commented Jul 14, 2019

Hello!
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.
workspace_fail

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:
start_workspace_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://github.com/raw/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!

@RomanNikitenko RomanNikitenko added kind/question Questions that haven't been identified as being feature requests or bugs. area/devfile labels Jul 14, 2019
@skabashnyuk
Copy link
Contributor

@sleshchenko @metlos thoughts?

@sleshchenko sleshchenko added kind/bug Outline of a bug - must adhere to the bug report template. and removed kind/question Questions that haven't been identified as being feature requests or bugs. labels Jul 15, 2019
@sleshchenko
Copy link
Member

sleshchenko commented Jul 15, 2019

@RomanNikitenko

So, my question is: can I define theia-editor as component for commands?

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
Screenshot_20190715_144120

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 #13297

@skabashnyuk skabashnyuk added severity/P1 Has a major impact to usage or development of the system. team/platform labels Jul 15, 2019
@skabashnyuk
Copy link
Contributor

@rhopp @l0rd wdyt is it 7.0.0 or 7.1?

@skabashnyuk
Copy link
Contributor

Fix look like not very complex

@sleshchenko
Copy link
Member

I've created a separate issue for Workspace Loader since it has to show an error message that workspace failed to start #13846

@nickboldt nickboldt added the status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach label Jul 15, 2019
@nickboldt
Copy link
Contributor

Based on triage doc https://docs.google.com/document/d/1heR9ysCHCPxcoyQbI2er7QeMAKk2LEecjTFQayL65mA/edit# I would surmise that if this is a P1, it's for 7.1. If it's a blocker, it's for 7.0.

@nickboldt nickboldt added this to the 7.1.0 milestone Jul 15, 2019
@l0rd l0rd changed the title devfile: Can not start workspace NPE when a devfile command references theia component Jul 16, 2019
@l0rd l0rd changed the title NPE when a devfile command references theia component NPE when a devfile command references theia Jul 16, 2019
@l0rd
Copy link
Contributor

l0rd commented Jul 16, 2019

I would say that's 7.0.0 only if it affects some commands of the devfiles in the devfile registry. Otherwise I agree with @nickboldt triage.

@l0rd
Copy link
Contributor

l0rd commented Jul 16, 2019

And I have changed the title of this issue because it was really a bad one.

@sleshchenko sleshchenko removed the status/analyzing An issue has been proposed and it is currently being analyzed for effort and implementation approach label Jul 26, 2019
@sparkoo
Copy link
Member

sparkoo commented Jul 26, 2019

I'm working on this

@sleshchenko sleshchenko added the status/in-progress This issue has been taken by an engineer and is under active development. label Jul 26, 2019
@sleshchenko sleshchenko removed the status/in-progress This issue has been taken by an engineer and is under active development. label Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

6 participants