chore: use static params when dynamic param metadata is missing (#17836)

Existing template versions do not have the metadata (modules + plan) in
the db. So revert to using static parameter information from the
original template import.

This data will still be served over the websocket.
This commit is contained in:
Steven Masley
2025-05-16 11:47:59 -05:00
committed by GitHub
parent fb0e3d64db
commit f36fb67f57
14 changed files with 558 additions and 251 deletions
+2 -2
View File
@@ -1214,8 +1214,8 @@ func (s *MethodTestSuite) TestTemplate() {
JobID: job.ID,
TemplateID: uuid.NullUUID{UUID: t.ID, Valid: true},
})
dbgen.TemplateVersionTerraformValues(s.T(), db, database.InsertTemplateVersionTerraformValuesByJobIDParams{
JobID: job.ID,
dbgen.TemplateVersionTerraformValues(s.T(), db, database.TemplateVersionTerraformValue{
TemplateVersionID: tv.ID,
})
check.Args(tv.ID).Asserts(t, policy.ActionRead)
}))