8000 feat: evaluate dynamic parameters http endpoint by Emyrk · Pull Request #18182 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: evaluate dynamic parameters http endpoint #18182

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 13 commits into from
Jun 2, 2025
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
linting
  • Loading branch information
Emyrk committed Jun 2, 2025
commit b1617fb38f1dcd60801b89af4338545e84f1174f
4 changes: 4 additions & 0 deletions coderd/parameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@

type previewFunction func(ctx context.Context, ownerID uuid.UUID, values map[string]string) (*preview.Output, hcl.Diagnostics)

// handleDynamicParameters
// nolint:revive
func (api *API) handleDynamicParameters(listen bool, rw http.ResponseWriter, r *http.Request, tf database.TemplateVersionTerraformValue, templateVersion database.TemplateVersion, initial codersdk.DynamicParametersRequest) {
var (
ctx = r.Context()
Expand Down Expand Up @@ -223,6 +225,8 @@
}
}

// handleStaticParameters
// nolint:revive
func (api *API) handleStaticParameters(listen bool, rw http.ResponseWriter, r *http.Request, version uuid.UUID, initial codersdk.DynamicParametersRequest) {
ctx := r.Context()
dbTemplateVersionParameters, err := api.Database.GetTemplateVersionParameters(ctx, version)
Expand Down Expand Up @@ -339,7 +343,7 @@
}
}

func (api *API) handleParameterEvaluate(rw http.ResponseWriter, r *http.Request, initial codersdk.DynamicParametersRequest, render previewFunction) {

Check failure on line 346 in coderd/parameters.go

View workflow job for this annotation

GitHub Actions / lint

unused-receiver: method receiver 'api' is not referenced in method's body, consider removing or renaming it as _ (revive)
ctx := r.Context()

// Send an initial form state, computed without any user input.
Expand Down
Loading
0