Skip to content

Allow promoting an existing template version to active from CLI #15042

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

Closed
matifali opened this issue Oct 11, 2024 · 2 comments · Fixed by #15051
Closed

Allow promoting an existing template version to active from CLI #15042

matifali opened this issue Oct 11, 2024 · 2 comments · Fixed by #15051
Assignees
Labels
cli Area: CLI

Comments

@matifali
Copy link
Member

Coder allows promoting a version to active from the Dashboard and also through API but this functionality is missing from the CLI,

coder templates versions do not expose a command to achieve that.

coder templates versions list kasmvnc-desktop

NAME                 CREATED AT            CREATED BY  STATUS     ACTIVE
amazing_hermann5     2024-10-04T11:56:34Z  matifali    Failed
bold_colden0         2024-10-04T13:16:39Z  matifali    Succeeded
dazzling_germain1    2024-10-04T13:02:40Z  matifali    Succeeded
distracted_yonath9   2024-10-04T13:28:19Z  matifali    Succeeded
elegant_archimedes9  2024-10-04T11:02:17Z  matifali    Succeeded
fervent_khayyam4     2024-10-04T12:00:07Z  matifali    Succeeded
hardcore_merkle3     2024-10-04T11:53:59Z  matifali    Failed
kind_goldstine6      2024-10-04T11:52:43Z  matifali    Failed
nice_wozniak0        2024-10-04T11:06:50Z  matifali    Succeeded
romantic_merkle9     2024-10-04T14:16:13Z  matifali    Succeeded  Active
sleepy_robinson1     2024-10-04T11:56:06Z  matifali    Failed
tender_ritchie1      2024-10-04T11:58:26Z  matifali    Succeeded

coder templates versions gives,

coder v2.16.0+683a720

USAGE:
  coder templates versions

  Manage different versions of the specified template

  Aliases: version

    - List versions of a specific template:

        $ coder templates versions list my-template


SUBCOMMANDS:
    archive      Archive a template version(s).
    list         List all the versions of the specified template
    unarchive    Unarchive a template version(s).

———
Run `coder --help` for a list of global options.

Suggestion

Add a promote sub-command like coder templates versions promote -t=<TEMPLATE_NAME> --tempplate-version=<TEMPLATE_VERSION_NAME>
Here <TEMPLATE_NAME> is the name of the template and <TEMPLATE_VERSION_NAME> is the name of the template version.

This is related to #14860 and will help solve #9899

@coder-labeler coder-labeler bot added cli Area: CLI feature labels Oct 11, 2024
@matifali matifali changed the title Allow promoting an existing version to active from CLI Allow promoting an existing template version to active from CLI Oct 11, 2024
@joobisb
Copy link
Contributor

joobisb commented Oct 12, 2024

@matifali I have raised a PR for this, please do have a look

@matifali
Copy link
Member Author

matifali commented Oct 12, 2024

Thank you @joobisb. I have requested a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Area: CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants