Skip to content

Adding or updating parameters in a template causes existing workspaces to re-enter all parameters #7213

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
sharkymark opened this issue Apr 20, 2023 · 4 comments · Fixed by #7221 or #7240
Assignees
Labels
site Area: frontend dashboard

Comments

@sharkymark
Copy link
Contributor

Version: v0.22.2+25c1e45

I'm working with a colleague using one of my Coder deployments.

I updated his workspace's template with a new parameter.

As advertised, when he updates his workspace, it prompts him to select the new parameter's value. But any existing parameter does not populate in their fields with the prior values.

Worse, the UI does not show a message when trying to hit update, until I realized I had to re-enter the values for all parameters.

@BrunoQuaresma

@BrunoQuaresma BrunoQuaresma added the s1 Bugs that break core workflows. Only humans may set this. label Apr 20, 2023
@BrunoQuaresma BrunoQuaresma self-assigned this Apr 20, 2023
@BrunoQuaresma BrunoQuaresma added site Area: frontend dashboard s0 Major regression, all-hands-on-deck to fix and removed s1 Bugs that break core workflows. Only humans may set this. labels Apr 20, 2023
@BrunoQuaresma
Copy link
Collaborator

@sharkymark I'm VERY sorry for that. I already found the bug and fixed it. Waiting for the PR to be reviewed and tests to release a PATCH version.

@mtojek mtojek reopened this Apr 20, 2023
@mtojek
Copy link
Member

mtojek commented Apr 20, 2023

I'm not convinced that #7221 fixes it, as the backend should pull parameters from the previous build. Actually, I'm having trouble reproducing it.

@BrunoQuaresma
Copy link
Collaborator

@sharkymark how Marcin tried to reproduce it:

  • Create a template with params
  • Create a workspace
  • Push new template version with params.
  • Update workspace. I can see the popup for the new parameter.
  • Workspace is updated and contains old parameter values.

Initial parameters

data "coder_parameter" "random_string_required" {
  name        = "Required random string"
  icon        = "/icon/aws.png"
  description = "This string is required"
  mutable     = true
}

Added parameters:

data "coder_parameter" "random_string_required_new" {
  name        = "Second required random string"
  icon        = "/icon/aws.png"
  description = "This string is required"
  mutable     = true
}

@mtojek mtojek removed the s0 Major regression, all-hands-on-deck to fix label Apr 20, 2023
@mtojek
Copy link
Member

mtojek commented Apr 20, 2023

We are unable to reproduce it, and it seems to work correctly, so I'm lowering the severity. I think that we need the exact template and more info about users/permissions to start digging into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site Area: frontend dashboard
Projects
None yet
3 participants