Skip to content

param eval unexpected behavior #2032

@pommetjehorlepiep

Description

@pommetjehorlepiep

Dagu version: 2.5.0
Dagu deployed using Helm chart on k8s (running with 5 worker nodes)

Problem

Unset parameter not set with value of eval

Definition used to show problem

description: Test - Param

params:
  - name: sharedWorkDir
    eval: "$DAG_RUN_WORK_DIR"

steps:
  - name: echo DAG_RUN_WORK_DIR
    command: echo "DAG_RUN_WORK_DIR=${DAG_RUN_WORK_DIR}"

  - name: echo sharedWorkDir
    command: echo "sharedWorkDir=${sharedWorkDir}"

Output

Actual

Step 1
DAG_RUN_WORK_DIR=/data/dag-runs/test-param/dag-runs/2026/04/23/dag-run_20260423_014058Z_019db7ff-59bf-796c-8834-2c45a5faae66/work
Step 2
sharedWorkDir=

Expected

Step 1
DAG_RUN_WORK_DIR=/data/dag-runs/test-param/dag-runs/2026/04/23/dag-run_20260423_014058Z_019db7ff-59bf-796c-8834-2c45a5faae66/work
Step 2
sharedWorkDir=/data/dag-runs/test-param/dag-runs/2026/04/23/dag-run_20260423_014058Z_019db7ff-59bf-796c-8834-2c45a5faae66/work

Additional comments

Initially, the dialog to manually run the dag looks as followed:

Image

When you enter a value you get another option to unset it:

Image

Weird thing I noticed is that sometimes just entering a value and then unset sort of fixed it and sharedWorkDir got populated as expected (but can be a fluke...)
Maybe this is something related to the environment parameter being set/not set at the time.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions