Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: remove per request dynamic parameters opt in and rely on template#18505

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Emyrk merged 1 commit intomainfromstevenmasley/dynamic_per_request_opt_in
Jun 23, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
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
7 changes: 0 additions & 7 deletionscoderd/apidoc/docs.go
View file
Open in desktop

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

7 changes: 0 additions & 7 deletionscoderd/apidoc/swagger.json
View file
Open in desktop

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

3 changes: 0 additions & 3 deletionscoderd/parameters_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,6 @@ import (
"github.com/coder/coder/v2/coderd/database/dbtestutil"
"github.com/coder/coder/v2/coderd/database/pubsub"
"github.com/coder/coder/v2/coderd/rbac"
"github.com/coder/coder/v2/coderd/util/ptr"
"github.com/coder/coder/v2/codersdk"
"github.com/coder/coder/v2/codersdk/wsjson"
"github.com/coder/coder/v2/provisioner/echo"
Expand DownExpand Up@@ -260,7 +259,6 @@ func TestDynamicParametersWithTerraformValues(t *testing.T) {
Value: "eu",
},
}
request.EnableDynamicParameters = true
})
coderdtest.AwaitWorkspaceBuildJobCompleted(t, setup.client, wrk.LatestBuild.ID)

Expand All@@ -285,7 +283,6 @@ func TestDynamicParametersWithTerraformValues(t *testing.T) {
RichParameterValues: []codersdk.WorkspaceBuildParameter{
{Name: "region", Value: regionVal},
},
EnableDynamicParameters: ptr.Ref(true),
})
require.NoError(t, err)
coderdtest.AwaitWorkspaceBuildJobCompleted(t, setup.client, bld.ID)
Expand Down
4 changes: 0 additions & 4 deletionscoderd/workspacebuilds.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -385,10 +385,6 @@ func (api *API) postWorkspaceBuilds(rw http.ResponseWriter, r *http.Request) {
builder = builder.State(createBuild.ProvisionerState)
}

if createBuild.EnableDynamicParameters != nil {
builder = builder.DynamicParameters(*createBuild.EnableDynamicParameters)
}

workspaceBuild, provisionerJob, provisionerDaemons, err = builder.Build(
ctx,
tx,
Expand Down
4 changes: 0 additions & 4 deletionscoderd/workspaces.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -717,10 +717,6 @@ func createWorkspace(
builder = builder.MarkPrebuiltWorkspaceClaim()
}

if req.EnableDynamicParameters {
builder = builder.DynamicParameters(req.EnableDynamicParameters)
}

workspaceBuild, provisionerJob, provisionerDaemons, err = builder.Build(
ctx,
db,
Expand Down
20 changes: 4 additions & 16 deletionscoderd/wsbuilder/wsbuilder.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,12 +57,10 @@ type Builder struct {
deploymentValues *codersdk.DeploymentValues
experiments codersdk.Experiments

richParameterValues []codersdk.WorkspaceBuildParameter
// dynamicParametersEnabled is non-nil if set externally
dynamicParametersEnabled *bool
initiator uuid.UUID
reason database.BuildReason
templateVersionPresetID uuid.UUID
richParameterValues []codersdk.WorkspaceBuildParameter
initiator uuid.UUID
reason database.BuildReason
templateVersionPresetID uuid.UUID

// used during build, makes function arguments less verbose
ctx context.Context
Expand DownExpand Up@@ -204,12 +202,6 @@ func (b Builder) MarkPrebuiltWorkspaceClaim() Builder {
return b
}

func (b Builder) DynamicParameters(using bool) Builder {
// nolint: revive
b.dynamicParametersEnabled = ptr.Ref(using)
return b
}

// SetLastWorkspaceBuildInTx prepopulates the Builder's cache with the last workspace build. This allows us
// to avoid a repeated database query when the Builder's caller also needs the workspace build, e.g. auto-start &
// auto-stop.
Expand DownExpand Up@@ -1211,10 +1203,6 @@ func (b *Builder) checkRunningBuild() error {
}

func (b *Builder) usingDynamicParameters() bool {
if b.dynamicParametersEnabled != nil {
return *b.dynamicParametersEnabled
}

tpl, err := b.getTemplate()
if err != nil {
return false // Let another part of the code get this error
Expand Down
1 change: 0 additions & 1 deletioncodersdk/organizations.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -227,7 +227,6 @@ type CreateWorkspaceRequest struct {
RichParameterValues []WorkspaceBuildParameter `json:"rich_parameter_values,omitempty"`
AutomaticUpdates AutomaticUpdates `json:"automatic_updates,omitempty"`
TemplateVersionPresetID uuid.UUID `json:"template_version_preset_id,omitempty" format:"uuid"`
EnableDynamicParameters bool `json:"enable_dynamic_parameters,omitempty"`
}

func (c *Client) OrganizationByName(ctx context.Context, name string) (Organization, error) {
Expand Down
4 changes: 0 additions & 4 deletionscodersdk/workspaces.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -110,10 +110,6 @@ type CreateWorkspaceBuildRequest struct {
LogLevel ProvisionerLogLevel `json:"log_level,omitempty" validate:"omitempty,oneof=debug"`
// TemplateVersionPresetID is the ID of the template version preset to use for the build.
TemplateVersionPresetID uuid.UUID `json:"template_version_preset_id,omitempty" format:"uuid"`
// EnableDynamicParameters skips some of the static parameter checking.
// It will default to whatever the template has marked as the default experience.
// Requires the "dynamic-experiment" to be used.
EnableDynamicParameters *bool `json:"enable_dynamic_parameters,omitempty"`
}

type WorkspaceOptions struct {
Expand Down
1 change: 0 additions & 1 deletiondocs/reference/api/builds.md
View file
Open in desktop

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

4 changes: 0 additions & 4 deletionsdocs/reference/api/schemas.md
View file
Open in desktop

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

2 changes: 0 additions & 2 deletionsdocs/reference/api/workspaces.md
View file
Open in desktop

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

1 change: 0 additions & 1 deletionenterprise/coderd/workspaces_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1759,7 +1759,6 @@ func TestWorkspaceTemplateParamsChange(t *testing.T) {
Value: "7",
},
},
EnableDynamicParameters: true,
})

// Then: the build should succeed. The updated value of param_min should be
Expand Down
2 changes: 0 additions & 2 deletionssite/src/api/typesGenerated.ts
View file
Open in desktop

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

View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -326,7 +326,6 @@ const CreateWorkspacePageExperimental: FC = () => {

const workspace = await createWorkspaceMutation.mutateAsync({
...workspaceRequest,
enable_dynamic_parameters: true,
userId: owner.id,
});
onCreateWorkspace(workspace);
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp