Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(cli): create workspace using parameters from existing workspace#10604

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mtojek merged 10 commits intomainfrom9923-cli-duplicate
Nov 9, 2023

Conversation

mtojek
Copy link
Member

@mtojekmtojek commentedNov 9, 2023
edited
Loading

Fixes:#9923

This PR adds support for duplicating workspace using CLI. It is implemented as part of thecoder create command according to thisdesign (thanks@Parkreiner!).

./scripts/coder-dev.sh create --copy-parameters-from=workspace-5 workspace-6-copy

@mtojekmtojek self-assigned thisNov 9, 2023
@mtojekmtojek marked this pull request as ready for reviewNovember 9, 2023 16:17
Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks good to me! Just an edge case I'd like to see tested, and some potential speed-ups in creation.

template := coderdtest.CreateTemplate(t, client, owner.OrganizationID, version.ID)

// Firstly, create a regular workspace using template with parameters.
inv, root := clitest.New(t, "create", "my-workspace", "--template", template.Name, "-y",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

NB: we now havedbfake.WorkspaceWithAgent if you want to speed things up

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

WorkspaceWithAgent looks efficient, but I need a workspace with build parameters and a corresponding template with rich parameters. Not sure if the function supports it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

😢 🎺

@matifali
Copy link
Member

matifali commentedNov 9, 2023
edited
Loading

May be we should call itcoder clone. Thoughts?
Orcoder create --clone=old-workdoace new-workspace

We can put a disclaimer that it only copies the parameters and not the data stored in persisted resources.

@mtojek
Copy link
MemberAuthor

mtojek commentedNov 9, 2023
edited
Loading

@matifali There were concerns raised around the word "clone":comment

matifali reacted with thumbs up emoji

@mtojekmtojek merged commit61fac2d intomainNov 9, 2023
@mtojekmtojek deleted the 9923-cli-duplicate branchNovember 9, 2023 18:22
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsNov 9, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@ParkreinerParkreinerAwaiting requested review from Parkreiner

Assignees

@mtojekmtojek

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Feature: Duplicate workspace
3 participants
@mtojek@matifali@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp