@@ -220,6 +220,10 @@ func (server *Server) AcquireJob(ctx context.Context, _ *proto.Empty) (*proto.Ac
220
220
if err != nil {
221
221
return nil , failJob (fmt .Sprintf ("get template version: %s" , err ))
222
222
}
223
+ templateVariables , err := server .Database .GetTemplateVersionVariables (ctx , templateVersion .ID )
224
+ if err != nil && ! xerrors .Is (err , sql .ErrNoRows ) {
225
+ return nil , failJob (fmt .Sprintf ("get template version variables: %s" , err ))
226
+ }
223
227
224
228
// Compute parameters for the dry-run to consume.
225
229
parameters , err := parameter .Compute (ctx , server .Database , parameter.ComputeScope {
@@ -242,6 +246,7 @@ func (server *Server) AcquireJob(ctx context.Context, _ *proto.Empty) (*proto.Ac
242
246
TemplateDryRun : & proto.AcquiredJob_TemplateDryRun {
243
247
ParameterValues : protoParameters ,
244
248
RichParameterValues : convertRichParameterValues (input .RichParameterValues ),
249
+ VariableValues : asVariableValues (templateVariables ),
245
250
Metadata : & sdkproto.Provision_Metadata {
246
251
CoderUrl : server .AccessURL .String (),
247
252
WorkspaceName : input .WorkspaceName ,
@@ -1275,7 +1280,6 @@ type TemplateVersionDryRunJob struct {
1275
1280
WorkspaceName string `json:"workspace_name"`
1276
1281
ParameterValues []database.ParameterValue `json:"parameter_values"`
1277
1282
RichParameterValues []database.WorkspaceBuildParameter `json:"rich_parameter_values"`
1278
- UserVariableValues []codersdk.VariableValue `json:"user_variable_values"`
1279
1283
}
1280
1284
1281
1285
// ProvisionerJobLogsNotifyMessage is the payload published on
0 commit comments