testcase1 for block

A testcase to show multiple layers of call to invoke a block code

Demo

source

Main task yaml file
    vars:
      a: global_aaa
      b: global_bbb
      c: global_ccc
    tasks:
    - 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_task1
    - name: callee_task2
      task:
      - func: block
        vars:
          a: callee_aaa_callee_task2
        dvars:
        - name: db
          value: callee_db_callee_task2
        do:
        - func: cmd
          do:
          - name: print
            cmd: |
              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_callee_task1" }}'
            - '{{eq .db "callee_db_callee_task2" }}'
            flags: [failFast]
    - name: callee_task1
      task:
      - func: call
        vars:
          a: local_aaa_callee_task1
          b: local_bbb_callee_task1
        dvars:
        - name: da
          value: local_da_callee_task1
        - name: db
          value: local_db_callee_task1
        do:
        - callee_task2
    
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 -> c0136
                 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/c0136
    module: [self], instance id: [dev], exec profile: []
    profile -  envVars:
    
    (*core.Cache)({
    })
    
    Task1: [task ==> task:  ]
    -Step1:
    self: final context exec vars:
    
    (*core.Cache)({
      "db": "local_db",
      "b": "local_bbb",
      "c": "global_ccc",
      "a": "local_aaa",
      "up_runtime_task_layer_number": 0,
      "da": "local_da"
    })
    
    =Task3: [task ==> callee_task1:  ]
    --Step1:
    self: final context exec vars:
    
    (*core.Cache)({
      "up_runtime_task_layer_number": 1,
      "da": "local_da_callee_task1",
      "db": "local_db_callee_task1",
      "c": "global_ccc",
      "a": "local_aaa",
      "b": "local_bbb"
    })
    
    ==Task2: [task/callee_task1 ==> callee_task2:  ]
    ---Step1:
    self: final context exec vars:
    
    (*core.Cache)({
      "da": "local_da_callee_task1",
      "db": "callee_db_callee_task2",
      "c": "global_ccc",
      "b": "local_bbb",
      "a": "local_aaa",
      "up_runtime_task_layer_number": 2
    })
    
    ---Step1:
    self: final context exec vars:
    
    (*core.Cache)({
      "c": "global_ccc",
      "a": "local_aaa",
      "b": "local_bbb",
      "up_runtime_task_layer_number": 2,
      "da": "local_da_callee_task1",
      "db": "callee_db_callee_task2"
    })
    
    ~~~SubStep1: [print:  ]
    a: local_aaa
    b: local_bbb
    c: global_ccc
    da: local_da_callee_task1
    db: callee_db_callee_task2
    
    ~~~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_callee_task1" }}]
     5 ASSERT OK:     [{{eq .db "callee_db_callee_task2" }}]
    
Logs with different verbose level
Raw logs with different verbose level