-
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
Rebuild underlying image + Preserve Workspace files #12024
Comments
Hey @eliezedeck , can you describe exactly what steps you're doing now, and how your're using your workspace? And what you expect differently? I'm asking because I feel there is a misunderstanding of concepts somewhere, or at least I have a hard time wrapping my head around it. Especially this part is sth I don't understand:
This should never necessary, and I 'd love to understand why you think that's the only way out. BTW It will not be possible to update the workspace image of a running workspace due to kubernetes constraints, but I'm unsure if your asking for this or not. |
Hey @geropl, so imagine this situation:
Now, you feel you're getting productive and progressing:
Now, the most pain part is this: what if you had several tools you realize you need to add into the workspace and not just So, that's basically the use case. The emphasis here is then about productivity, and it's a legitimate use case to have long-lived workspace. Like I said, this is already happening sometimes when the upstream image is updated. So, why not make it explicit? One this I haven't yet tested is: what if I build my own image with the tools I need, and if I update that image, would Gitpod pick that up at workspace startup and rebuild the base image? |
We recommend automating as much as possible, all the steps needed to rebuild your workspaces. That said, this does sound like the concept of rebasing for buildpacks (cc: @csweichel) |
OK. One requirements for me to do that is trying to get the hostname + username that is required to SSH into the old worspace (still running). This is still a manual step for me, @jldec I wonder if there is an API that I can use. |
Hey @geropl and @jldec, I think you could get some additional context if you also check the discord thread he linked in his main-post 😊 I'll try to say the same thing again with what I understood from the discord conversation.
So what he's asking is a manual way to trigger this thing I believe. Right now we can trigger Maybe #7671 also relates with this somehow. |
Thanks @axonasif. That's exactly what I'm looking for. It's already happening, but not yet on demand. It would be very cool and will save lots of time if it can be triggered on demand. |
Hey @eliezedeck! Thanks for the suggestion and thanks everyone for the additional clarifications. Workspace images are published quite infrequently, and workspaces are supposed to be ephemeral and used for a single task. The root need seems that you require stable urls, which is a long-standing request: #898. Would invite you to read some of the suggestion in that issue and then, if possible, invite you to share more details about why you need to use a specific URL, without wildcards. Hope it is helpful 🙏 In the meantime, I will close the request as it doesn't align with the vision for the product regarding ephemerality of workspaces. Feel free to reopen if you disagree with anything I said 💭 |
Thanks for your input @atduarte. While it is true that the workspaces was designed to be ephemeral, for certain projects (for example for trunk-based ones) you'll be working mostly on the Another thing: it is possible to pin the workspace. Now, let's say it could go as long as 6 or a full year if the user needs it to be, right? When the user resumes work on it, he may still very much want to keep that workspace for a reason (hence the pin) but after one year, the underlying image will very likely need to be updated, at least for security purposes, while still maintaining the workspace data. Last, but no least, if I'm not mistaken, Gitpod's vision is also about Better Developer Experience and Productivity. The workspace's vision is to be ephemeral, which is under the general Gitpod's vision. So, in that sense, I'd say the Gitpod's main vision should take precedence over the workspace's vision. After all, it's already partially happening, but just not on demand to satisfy the Productivity and Better DevX vision. I mean, it's so close! |
@atduarte Stable URL isn't probably the root need for it, however, it is indeed a very nice side effect. |
Is your feature request related to a problem? Please describe
Currently, when I update the Docker image for a workspace (for example, add a new tool as I progress in the project), I'm always forced to create a new workspace, thereby loosing all the things I have done in that workspace, especially the Docker containers. Needless to say, it's pretty annoying.
Describe the behaviour you'd like
I have an old workspace that depends on a
gitpod/workspace-*:latest
, after some time away and I come back, I suppose it got updated and Gitpod rebuilds the image, but does not wipe away the workspace: that is exactly what I'm looking for, but kind of on demand.So, may be, have a menu that says "Rebuild image + Preserve Workspace", something like that. This is much better when it's done at Gitpod's level, not when the workspace has already started (see why just below).
One of the nice thing about this also, is that I retain the URLs to the workspace. For example, I develop webhooks, and I register the URL to our partner, I'm progressing in the development, it's ideal that the URL remains the same or else I'll have to ask the partner again to use a different URL, that's very frustrating indeed.
Describe alternatives you've considered
While this is something that can be done manually, like for example creating a new workspace and then syncing the whole
/workspace
folder from the old to the new one, it's far from an ideal situation of it just works.One of the problem with this approach also, is the fact that usually you want Docker to be up and running for the new workspace. So, I have to manually stop everything first to ensure the files in
/workspace/*
are not currently used, then I do the sync, then I manually restart everything back manually, or stop the workspace, and restart after a few seconds once it's fully stopped. As one can tell, it's very frustrating to do that manually.So, again, a process that is much better managed during Gitpod's workspace preparation phase.
Additional context
Like I said earlier, it is already happening, but not on demand. So, I'm guessing it should be possible with some not-too-heavy works.
I had started this discussion on Discord: https://discord.com/channels/816244985187008514/1004317083087159346
The text was updated successfully, but these errors were encountered: