Skip to content

feat: allow promoting an existing template version to active from CLI #15051

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

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

joobisb
Copy link
Contributor

@joobisb joobisb commented Oct 12, 2024

This PR closes #15042

@cdr-bot cdr-bot bot added the community Pull Requests and issues created by the community. label Oct 12, 2024
@matifali matifali requested a review from Emyrk October 12, 2024 19:17
)
client := new(codersdk.Client)
cmd := &serpent.Command{
Use: "promote",
Copy link
Member

Choose a reason for hiding this comment

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

I don't think there is precedence for required flags, can we add to the Use to include the required flags?

Suggested change
Use: "promote",
Use: "promote --template=<template_name> --template-version=<template_version_name>",

We include required params in other Use fields:

Use: "autoupdate <workspace> <always|never>",

coder v0.0.0-devel

USAGE:
coder templates versions promote [flags]
Copy link
Member

Choose a reason for hiding this comment

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

I know the output [flags] technically includes my usage comment earlier. Given they are required, I wonder if we should include them more explicitly.

@joobisb
Copy link
Contributor Author

joobisb commented Oct 15, 2024

@Emyrk I've addressed the comments, please do have a look

@joobisb
Copy link
Contributor Author

joobisb commented Oct 17, 2024

@Emyrk I think CI failure is unrelated, can we merge this?

@matifali matifali merged commit 5ebc748 into coder:main Oct 17, 2024
26 of 27 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2024
@Emyrk
Copy link
Member

Emyrk commented Oct 17, 2024

It was, thanks @matifali 👍

@joobisb joobisb deleted the issue#15042 branch October 18, 2024 17:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community Pull Requests and issues created by the community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow promoting an existing template version to active from CLI
3 participants