defenseunicorns / maru-runner

The Unicorn Task Runner
Apache License 2.0
11 stars 1 forks source link

Included task variable defaults don't carry into parent tasks #121

Closed Racer159 closed 1 month ago

Racer159 commented 5 months ago

Environment

Device and OS: popOS 22.04 App version: v0.2.1 Kubernetes distro being used: N/A Other: N/A

Steps to reproduce

  1. Create two task files like the below:

tasks.yaml:

includes:
  - incl: ./include.yaml

include.yaml:

variables:
  - name: ECHO
    default: kitteh

tasks:
  - name: echo
    actions:
      - cmd: echo $ECHO
  1. Run the included task with maru run incl:echo

Expected result

kitteh is echoed

Actual Result

Nothing is echoed

Visual Proof (screenshots, videos, text, etc)

image

Severity/Priority

Medium - --set still works but this is likely not expected behavior for defaults

Additional Context

Currently affecting uds-common lula lint task: https://github.com/defenseunicorns/uds-common/pull/147

meganwolf0 commented 2 months ago

Sanity Check @Racer159 - I think I ran into this issue and was going to file a bug but I believe it's the same: From UDS-Core, running uds run deploy:k3d-standard-bundle --set FLAVOR=unicorn resulted in an unset VERSION (even though it has a default value?) So I also had to set version in the command, which seemed like not the intended behavior.

Racer159 commented 1 month ago

@meganwolf0 sorry for the delay but yes that sounds like this issue - also closing this since this was resolved in https://github.com/defenseunicorns/maru-runner/releases/tag/v0.3.0