Skip to content

feat(cli): support non-active template version pushes #7488

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 10 commits into from
Jun 3, 2023

Conversation

goodspark
Copy link
Contributor

So that we can push template updates for testing without impacting normal users of the template.

So that we can push template updates for testing without impacting
normal users of the template.
Copy link
Member

@ammario ammario left a comment

Choose a reason for hiding this comment

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

Just a small request. Also, please run make update-golden-files gen. Thanks!

@@ -233,6 +236,12 @@ func (r *RootCmd) templatePush() *clibase.Cmd {
Description: "Always prompt all parameters. Does not pull parameter values from active template version.",
Value: clibase.BoolOf(&alwaysPrompt),
},
{
Flag: "make-active",
Copy link
Member

Choose a reason for hiding this comment

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

Let's make this activate, and the variables too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When I run make, I get errors that seem unrelated to this change:

Errors
# github.com/cenkalti/backoff/v4
../../go/pkg/mod/github.com/cenkalti/backoff/v4@v4.2.0/retry.go:10:26: syntax error: unexpected any, expecting ]
../../go/pkg/mod/github.com/cenkalti/backoff/v4@v4.2.0/retry.go:10:38: method has no receiver
../../go/pkg/mod/github.com/cenkalti/backoff/v4@v4.2.0/retry.go:16:53: syntax error: unexpected [ after top level declaration
../../go/pkg/mod/github.com/cenkalti/backoff/v4@v4.2.0/retry.go:17:16: method has no receiver
../../go/pkg/mod/github.com/cenkalti/backoff/v4@v4.2.0/retry.go:17:16: syntax error: unexpected (, expecting name or (
../../go/pkg/mod/github.com/cenkalti/backoff/v4@v4.2.0/retry.go:42:19: syntax error: unexpected [, expecting (
../../go/pkg/mod/github.com/cenkalti/backoff/v4@v4.2.0/retry.go:53:25: syntax error: unexpected [, expecting (
../../go/pkg/mod/github.com/cenkalti/backoff/v4@v4.2.0/retry.go:66:33: syntax error: unexpected [, expecting (
../../go/pkg/mod/github.com/cenkalti/backoff/v4@v4.2.0/retry.go:70:19: syntax error: unexpected [, expecting (
../../go/pkg/mod/github.com/cenkalti/backoff/v4@v4.2.0/retry.go:76:2: syntax error: non-declaration statement outside function body
../../go/pkg/mod/github.com/cenkalti/backoff/v4@v4.2.0/retry.go:76:2: too many errors
note: module requires Go 1.18
# github.com/coder/coder/cryptorand
cryptorand/slices.go:9:6: missing function body
cryptorand/slices.go:9:13: syntax error: unexpected [, expecting (
note: module requires Go 1.20
Makefile:473: recipe for target 'coderd/database/dump.sql' failed
make: *** [coderd/database/dump.sql] Error 2

@goodspark goodspark requested a review from ammario May 12, 2023 17:08
@ammario
Copy link
Member

ammario commented May 12, 2023

@goodspark it looks like you're on a pre-generics version of the Go toolchain. Try rerunning the commands with go 1.20.

Copy link
Member

@ammario ammario left a comment

Choose a reason for hiding this comment

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

I'm also happy to take this to the finish line if you'd like. Unfortunately GitHub makes it hard for us to push to forks.

@goodspark
Copy link
Contributor Author

Yeah, sure. My env has some old version of Golang and since I rarely use it at work, I haven't been bothered enough to download the 1.20.

@ammario ammario assigned ammario and unassigned goodspark May 17, 2023
@ammario ammario removed their assignment May 17, 2023
@matifali matifali self-assigned this May 17, 2023
@matifali matifali removed their assignment May 23, 2023
@ammario ammario changed the title feat: Add arg to allow non-active template version pushes feat: add arg to allow non-active template version pushes May 31, 2023
@ammario ammario force-pushed the template-push-active-options branch from b14f30c to ebdcc6c Compare June 1, 2023 05:17
@ammario ammario changed the title feat: add arg to allow non-active template version pushes feat(cli): support non-active template version pushes Jun 3, 2023
@ammario ammario enabled auto-merge (squash) June 3, 2023 21:50
@ammario ammario merged commit e2613c9 into coder:main Jun 3, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jun 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants