Skip to content

feat: Allow inheriting parameters from previous template_versions when updating a template #2397

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 18 commits into from
Jun 17, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix list parameters
  • Loading branch information
Emyrk committed Jun 16, 2022
commit 3422844f9524f80725b0b444a0396a347d6d014f
8 changes: 8 additions & 0 deletions cli/parameterslist.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ func parameterList() *cobra.Command {
if err != nil {
return xerrors.Errorf("%q must be a uuid for this scope type", name)
}

// Could be a template_version id or a job id. Check for the
// version id.
tv, err := client.TemplateVersion(cmd.Context(), scopeID)
if err == nil {
scopeID = tv.Job.ID
}

default:
return xerrors.Errorf("%q is an unsupported scope, use %v", scope, []codersdk.ParameterScope{
codersdk.ParameterWorkspace, codersdk.ParameterTemplate, codersdk.ParameterImportJob,
Expand Down