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

As a user, I want to have a possibility to convert old devfile v1 workspaces to the new v2 DevWorkspaces #20845

Closed
8 of 9 tasks
ibuziuk opened this issue Nov 30, 2021 · 8 comments
Assignees
Labels
area/dashboard kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system. sprint/current

Comments

@ibuziuk
Copy link
Member

ibuziuk commented Nov 30, 2021

Is your task related to a problem? Please describe

As a user, I want to have a possibility to convert old devfile v1 workspaces to the new v2 DevWorkspaces, when DevWorkspace engine is enabled.

Describe the solution you'd like

  1. Admin enables DevWorkspace engine and switches to the AllNamepsaces mode, based on SOP As an Admin, I want to have clear instructions for switching to Dev Workspace engine #20614
  2. User logs in to Eclipse Che and opens User Dashboard
  3. Old Che 7 devfile v1 Workspaces are displayed with a warning sign, deprecated tooltip, and the link to the documentation:

image
image

  1. Old Che 7 devfile v1 Workspaces do NOT have the Open / Start actions (Delete is still available) on Dashboard, but have a new "Convert" action
  2. When the user clicks on the 'Convert' button / menu item, User Dashboard does the v1 -> v2 conversion using the library under the hood and starts the new Devworkspace (which mounts the same folder in the PVC in order to preserve workspace related files)
  3. When the new DevWorkspace is started based on the converted devfile, a new attribute e.g. converted is added to the old Che 7 workspace which is still stored in the db.
  4. User Dashboard does not show old Che 7 workspaces with the converted attribute

Describe alternatives you've considered

#20254

Additional context

It is planned NOT to delete old Che 7 devfile v1 workspaces from db after the conversion, because it will trigger the PVC cleanup and delete the workspace-related files mounted in the PVC. In the future, it is planned to get rid of the db and use k8s etcd instead

N.B. User still should be able to delete devfile v1 workspace instead of converting it.

Sub-tasks

image

  • Show a warning on the workspace overview page with a link to the documentation regarding devfile v1 deprecation and conversion instructions to devfile v2

image

  • Hide Open / Start menu items for old devfile v1 workspaces
  • Do not allow edit devfile v1 workspaces in the Overview | Devfile editor (available in read-only mode)
  • Add Show Original Devfile action item for converted DevWorkspaces, that will allow to preview original devfile v1
  • Replace Open action link with the Convert button / menu item for creating a new DevWorkspace based on the old devfile v1 (under the hood the convertion lib is used - https://github.com/che-incubator/devfile-converter)
    • in case of the successful conversion old workspace is updated with the 'converted' attribute and is not displayed on the UD.
    • in case of failure the DevWorkspace is not created. Error message on the UD points to the documentation with manual instructions for converting devfile v1 to devfile v2
@ibuziuk ibuziuk added the kind/task Internal things, technical debt, and to-do tasks to be performed. label Nov 30, 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 Nov 30, 2021
@ibuziuk
Copy link
Member Author

ibuziuk commented Nov 30, 2021

@l0rd could you please review and share your thoughts?
The suggested solution expects that che-server workspace API (GET, DELETE, UPDATE) is still working with the DevWorkspae engine enabled.

@azatsarynnyy azatsarynnyy 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 Nov 30, 2021
@l0rd
Copy link
Contributor

l0rd commented Dec 1, 2021

When the user clicks on the 'Convert' button / menu item, User Dashboard does the v1 -> v2 conversion using the library under the hood and starts the new Devworkspace

I would not start the new DevWorkspace. I would just create it.

When the new DevWorkspace is started based on the converted devfile, a new attribute e.g. converted is added to the old Che 7 workspace which is still stored in the db.

We should document how to retrieve those old v1 devfiles in case of problems and add a link to that doc as well.

I would also describe what is expected if a conversion error occurs: we should probably restore the v1 devfile and provide a link to a documentation article that explains how convert a v1 devfile to v2.

@ibuziuk
Copy link
Member Author

ibuziuk commented Dec 1, 2021

I would not start the new DevWorkspace. I would just create it.

makes sense.

  • in case of the successful conversion old workspace is updated with the 'converted' attribute and is not displayed on the UD.
  • in case of failure the DevWorkspace is not created. Error message on the UD points to the documentation

@l0rd The only potential problem is what if the converted workspace fail to start for whatever reason

@nickboldt
Copy link
Contributor

nickboldt commented Dec 2, 2021

what if the converted workspace fail to start for whatever reason

Could we...

  • add a link to the v1->v2 conversion guide into the dashboard so it's prominently displayed any time a v1 devfile is loaded, eg., as a banner / warning / callout ?

  • add a link to the v1->v2 conversion guide into the welcome page so any workspace that opens will have a reminder about how to convert older workspaces to the new standard

  • add a link to the v1->v2 conversion guide into [somewhere else that's prominent] ?

@ibuziuk
Copy link
Member Author

ibuziuk commented Dec 2, 2021

at this point, it is not clear what is going to be the desired UX
this is really a PM call. The previous plan was #20254 which more or less related to #20845 (comment)

@l0rd
Copy link
Contributor

l0rd commented Dec 3, 2021

cc @Kasturi1820

@ibuziuk
Copy link
Member Author

ibuziuk commented Dec 8, 2021

The short-term plan for 7.41 - 7.42 is simply hiding v1 based workspaces on the UD level - #20900

@ibuziuk
Copy link
Member Author

ibuziuk commented Feb 1, 2022

PR has been merged - eclipse-che/che-dashboard#441
There are separate issues for documentation and reusing the PVC (mount the sources from the Che 7 based workspaces during the conversion):

@ibuziuk ibuziuk closed this as completed Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system. sprint/current
Projects
None yet
Development

No branches or pull requests

6 participants