-
Notifications
You must be signed in to change notification settings - Fork 888
Feature: Duplicate workspace #9923
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
Comments
I think this would definitely improve the UX. So the idea is that when we duplicate we prefill all parameters from the values of the original workspace but let the user overwrite any of them. |
We should also be crystal clear that we're copying parameters. i.e., whatever cloud resource state the old workspace has isn't copied over, so the new workspace would have fresh storage volumes. |
From looking at the frontend setup yesterday, it looks like modifying the existing flow would be one of the easier approaches for the UI, too The page is already set up to intercept the website URL for default values, so the "duplicate workspace" button could basically be a link to the creation page, just loaded up with params from the previous workspace. The page could then have logic in place to detect whether this is a clone operation, and then display a warning message about what values actually get cloned |
I think the word "Clone" should be avoided as it implies copying of the data within the workspace. |
Going to be tapping @mtojek for the CLI portion, but from looking into how we have things set up so far, this is basically how I would imagine an implementation would work: Basically, the solution would be following Ammar's suggestion by making this an extension of the existing Top-level idea
Terminology
Examples# Copies the params from the existing coder/us-east-1 workspace. User would
# then go through the existing workflow for creating a user, such as being prompted
# for the name of the *new* workspace
coder create --copy-params coder/us-east-1
# Errors out because there isn't a CLI argument
coder create --copy-params
# --copy-params would need to be added to the output for this command
coder create --help I mentioned this to Marcin already, but I'd be happy to update the website documentation for this, too. |
I'm going with this issue. |
Extracted from user conversation
I find myself wanting to launch new workspaces where the configuration (i.e. input params) is nearly identical to a workspace that already exists.
One scenario: workspace in us-east-1, but there are aws issues, so now I want to relaunch a similar workspace in us-west-2 with all the same inputs (i.e. repo configuration, instance size, etc.).
I have to manually copy all the workspace settings to a new workspace, which is a tad tedious.
Possible solutions
In the UI we could have:
In the CLI:
We could do something similar,
coder duplicate [some-user.]some-workspace
and it would operate likecoder create -t template
but with all the defaults populated from the source workspaceThe text was updated successfully, but these errors were encountered: