chore: Update resource pool resolution & validation
for launcher-provided resource pools
@@ -111,9 +111,6 @@ func (a *apiServer) getCommandLaunchParams(ctx context.Context, req *protoComman
// Get the full configuration.
config := model.DefaultConfig(&taskSpec.TaskContainerDefaults)
- // Copy discovered (default) resource pool name and slot count.
- config.Resources.ResourcePool = poolName
- config.Resources.Slots = resources.Slots
workDirInDefaults := config.WorkDir
if req.TemplateName != "" {
@@ -137,6 +134,10 @@ func (a *apiServer) getCommandLaunchParams(ctx context.Context, req *protoComman
"unable to decode the merged config: %s", string(configBytes)).Error())
}
}
+ // Copy discovered (default) resource pool name and slot count.
+ config.Resources.ResourcePool = poolName
+ config.Resources.Slots = resources.Slots
+
if req.MustZeroSlot {
config.Resources.Slots = 0
}
