mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(coderd/database): sort template version variables and fix test flake (#21233)
Previously the GetTemplateVersionVariables query did not sort output, relying on PostgreSQL on-disk ordering which is undeterministic. Variables are now sorted by name because there is no alternative for ordering. Tests were adjusted to accommodate the new ordering, previously they relied on data being written to disk in insert order.
This commit is contained in:
@@ -23,4 +23,4 @@ VALUES
|
||||
) RETURNING *;
|
||||
|
||||
-- name: GetTemplateVersionVariables :many
|
||||
SELECT * FROM template_version_variables WHERE template_version_id = $1;
|
||||
SELECT * FROM template_version_variables WHERE template_version_id = $1 ORDER BY name;
|
||||
|
||||
Reference in New Issue
Block a user