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 Theia (multi-root) fails to detect projects when they are cloned by another tool #19489

Closed
1 task done
amisevsk opened this issue Apr 1, 2021 · 4 comments
Closed
1 task done
Assignees
Labels
area/editor/theia Issues related to the che-theia IDE of Che engine/devworkspace Issues related to Che configured to use the devworkspace controller as workspace engine. 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

@amisevsk
Copy link
Contributor

amisevsk commented Apr 1, 2021

Describe the bug

When projects are cloned by an external tool, Che Theia (with multi-root enabled) will show

No projects are in the workspace yet

even though the proejcts are present in their expected folders.

The che.theia-workspace file in /projects is also unpopulated:

$ cat che.theia-workspace
{"folders":[]}

Manually filling in the file with

{
   "folders": [
      {
         "path": "web-nodejs-sample"
      },
   ]
}

causes workspace folders to appear as expected.

Che version

  • latest

Steps to reproduce

If DevWorkspaces support is enabled, can be reproduced via the following DevWorkspace:

cat <<EOF | kubectl apply -f -
kind: DevWorkspace
apiVersion: workspace.devfile.io/v1alpha2
metadata:
  name: theia
spec:
  started: true
  template:
    projects:
      - name: web-nodejs-sample
        git:
          remotes:
            origin: "https://github.com/che-samples/web-nodejs-sample.git"
    components:
      - name: theia
        plugin:
          uri: https://che-plugin-registry-main.surge.sh/v3/plugins/eclipse/che-theia/next/devfile.yaml
      - name: project-clone          
        container:
          cpuLimit: 50m
          cpuRequest: 5m
          image: quay.io/amisevsk/project-clone:dev
          memoryLimit: 200Mi
          memoryRequest: 64Mi
          mountSources: true
    commands:
      - id: clone-projects
        apply:
          component: project-clone
    events:
      prestart:
        - clone-projects
EOF

Expected behavior

Che-Theia should detect that projects are already there and set up the multi-root workspace appropriately

@amisevsk amisevsk added kind/bug Outline of a bug - must adhere to the bug report template. area/editor/theia Issues related to the che-theia IDE of Che engine/devworkspace Issues related to Che configured to use the devworkspace controller as workspace engine. labels Apr 1, 2021
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Apr 1, 2021
@benoitf benoitf added severity/P1 Has a major impact to usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Apr 1, 2021
@RomanNikitenko
Copy link
Member

should be fixed by #19101

@vitaliy-guliy
Copy link
Contributor

Link with #19544
Will be fixed by this PR eclipse-che/che-theia#1076

@RomanNikitenko
Copy link
Member

RomanNikitenko commented Apr 21, 2021

@amisevsk
I didn't test it recently, but I guess the issue should be fixed by eclipse-che/che-theia#1074 - it's already merged.

The main idea of the eclipse-che/che-theia#1074 is: at starting che-theia we check - if there are already projects on file system. If so - we add them as workspace folders.

So:

@amisevsk
Copy link
Contributor Author

Thanks @RomanNikitenko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/theia Issues related to the che-theia IDE of Che engine/devworkspace Issues related to Che configured to use the devworkspace controller as workspace engine. 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

5 participants