eclipse-che / che

Kubernetes based Cloud Development Environments for Enterprise Teams
http://eclipse.org/che
Eclipse Public License 2.0
6.99k stars 1.19k forks source link

What is the proper way to edit a devfile? #23079

Open meanderix opened 3 months ago

meanderix commented 3 months ago

Summary

I'm currently using Openshift Devspaces 3.15. I've configured my own devfile and committed it to a private git repository.

As an initial comment, I don't see how one would go about checking out the devfile from a private git repository (how would one provide the ssl keys?)

As a work-around I was able to get the raw content of the devfile using i url similar to this: [user]:[secret]@api.bitbucket.org/2.0/repositories/[project]/[repo]/src/[branch]/devfile.yaml

In a previous devspaces version, the devfile was editable in the administrative interface, but this feature is now disabled (possible related to #21606).

Next I attempted to commit a new version of the devfile to the git repository. I could verify that the previous link returned the updated content, but still the devfile associated with the workspace would not be updated. I was considering whether this is related to #21184.

What is the currently accepted way to edit the devfile?

Thanks in advance.

Edit: I've also found some references to the "restart from local devfile" command in the IDE. However, it does not appear when I hit the "Dev Spaces" panel in the status bar.

Relevant information

No response

meanderix commented 3 months ago

A short follow-up: the command "restart workspace from local devfile" did appear with a newly created workspace (but it was not shown in the existing one).

RomanNikitenko commented 3 months ago

but it was not shown in the existing one

could you share version of the editor? Help => About

svor commented 3 months ago

Edit devfile in the workspace and execute Restart workspace from local devfile task should be the best way to update the workspace. It also possible to use OpenShift console: https://youropenshifturl.com/k8s/ns//workspace.devfile.io~v1alpha2~DevWorkspace. This is how it'd look if you go through OCP console: screenshot-nimbusweb me-2024 08 09-12_07_36 screenshot-nimbusweb me-2024 08 09-12_14_05 (1)

After saving changes your workspace will be automatically restarted