dvars in scopes

Similarly to the process that vars loading sequence, dvars in scopes follow the same sequence to be loaded from global group, then group, then instance id, then runtime global, then local scope in func

Demo

source

Main task yaml file
    scopes:
    - name: global
      vars:
        a: global-a
        b: global-b
        c: global-c
        e: global-e
      dvars:
      - name: da
        value: "{{.a}}"
      - name: dab
        value: "{{.a}}-and-{{.b}}"
    - name: nonprod
      members:
      - dev
      - staging
      vars:
        a: non-prod-a
        b: non-prod-b
        c: non-prod-c
        d: non-prod-d
      dvars:
      - name: dvar_np_a
        value: "{{.a}}"
      - name: dab
        value: "{{.a}}-and-{{.b}}"
    - name: staging
      vars:
        a: staging-a
        b: staging-b
    tasks:
    - name: task
      task:
      - func: shell
        do:
        - echo "cmd1:da -> {{.da}}"
        - echo "cmd2:dab -> {{.dab}}"
        - echo "cmd3:{{.dvar_np_a}}"
    
Main log file
    loading [Config]:  ./tests/functests/upconfig.yml
    Main config:
                 Version -> 1.0.0
                  RefDir -> ./tests/functests
                 WorkDir -> cwd
              AbsWorkDir -> /up_project/up
                TaskFile -> c0029
                 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/c0029
    module: [self], instance id: [dev], exec profile: []
    profile -  envVars:
    
    (*core.Cache)({
    })
    
    Task1: [task ==> task:  ]
    -Step1:
    self: final context exec vars:
    
    (*core.Cache)({
      "dvar_np_a": "non-prod-a",
      "c": "non-prod-c",
      "dab": "non-prod-a-and-non-prod-b",
      "b": "non-prod-b",
      "da": "global-a",
      "d": "non-prod-d",
      "e": "global-e",
      "up_runtime_task_layer_number": 0,
      "a": "non-prod-a"
    })
    
    cmd( 1):
    echo "cmd1:da -> {{.da}}"
    
    -
    cmd1:da -> global-a
    
    -
     .. ok
    cmd( 2):
    echo "cmd2:dab -> {{.dab}}"
    
    -
    cmd2:dab -> non-prod-a-and-non-prod-b
    
    -
     .. ok
    cmd( 3):
    echo "cmd3:{{.dvar_np_a}}"
    
    -
    cmd3:non-prod-a
    
    -
     .. ok
    . ok
    
Logs with different verbose level
Raw logs with different verbose level