Updates to devfile and how it affects workspaces
Problem Statement
Let's say user u1
created a workspace w1
from a devfile in a project from branch b1
(which is at commit c1
right now). If any changes are made to the devfile in the project on branch b1
(which is at commit c2
right now), should those changes be reflected into the workspace i.e. should the new devfile config be applied to all non-terminated workspaces?
There are multiple ways that the branch b1
would have progressed from commit c1
to commit c2
. Some possibilities are
- User
u1
made a change to a devfile in a workspace and pushed it upstream - User
u2
made a change directly to that file in that branch within GitLab
Scenarios in which applying the latest changes would be useful
- User is updating the devfile and want a quick feedback loop
- Organization has updated some devfile which had a vulnerability and require to roll it out to all users as quickly as possible
Possible solutions
Solution 1
For Scenario 1, while creating the workspace from a project, add an option Do you want to subscribe to changes in the devfile which will automatically apply them to the workspace when it starts again?
.
For Scenario 2, regardless of whether you checked the tickbox of not, those changes will be rolled out to you since they are security patches.
Solution 2
For Scenario 1, provide a pop-up in the editor that there have been upstream changes to the devfile on the branch b1 from which this workspace has been created. Do you want to apply those changes
?
For Scenario 2, provide organizational controls at a group/project which can show workspaces for that project that are not on commit c2
and allow the administrators to send notifications to the user u1
or force apply those changes to the workspace w1
.
Solution 3
... ?
Things to answer/consider
- What are the advantages/disadvantages of allowing such changes without explicit user approval?
- What do our competitors do about this?
- How do we know if some change to a devfile is a "security patch"?
- Can any possible solution create any user confusion?
- Will this be part of "viable"/"complete"/"lovable" maturity?