You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In variant 0.33.0, having a parameter in one task and another task with the same name does not work right.
With file named x containing:
#!/usr/bin/variant
tasks:
major:
description: "Task with subtasks"
tasks:
subtask:
description: "subtask"
parameters:
- name: namespace
description: "Namespace to use"
default: "global"
type: string
required: false
script:
- echo "subtask with namespace {{ get "namespace" }}"
namespace:
description: "Create/destroy namespace"
tasks:
create:
description: "Create namespace"
parameters:
- name: namespace
description: "Namespace to annotate"
type: string
required: true
script:
- echo Created namespace "{{ get "namespace" }}"
Running this fails if you do not provide a namespace, even though a default namespace is specified for the major subtask
$ x major subtask foo
x ≫ starting task major.subtask
subtask with namespace foo
$ x namespace create foo
x ≫ starting task namespace.create
Created namespace foo
$ x major --namespace foo subtask
x ≫ starting task major.subtask
subtask with namespace foo
$ x major subtask
x.major.subtask ≫ one or more inputs are not valid in vars:
map[args:[] cmd:./x env:dev namespace:<nil>]:
x.major.subtask ≫ one or more inputs are not valid in varsDumo:
{
"args": [],
"cmd": "./x",
"env": "dev",
"namespace": null
}:
x.major.subtask ≫ one or more inputs are not valid in kv:
{
"args": [],
"cmd": "./x",
"env": "dev",
"namespace": null
}:
x.major.subtask ≫ - namespace: Invalid type. Expected: string, given: null
The text was updated successfully, but these errors were encountered:
@Nuru Hey! This seems like a regression. Ideally this shouldn't fail as you do provide the default namespace for the major task. I'll take a deeper look soon.
In
variant
0.33.0, having a parameter in one task and another task with the same name does not work right.With file named
x
containing:Running this fails if you do not provide a namespace, even though a default namespace is specified for the
major subtask
The text was updated successfully, but these errors were encountered: