Skip to content

Parameters design and UX flow for editing/creating parameters associated with template versions/workspaces #2719

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

Closed
2 tasks
Emyrk opened this issue Jun 29, 2022 · 5 comments
Labels
design needed Request for more beauty docs Area: coder.com/docs stale This issue is like stale bread.

Comments

@Emyrk
Copy link
Member

Emyrk commented Jun 29, 2022

Problem

Currently parameters have some ambiguity around how they are supposed to behave.

  • Parameters currently act in a hierarchy: workspace > version > template.
  • The prompting for params depends on the sensitive field of the terraform variable.
  • Parameter scope template is unused in the codebase.
  • Parameter scope import_job is associated with a job, but should probably be tied to a template_version

CLI prompts for new params and handles deleted params in a new version, but the UI does not. The decision tree for how to handle param prompting is complex.

  • Do param files override previous version values?
  • Should param files require all values? Just new values?
  • UI has to copy the cli behavior

CLI param handling code is unique for template flow and workspace flow. We should unify this logic.

  • What if workspace sets a "sensitive" value?

Who can read param values? Secret values?

How to inherit params from previous version/workspace build?

Design

A design document for params should be created on how params should function. From the terraform value, to the database store, to how to fill in param values. The terraform file should be able to indicate where values should be prompted (at the version create or workspace create)

A good parameter viewer to indicate which param values are associated with a version/workspace and where they came from. Maybe an editor to change these values??

Should we keep a param hierarchy? Or should some values be required to be set at a certain scope, and disallow workspaces from setting them?

Prompt for missing params does not cleanup broken template versions.

Acceptance Criteria

  • Design doc detailing how to use params as a developer and as a user
  • ???
@Emyrk Emyrk added docs Area: coder.com/docs needs grooming design needed Request for more beauty labels Jun 29, 2022
@ketang ketang changed the title DESGIN: Parameters design and UX flow for editing/creating parameters associated with template versions/workspaces DESIGN: Parameters design and UX flow for editing/creating parameters associated with template versions/workspaces Jun 29, 2022
@bpmct
Copy link
Member

bpmct commented Aug 10, 2022

@Emyrk and I discussed how the behavior is slightly different now as template-wide (e.g sensitive) parameters cannot be overridden by the workspace now:

if !parameterSchema.AllowOverrideSource &&
// Workspaces cannot override anything on a template!
scopedParameter.Scope == database.ParameterScopeWorkspace {
return nil
}

@kylecarbs kylecarbs changed the title DESIGN: Parameters design and UX flow for editing/creating parameters associated with template versions/workspaces Parameters design and UX flow for editing/creating parameters associated with template versions/workspaces Aug 24, 2022
@kylecarbs
Copy link
Member

@Emyrk do you want to own this? I feel like you're passionate about it.

@Emyrk
Copy link
Member Author

Emyrk commented Aug 24, 2022

@kylecarbs Yes. With @deansheather 's latest mini RFC, I want that "approved" first from a terraform design. Then we can determine the backend design imo.

@github-actions
Copy link

This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.

@github-actions github-actions bot added the stale This issue is like stale bread. label Oct 24, 2022
@bpmct
Copy link
Member

bpmct commented Oct 25, 2022

Closing since #4311 reworks this

@bpmct bpmct closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design needed Request for more beauty docs Area: coder.com/docs stale This issue is like stale bread.
Projects
None yet
Development

No branches or pull requests

3 participants