8000 feat(coderd): support ephemeral parameters by mtojek · Pull Request #8367 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat(coderd): support ephemeral parameters #8367

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 23 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
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
Next Next commit
WIP
  • Loading branch information
mtojek committed Jul 7, 2023
commit ef50c356cbed424375178ab8d1fb7e05765d5e58
1 change: 1 addition & 0 deletions coderd/database/dbfake/dbfake.go
Original file line number Diff line number Diff line change
Expand Up @@ -3967,6 +3967,7 @@ func (q *fakeQuerier) InsertTemplateVersionParameter(_ context.Context, arg data
Required: arg.Required,
DisplayOrder: arg.DisplayOrder,
LegacyVariableName: arg.LegacyVariableName,
Ephemeral: arg.Ephemeral,
}
q.templateVersionParameters = append(q.templateVersionParameters, param)
return param, nil
Expand Down
3 changes: 3 additions & 0 deletions coderd/database/dump.sql

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE template_version_parameters DROP COLUMN ephemeral;
4 changes: 4 additions & 0 deletions coderd/database/migrations/000135_ephemeral_parameters.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ALTER TABLE template_version_parameters ADD COLUMN ephemeral boolean NOT NULL DEFAULT false;

COMMENT ON COLUMN template_version_parameters.ephemeral
IS 'The value of an ephemeral parameter will not be preserved between consecutive workspace builds.';
2 changes: 2 additions & 0 deletions coderd/database/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions coderd/database/queries.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions coderd/database/queries/templateversionparameters.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ INSERT INTO
required,
legacy_variable_name,
display_name,
display_order
display_order,
ephemeral
)
VALUES
(
Expand All @@ -37,7 +38,8 @@ VALUES
$14,
$15,
$16,
$17
$17,
$18
) RETURNING *;

-- name: GetTemplateVersionParameters :many
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ require (
github.com/codeclysm/extract v2.2.0+incompatible
github.com/coder/flog v1.1.0
github.com/coder/retry v1.4.0
github.com/coder/terraform-provider-coder v0.9.0
github.com/coder/terraform-provider-coder v0.10.0
github.com/coder/wgtunnel v0.1.5
github.com/coreos/go-oidc/v3 v3.6.0
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf
Expand Down Expand Up @@ -110,7 +110,7 @@ require (
github.com/hashicorp/go-version v1.6.0
github.com/hashicorp/golang-lru/v2 v2.0.1
github.com/hashicorp/hc-install v0.5.2
github.com/hashicorp/hcl/v2 v2.17.0
github.com/hashicorp/hcl/v2 v2.17.0 // indirect
github.com/hashicorp/terraform-config-inspect v0.0.0-20211115214459-90acf1ca460f
github.com/hashicorp/terraform-json v0.17.0
github.com/hashicorp/yamux v0.1.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ github.com/coder/ssh v0.0.0-20230621095435-9a7e23486f1c h1:TI7TzdFI0UvQmwgyQhtI1
github.com/coder/ssh v0.0.0-20230621095435-9a7e23486f1c/go.mod h1:aGQbuCLyhRLMzZF067xc84Lh7JDs1FKwCmF1Crl9dxQ=
github.com/coder/tailscale v0.0.0-20230522123520-74712221d00f h1:F0Xr1d8h8dAHn7tab1HXuzYFkcjmCydnEfdMbkOhlVk=
github.com/coder/tailscale v0.0.0-20230522123520-74712221d00f/go.mod h1:jpg+77g19FpXL43U1VoIqoSg1K/Vh5CVxycGldQ8KhA=
github.com/coder/terraform-provider-coder v0.9.0 h1:OJazaeBz6O2h7tDDUyUWgNW71lTPbvbI2raX1CGuBzI=
github.com/coder/terraform-provider-coder v0.9.0/go.mod h1:UIfU3bYNeSzJJvHyJ30tEKjD6Z9utloI+HUM/7n94CY=
github.com/coder/terraform-provider-coder v0.10.0 h1:d9iKLhf0bIERqPr0sm02pFSiLphpZ9pKbcv9+8LGvaU=
github.com/coder/terraform-provider-coder v0.10.0/go.mod h1:UIfU3bYNeSzJJvHyJ30tEKjD6Z9utloI+HUM/7n94CY=
github.com/coder/wgtunnel v0.1.5 h1:WP3sCj/3iJ34eKvpMQEp1oJHvm24RYh0NHbj1kfUKfs=
github.com/coder/wgtunnel v0.1.5/go.mod h1:bokoUrHnUFY4lu9KOeSYiIcHTI2MO1KwqumU4DPDyJI=
github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw=
Expand Down
1 change: 1 addition & 0 deletions provisionersdk/proto/provisioner.proto
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ message RichParameter {
string legacy_variable_name = 14;
string display_name = 15;
int32 order = 16;
bool ephemeral = 17;
}

// RichParameterValue holds the key/value mapping of a parameter.
Expand Down
0