-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
After upgrading from Dev Spaces 3.13 to 3.14 - Single root workspace not working as expected #23014
Comments
After testing the reproducer, I noticed the following:
template:
attributes:
controller.devfile.io/devworkspace-config:
name: devworkspace-config
namespace: crw
controller.devfile.io/scc: container-build
controller.devfile.io/storage-type: common
components:
- attributes:
controller.devfile.io/merge-contribution: true
container:
env:
- name: VSCODE_DEFAULT_WORKSPACE
value: /
image: registry.redhat.io/devspaces/udi-rhel8
sourceMapping: /projects
name: python
- projects:
- - git:
- checkoutFrom:
- revision: single_root
- remotes:
- origin: 'https://github.com/Nykredit/openshift-test.git'
- name: openshift-test As a temporary workaround, a project could be added to the reproducer devfile and that should resolve the issue. I believe the fix for this issue probably requires the devworkspace generator tool to do a strategic merge of the local devfile and the existing devworkspace: only fields that are modified in the devfile should be modified in the devworkspace, rather than replace the entire devworkspace's spec.template with the local devfiles content. This approach is being used in DWO for bootstrapping a devworkspace from a cloned devfile, and could be followed. |
Let's start from the beginning to understand the cause of the problem. It can be easily reproducible by everyone. Before workspace restart, open the terminal and check for
After restarting from local devfile, the
Why does it happen was described in the comment above. It needs some time to decide what should we do here. |
My opinion is still that the devworkspace generator tool that is being used to modify the devworkspace object with the local devfile needs to be improved to more carefully merge the local devfile and devworkspace, similar to how DWO does it. There are probably other cases where the Che Dashboard is modifying the DevWorkspace resulting from a DevWorkspace: in other words, we can't assume there's a 1 to 1 correspondance between the local Devfile and the DevWorkspace. In the future, there might be other bugs that arise from these differences between the local Devfile and DevWorkspace. Merging the devfile and devworkspace strategically would hopefully prevent these future bugs from occuring. |
As a workaround it is possible to add the current project to the devfile.
|
Thanks for you prompt responses and the workaround. For now we will move on with the workaround. |
Describe the bug
Hi guys!
After upgrading from Dev Spaces 3.13 to 3.14 the single root workspace does not work properly anymore.
After starting a workspace from Github everything seems to be working fine. However when "Restarting from local devfile" the project folder is lost.
Che version
7.87@latest
Steps to reproduce
Please watch attached video to see the above behavior.
DS13_to_DS14_bug.mp4
Expected behavior
After restart the single root setup should not change.
Runtime
OpenShift
Screenshots
No response
Installation method
OperatorHub
Environment
Dev Sandbox (workspaces.openshift.com)
Eclipse Che Logs
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: