-
Notifications
You must be signed in to change notification settings - Fork 883
coder_parameter: add "order" DB column to ensure file ordering #8193
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
Comments
We chatted about this during the Weekly meeting today (@spikecurtis @mafredri). Some time ago we implemented #6362 to ensure the order of parameters in the UI based on a single This issue recommends adding another numeric property to data "coder_parameter" "docker_image_name" {
name = "Docker Image"
mutable = true
type = "string"
description = "Docker image for the development container"
default = "ghcr.io/harrison-ai/coder-dev:base"
priority = 100
} BTW it might be tricky to implement it in a backward compatible way. On the other hand, if the order of fields changes after Coder deployment, template admins can easily adjust it later by pushing a template update. @bpmct Let me know what is the preferred way:
|
Nice issue! Let's call it Does this mean that the ordering of agent metadata and resource metadata are non-deterministic too? If so, would you be able to add a follow-up issue for this? |
Also, if the I know it is imperfect but better than nothing / random results. |
👍 It's a matter of refactoring, but sure.
Terraform always return them sorted in alphanum. order. Parameters are different as they are retrieved directly from the database, and that may cause an issue. It is not a problem of Terraform, but rather a specific PostgreSQL configuration.
If we merge the "order" property, Coder will not be able to determine whether parameters are just using
Once we merge changes for Coder, UI will display existing parameters sorted by names. Template admins will have to fix this behavior by adding Due to the non-deterministic behavior of PostgreSQL, it will not be possible to fix it on the migration level. |
Gotcha. It all makes sense, thanks. |
With
synchronize_seqscans = on
(default?), rich parameters are fetched from the database tabletemplate_version_parameters
in the right order, as they exist in the .tf file.Unfortunately, it is non-deterministic with
synchronize_seqscans = off
, so we need to introduce an extra db column to ensure the correct ordering.The text was updated successfully, but these errors were encountered: