che icon indicating copy to clipboard operation
che copied to clipboard

What is the proper way to edit a devfile?

Open meanderix opened this issue 1 year ago • 3 comments

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 avatar Aug 08 '24 12:08 meanderix

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).

meanderix avatar Aug 09 '24 08:08 meanderix

but it was not shown in the existing one

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

RomanNikitenko avatar Aug 09 '24 08:08 RomanNikitenko

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

svor avatar Aug 09 '24 09:08 svor

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

che-bot avatar Nov 12 '25 14:11 che-bot