It should override vars in callee’s task, however inherits all vars from vars within block func
vars:
a: global_aaa
b: global_bbb
c: global_ccc
tasks:
- name: callee_task
task:
- func: block
vars:
a: callee_aaa
dvars:
- name: db
value: callee_db
do:
- func: cmd
do:
- name: print
cmd: |
layer 1
up_runtime_task_layer_number: {{.up_runtime_task_layer_number}}
a: {{.a}}
b: {{.b}}
c: {{.c}}
da: {{.da}}
db: {{.db}}
- name: assert
cmd:
- '{{eq .a "local_aaa" }}'
- '{{eq .b "local_bbb" }}'
- '{{eq .c "global_ccc" }}'
- '{{eq .da "local_da" }}'
- '{{eq .db "callee_db" }}'
flags: [failFast]
- name: task
task:
- func: call
vars:
a: local_aaa
b: local_bbb
dvars:
- name: da
value: local_da
- name: db
value: local_db
do:
- callee_task
loading [Config]: ./tests/functests/upconfig.yml
Main config:
Version -> 1.0.0
RefDir -> ./tests/functests
WorkDir -> cwd
AbsWorkDir -> /up_project/up
TaskFile -> c0135
Verbose -> vvv
ModuleName -> self
ShellType -> /bin/sh
MaxCallLayers -> 8
Timeout -> 3600000
MaxModuelCallLayers -> 256
EntryTask -> task
ModRepoUsernameRef ->
ModRepoPasswordRef ->
work dir: /up_project/up
-exec task: task
loading [Task]: ./tests/functests/c0135
module: [self], instance id: [dev], exec profile: []
profile - envVars:
(*core.Cache)({
})
Task2: [task ==> task: ]
-Step1:
self: final context exec vars:
(*core.Cache)({
"a": "local_aaa",
"up_runtime_task_layer_number": 0,
"da": "local_da",
"db": "local_db",
"b": "local_bbb",
"c": "global_ccc"
})
=Task1: [task ==> callee_task: ]
--Step1:
self: final context exec vars:
(*core.Cache)({
"up_runtime_task_layer_number": 1,
"da": "local_da",
"db": "callee_db",
"a": "local_aaa",
"b": "local_bbb",
"c": "global_ccc"
})
--Step1:
self: final context exec vars:
(*core.Cache)({
"c": "global_ccc",
"a": "local_aaa",
"up_runtime_task_layer_number": 1,
"da": "local_da",
"db": "callee_db",
"b": "local_bbb"
})
~~SubStep1: [print: ]
layer 1
up_runtime_task_layer_number: 1
a: local_aaa
b: local_bbb
c: global_ccc
da: local_da
db: callee_db
~~SubStep2: [assert: ]
1 ASSERT OK: [{{eq .a "local_aaa" }}]
2 ASSERT OK: [{{eq .b "local_bbb" }}]
3 ASSERT OK: [{{eq .c "global_ccc" }}]
4 ASSERT OK: [{{eq .da "local_da" }}]
5 ASSERT OK: [{{eq .db "callee_db" }}]