question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
vitaliy-guliycommented, Sep 6, 2022

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

0reactions
devstudio-releasecommented, Sep 15, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Detect git repositories under ignored paths #41565 - GitHub
Open up Visual Studio Code. Click "Add Folder to Workspace..." from the "File" menu again. Add project-folder/sub-folder- ...
Read more >
Multi-root Workspaces in Visual Studio Code
You can open and work on multiple project folders in Visual Studio Code with multi-root workspaces.
Read more >
Exclude folder from git in Visual Studio Code - Stack Overflow
Hi in my case "Add to .gitignore" creates new .gitignore file outside the main project folder. Don't add the in .gitignore file already...
Read more >
Don't put .idea and .vscode directories to project's .gitignore
When you are using git (or any other version control), there are some temporary files in the directory structure, which should not be ......
Read more >
VS Code tips — Add a file to the .gitignore - YouTube
Today's VS code tip: add to .gitignoreYou can quickly add a file to your git repository's gitignore from the source control view or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found