workflow skeleton

When you are developing your workflow and try to achieve it step by step, you do not need to put the detailed and trivals programming code precisely in one go. You could lay the basic building blocks by puting main task, the callee(dependant) tasks for implementation there. You don’t have to put detailed step and concrete implmentation, as shown in this demo, you can leave the do element empty.

In fact, for certain steps, their jobs are probably just to do data transformation

Demo

source

Main task yaml file
    tasks:
    - name: task
      task:
      - func: shell
        do: []
      - func: shell
        #this would be totally fine
        #this step could be served as skeleton work as DESIGN step
        #and leave the implementation in future to be filled in
        #you can add desc field to describe what to plan to implement
      - func: shell
        desc: |
          this would be totally fine too without shell commands
          this step could be served as a intermediate step to
          register a var into global var map, and it will be
          avaiable after the next step
        vars:
          a: aa
          b: bb
        dvars:
        - name: adebug
          value: "{{.a}}"
          flags: [vvvv]
      - func: cmd
        desc: |
          in cmd, you can also do reg/deReg var in dvar evaluation
          the cmd func name makes more sense then shell func
          if you really want to do var manipulation only
        vars:
          c: cc
          d: dd
        dvars:
        - name: cdebug
          value: "{{.c}}"
          flags: [vvvv]
    
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 -> c0043
                 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/c0043
    module: [self], instance id: [dev], exec profile: []
    profile -  envVars:
    
    (*core.Cache)({
    })
    
    Task1: [task ==> task:  ]
    -Step1:
    self: final context exec vars:
    
    (*core.Cache)({
      "up_runtime_task_layer_number": 0
    })
    
    . ok
    -Step2:
    self: final context exec vars:
    
    (*core.Cache)({
      "up_runtime_task_layer_number": 0,
      "last_result": (*utils.ExecResult)({
        Cmd: "",
        Code: 0,
        Output: "",
        ErrMsg: ""
      })
    })
    
     WARN: [shell] - [Not implemented or void for no action!]
    . ok
    -Step3: [
    this would be totally fine too without shell commands
    this step could be served as a intermediate step to
    register a var into global var map, and it will be
    avaiable after the next step
    ]
    dvar> adebug:
    "aa"
    
    -
    aa
    self: final context exec vars:
    
    (*core.Cache)({
      "last_result": (*utils.ExecResult)({
        Cmd: "",
        Code: 0,
        Output: "",
        ErrMsg: ""
      }),
      "up_runtime_task_layer_number": 0,
      "a": "aa",
      "b": "bb",
      "adebug": "aa"
    })
    
     WARN: [shell] - [Not implemented or void for no action!]
    . ok
    -Step4: [
    in cmd, you can also do reg/deReg var in dvar evaluation
    the cmd func name makes more sense then shell func
    if you really want to do var manipulation only
    ]
    dvar> cdebug:
    "cc"
    
    -
    cc
    self: final context exec vars:
    
    (*core.Cache)({
      "c": "cc",
      "d": "dd",
      "cdebug": "cc",
      "last_result": (*utils.ExecResult)({
        Cmd: "",
        Code: 0,
        Output: "",
        ErrMsg: ""
      }),
      "up_runtime_task_layer_number": 0
    })
    
     WARN: [cmd] - [Not implemented or void for no action!]
    
Logs with different verbose level
Raw logs with different verbose level