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

Files in .vscode and .che folders of a git repository are ignored at workspace creation #21635

Closed
svor opened this issue Aug 15, 2022 · 6 comments · Fixed by eclipse-che/che-server#351
Assignees
Labels
area/dashboard kind/bug Outline of a bug - must adhere to the bug report template. new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@svor
Copy link
Contributor

svor commented Aug 15, 2022

Describe the bug

All defined plugins from the extensions.json are not installed If create a workspace by the factory and che-theia editor.
Also I see that the tools component doesn't contain environment variables that should be injected by the Dashboard:

        - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE
          value: /remote-endpoint/plugin-remote-endpoint
        - name: THEIA_PLUGINS
          value: 'local-dir:///plugins/sidecars/tools'

It's also not possible to customize an editor by using .che/che-editor.yaml file:

screenshot-nimbusweb me-2022 09 07-10_02_22

Che version

next (development version)

Steps to reproduce

  1. Create a workspace by this factory: https://github.com/che-samples/java-spring-petclinic/tree/devfilev2?che-editor=eclipse/che-theia/next
  2. Open tools container and check that /plugins folder doesn't exist
  3. Go to the Dasboard and check env variables in the tools component

Expected behavior

/plugins folder should be existed and plugins from the .vscode/extensions.json should be installed

Runtime

OpenShift

Screenshots

screenshot-che-dogfooding apps che-dev x6e0 p1 openshiftapps com-2022 08 15-16_52_45

Installation method

chectl/next

Environment

Linux

Release Notes Text

Files in .vscode and .che subfolders need to be processed during workspace creation as they can contain important workspace details (as the editor and the che-theia plugins to pre-install) but were ignored in recent versions due to a regression. This has been fixed in this release.

@svor svor added 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. area/dashboard labels Aug 15, 2022
@svor
Copy link
Contributor Author

svor commented Aug 15, 2022

cc @olexii4 @akurinnoy

@olexii4
Copy link
Contributor

olexii4 commented Aug 31, 2022

I think it happened after this PR into the repo https://github.com/eclipse-che/che-theia.
@vitaliy-guliy WDYT?

@vitaliy-guliy
Copy link
Contributor

vitaliy-guliy commented Sep 1, 2022

I think it happened after this PR into the repo https://github.com/eclipse-che/che-theia. @vitaliy-guliy WDYT?

Due to all the tests in devworkspace-handler are passed, I think the problem might be something else.
I will check it anyway, give me some time.

@svor svor mentioned this issue Sep 6, 2022
82 tasks
@vitaliy-guliy
Copy link
Contributor

It looks like I found cause of the problem.
First, when create a workspace from provided samples on the dashboard, everything is working well.

When the user create a workspace from git repository, dashboard tries to fetch .vscode/extensions.json file to get the list of extensions for the following adding them to the devworkspace object.
But for some reasons, GET request on .vscode/extensions.json fails.

Screenshot from 2022-09-02 18-52-50

It becomes much clear when trying to open the URL in the new tab
Screenshot from 2022-09-06 12-32-38

I tried to get other files from git repository and was able to get file content when the file or directory name do not contain dot at the beginning.

There is a potential place in che-server to fix the bug
https://github.com/eclipse-che/che-server/blob/main/wsmaster/che-core-api-factory/src/main/java/org/eclipse/che/api/factory/server/scm/AuthorizingFileContentProvider.java#L149

@svor svor changed the title Plugins are not installed after creating a workspace by the factory Files in .vscode and .che can not be found if create a workspace by the factory Sep 7, 2022
@azatsarynnyy
Copy link
Member

Might be a related issue #21639

@l0rd l0rd changed the title Files in .vscode and .che can not be found if create a workspace by the factory Files in .vscode and .che folders of a git repository are ignored at workspace creation Sep 15, 2022
@l0rd l0rd added new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes status/release-notes-review-needed Issues that needs to be reviewed by the doc team for the Release Notes wording labels Sep 15, 2022
@l0rd l0rd added this to the 7.54 milestone Sep 15, 2022
@max-cx max-cx removed the status/release-notes-review-needed Issues that needs to be reviewed by the doc team for the Release Notes wording label Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard kind/bug Outline of a bug - must adhere to the bug report template. new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants