Skip to content

A workflow command cannot be executed if it is of the shell type and the shell environment is cleared. #1718

@Daniel-Marynicz

Description

@Daniel-Marynicz

Describe the Bug

When i have workflow command with type shell then i have always error

DEBU Executing workflow step step=0 name=step1 command=env
DEBU Executing command=env
"env": executable file not found in $PATH

I suspect that the PATH variable is being deleted/cleared when attempting to launch the workflow. The documentation does not mention anything about having to set it.

Expected Behavior

Workflow should run like in shell.

Steps to Reproduce

create stacks/workflows/workflow1.yaml file
with content like

workflows:
  test-1:
    description: "Test workflow"
    steps:
      - command: env
        name: step1
        type: shell

and try execute this workflow

DEBU Set logs-level=debug logs-file=/dev/stderr
DEBU Executing workflow workflow=test-1 path=stacks/workflows/workflow1.yaml
DEBU PrintAsYAMLToFileDescriptor
  data=
  │ description: Test workflow
  │ steps:
  │   - name: step1
  │     command: env
  │     type: shell

DEBU Executing workflow step step=0 name=step1 command=env
DEBU Executing command=env
"env": executable file not found in $PATH
DEBU Workflow failed error="subcommand exited with code 127"

 Workflow Error 

 workflow step execution failed

## Explanation

 The following command failed to execute:

 env

 To resume the workflow from this step, run:

 atmos workflow test-1 -f workflow1 --from-step step1

This was working as expeted in version 1.189.0-1
but in latest version is broken.

if i create command like

workflows:
  test-1:
    description: "Test workflow"
    steps:
      - command: echo "Command 1"
        name: step1
        type: shell

Then worklow running as expected... Without any errors

Screenshots

No response

Environment

  • OS Ubuntu 24.04.3 LTS
  • atmos 1.195.0

When i downgrade atmos to 1.189.0 then this works as expected.

Additional Context

No response

Metadata

Metadata

Assignees

Labels

bug🐛 An issue with the system

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions