Skip to content

Commit 030bb36

Browse files
committed
[core] Allow parametrizing launch time values for all tasks
1 parent b7941dd commit 030bb36

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

core/task/task.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,15 @@ func (t *Task) BuildTaskCommand(role parentRole) (err error) {
165165
// If it's a basic task, we parametrize its arguments
166166
// TODO: the task payload should be shipped on CONFIGURE and not on deployment,
167167
// because this way we cannot reconfigure a basic task
168-
if class.Control.Mode == controlmode.BASIC {
168+
// FIXME: normally we should only allow parametrizing launch-time options such
169+
// as the command value and argument for BASIC tasks, as they get
170+
// unique classes.
171+
// In order to support non-trivial QC workflows we temporarily allow
172+
// parametrizing these values for all control modes.
173+
// THIS BREAKS TASK CLASS REUSE! See OCTRL-227
174+
if class.Control.Mode == controlmode.BASIC ||
175+
class.Control.Mode == controlmode.DIRECT ||
176+
class.Control.Mode == controlmode.FAIRMQ {
169177
var varStack map[string]string
170178
varStack, err = role.ConsolidatedVarStack()
171179
if err != nil {
@@ -193,7 +201,6 @@ func (t *Task) BuildTaskCommand(role parentRole) (err error) {
193201
if err != nil {
194202
t.commandInfo = &common.TaskCommandInfo{}
195203
log.WithError(err).Error("cannot resolve templates for task command info")
196-
return
197204
}
198205
}
199206

0 commit comments

Comments
 (0)