Return template parameters in consistent order (#2975)

* return parameters from Terraform provisioner in sorted order

* persist parameter indices in database and return them in correct order from API

* don't re-sort parameters by name when creating templates
This commit is contained in:
David Wahler
2022-07-13 15:29:34 -05:00
committed by GitHub
parent b692b7ea14
commit b5f5e909bd
12 changed files with 141 additions and 26 deletions

View File

@ -4,7 +4,9 @@ SELECT
FROM
parameter_schemas
WHERE
job_id = $1;
job_id = $1
ORDER BY
index;
-- name: GetParameterSchemasCreatedAfter :many
SELECT * FROM parameter_schemas WHERE created_at > $1;
@ -27,7 +29,8 @@ INSERT INTO
validation_error,
validation_condition,
validation_type_system,
validation_value_type
validation_value_type,
index
)
VALUES
(
@ -46,5 +49,6 @@ VALUES
$13,
$14,
$15,
$16
$16,
$17
) RETURNING *;