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

Che UI is buggy after loading workspace with Devfile via factory #13413

Closed
johnmcollier opened this issue May 23, 2019 · 10 comments
Closed

Che UI is buggy after loading workspace with Devfile via factory #13413

johnmcollier opened this issue May 23, 2019 · 10 comments
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.

Comments

@johnmcollier
Copy link
Contributor

johnmcollier commented May 23, 2019

Description

I have a simple Devfile referencing two projects on Github and a Theia editor of version next.

---
specVersion: 0.0.1
name: my-plugin-env
projects:
  - name: microproj
    source:
      type: git
      location: 'https://github.com/rajivnathan/microproj.git'
  - name: nodeTemplate
    source:
      type: git
      location: 'https://github.com/microclimate-dev2ops/nodeExpressTemplate'
components:
  - alias: theia-ide
    type: cheEditor
    id: eclipse/che-theia/next

When I load a workspace with this devfile (such as via a factory), the Che dashboard becomes very buggy. I can't select the workspace that was just loaded, nor can I interact with it.

What the sidebar looks like. It's also preventing me from loading the Theia editor via the dashboard:
Screen Shot 2019-05-23 at 11 33 54 AM

What happens when I try to select a workspace:
Screen Shot 2019-05-23 at 11 34 31 AM

However, despite this, the workspace loads fine and if I access the workspace IDE directly (such as with http://che-che.10.100.41.160.nip.io/dashboard/#/ide/che/my-plugin-env_1) I can use it just fine.

Reproduction Steps

Load a workspace using my devfile I referenced above. The workspace should load successfully. Navigate back to the Che dashboard and you should see the UI bugs from the screenshots above.

OS and version:
Che latest

I've been able to reproduce on:
OKD 3.11
OpenShift 3.11
ICP 3.2.0
ICP 3.1.2
Docker Desktop

Diagnostics:
Javascript Console Logs: che_js_console_logs.txt

@johnmcollier johnmcollier changed the title Che UI is buggy after loading workspace with Devfile Che UI is buggy after loading workspace with Devfile via factory May 23, 2019
@sleshchenko sleshchenko added kind/bug Outline of a bug - must adhere to the bug report template. team/ide2 labels May 24, 2019
@sleshchenko
Copy link
Member

cc @ashumilova

@maysunfaisal
Copy link

I see this on the Browser Developer Console for the same issue:

Error: [$interpolate:interr] Can't interpolate: {{navbarRecentWorkspacesController.getLink(workspace)}}
TypeError: Cannot convert undefined or null to object
http://errors.angularjs.org/1.4.8/$interpolate/interr?p0=%7B%7BnavbarRecentWorkspacesController.getLink(workspace)%7D%7D&p1=TypeError%3A%20Cannot%20convert%20undefined%20or%20null%20to%20object
    at app-63659480c2.js:34036
    at Function.qi.interr (app-63659480c2.js:44806)
    at d.exp (app-63659480c2.js:45081)
    at pre (app-63659480c2.js:42692)
    at ie (app-63659480c2.js:42809)
    at g (app-63659480c2.js:42282)
    at s (app-63659480c2.js:41699)
    at app-63659480c2.js:41579
    at r (app-63659480c2.js:41717)
    at c (app-63659480c2.js:42330)

Looks like a recent change to this file https://github.com/eclipse/che/blob/master/dashboard/src/app/navbar/recent-workspaces/recent-workspaces.html

@ashumilova
Copy link
Contributor

@maysunfaisal Do you have the recent changes? I mean this PR - #13418, whether it fixes the bug you are mentioning?
When workspace is created via factory - does it contain workspace config or workspace devfile attribute of the workspace instance?

On my side - I tried to reproduce the issue, but did not manage - it works.

@maysunfaisal
Copy link

@ashumilova I tried it again yesterday with the eclipse/che-server:nightly image but to no avail.

I am creating the workspace via factory like http://<che ingress domain>/f?url=<hosted devfile URL>

My devfile contains the workspace name and my devfile looks something like:

---
specVersion: 0.0.1
name: test-plugin-env
projects:
  - name: goproj
    source:
      type: git
      location: '<MY GIT REPO URL>'
components:
  - alias: theia-ide
    type: cheEditor
    id: eclipse/che-theia/next
  - alias: exec-plugin
    type: chePlugin
    id: eclipse/che-machine-exec-plugin/0.0.1
  - alias: test-plugin
    type: chePlugin
    id: <hosted URL>
  - alias: test-theia
    type: chePlugin
    id: <hosted URL>

@johnmcollier
Copy link
Contributor Author

johnmcollier commented May 29, 2019

@ashumilova I can also still reproduce with the following devfile:

---
specVersion: 0.0.1
name: my-plugin-env
projects:
  - name: microproj
    source:
      type: git
      location: 'https://github.com/rajivnathan/microproj.git'
  - name: nodeTemplate
    source:
      type: git
      location: 'https://github.com/microclimate-dev2ops/nodeExpressTemplate'
components:
  - alias: theia-ide
    type: cheEditor
    id: eclipse/che-theia/next

Hosted here: https://raw.githubusercontent.com/johnmcollier/devfiles/master/devfile_test.yaml

I'm on Docker Desktop with Kubernetes using eclipse/che-server:nightly

@sleshchenko
Copy link
Member

@ashumilova I confirm that it is reproducible on eclipse/che-server:nightly if create a workspace with POST -> /api//devfile/ and devfile shared by @johnmcollier #13413 (comment)

Screenshot_20190530_091230

The same devfile but posted to /api/workspace/devfile
Screenshot_20190530_091348

@sleshchenko sleshchenko added the severity/P1 Has a major impact to usage or development of the system. label May 30, 2019
@sleshchenko
Copy link
Member

Now scope of this issue is more clear: UD handles incorrectly workspaces with WSConfigs without environment. From devfile perspective, it means: devfile does not have any component with dockerimage/kubernetes/openshift type.

Note that workspaces created with api/workspace/devfile (for time being available only on swagger) work fine.

@johnmcollier @maysunfaisal If you are blocked with this issue - you can add dummy dockerimage component until this bug is not fixed.

---
specVersion: 0.0.1
name: my-plugin-env
projects:
  - name: microproj
    source:
      type: git
      location: 'https://github.com/rajivnathan/microproj.git'
  - name: nodeTemplate
    source:
      type: git
      location: 'https://github.com/microclimate-dev2ops/nodeExpressTemplate'
components:
  - alias: theia-ide
    type: cheEditor
    id: eclipse/che-theia/next
  - type: dockerimage
    image: centos:centos7
    command: ["tail"]
    args: ["-f", "/dev/null"]
    memoryLimit: 50Mi

@ashumilova
Copy link
Contributor

I am almost done with the fix, but need to wait for tests to pass :(

@ashumilova
Copy link
Contributor

Thank you, guys, for detailed hints how to reproduce the issue.

@johnmcollier
Copy link
Contributor Author

@ashumilova I just got around to using the new Che image, all fixed for me. Thanks!!!

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

4 participants