Skip to content

Rich parameters #5574

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
bpmct opened this issue Jan 4, 2023 · 10 comments
Closed

Rich parameters #5574

bpmct opened this issue Jan 4, 2023 · 10 comments
Assignees

Comments

@bpmct
Copy link
Member

bpmct commented Jan 4, 2023

This is a continuation of #3906. Rich parameters will make the following possible:

  • Users can edit parameters on existing workspaces
  • Users are prompted when they update their template and new parameters are added
  • Template authors can mark some parameters as immutable, meaning they cannot be changed after initially set. For example: changing the region of a workspace may destroy the volume!
  • Icons, friendly names, and descriptions for parameters
  • Pre-plan validation on parameters (e.g. validation errors on the input)

193463761-102541de-05b5-4704-a751-e9b4654e3b30

Eventually, rich parameters may allow us to add:

  • Special validation/data sources (e.g. "all AWS regions," "all images in registry.mycompany.com")

Call notes:

  • First, we'll introduce the new parameter data source
  • Extend CLI to also use rich parameters
  • Convert examples to the new format

Next:

  • Add migration docs for migrating from variables
  • Consider deprecating parameters

Vision:

  • Terraform variables are template-wide only. In the "template settings" UI, you can edit "variables"
@mtojek
Copy link
Member

mtojek commented Jan 13, 2023

I'm going with this issue. First: we'll introduce the new parameter data source

@ammario
Copy link
Member

ammario commented Jan 19, 2023

We could warn users in the dashboard and CLI when they interact with a workspace or template configured with the old parameters.

@mtojek
Copy link
Member

mtojek commented Jan 20, 2023

We could warn users in the dashboard and CLI when they interact with a workspace or template configured with the old parameters.

Good call, might be worth discussing.

Currently, the idea is to pull parameters from the previous workspace build, unless the user provided new parameter values via CLI/site. Parameters can also have the default_value property, so altogether we should achieve a really smooth experience - if everything matches, don't need to notify or warn the user. Added template parameters should be resolved to their defaults.

If we need transparency, I can park this for development.

@mtojek
Copy link
Member

mtojek commented Jan 20, 2023

Zoom message from Ammar to address later:

How hard would it be to embed a tool in the coder CLI to rewrite templates for the new parameters?

@ammario
Copy link
Member

ammario commented Jan 20, 2023

Okay. That makes a lot of sense. So we can force that users use the new parameters in order to update their workspace configuration.

@mtojek
Copy link
Member

mtojek commented Jan 27, 2023

From Ammar on zoom:

Would be cool if we could show immutable parameters as a section and then mutable as the second section. It creates a clear line for “think hard about these parameters”. It will also lead to more consistency between the edit and create forms.

@ammario
Copy link
Member

ammario commented Feb 3, 2023

From Zoom today:

@deansheather:

can we make the edit workspace form look the same as the create workspace form?
like in v1
and just disable the fields that can't change
also the mutable/immutable headers seem odd to me, it'd be nice if users could define their own sections and we just relied on the yellow text that says it can't be changed instead

@ammario

What’s friendlier language we can use instead of “mutable” and “immutable” in the form? I also second Dean’s point. It would be cool if we could reuse the form and show the immutable params as disabled forms so the user is still aware of them. I also think it would be nice if we had a box around the immutable parameters like: https://i.imgur.com/tQ0TOhf.png.

@kylecarbs

i feel like immutable is pretty friendly as code

@ammario

As a section title it’s probably fine since it maps to configuration. We should at least explain what it means in a description / subtitle in the form.

@mtojek
Copy link
Member

mtojek commented Feb 6, 2023

@bpmct Do you think that we can convert the ideas above and these leftovers into smaller issues in favor of this meta-issue?

@mtojek
Copy link
Member

mtojek commented Feb 7, 2023

As agreed during the Weekly call, I converted this issue into smaller action items, hence closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants