Skip to content

Working directory path not created for tasks lacking inputFiles but having outputFiles #168

Open
@leighton-juno-bio

Description

@leighton-juno-bio

Describe the issue

With PodCreate tasks that lack an inputFiles directive but contain an outputFiles directive the working directory path does not exist. This behaviour is rescued by creating the working directory (mkdir {{workingDir}}) prior to writing.

id: outputfiles-without-inputfiles
namespace: test

tasks:
  - id: write-outputfile-from-pod
    type: io.kestra.plugin.kubernetes.PodCreate
    namespace: default
    resume: false
    outputFiles:
      - "*.txt"
    spec:
      containers:
      - name: file-writer
        image: debian:stable-slim
        command: ["/bin/sh"]
        args:
          - -c
          - >-
            echo "hello" > {{workingDir}}/hello.txt

Ideally, the user would be agnostic to kestra specific patterns and directory creation is managed by the framework.

I have only tested this on PodCreate tasks.

Environment

  • Kestra Version: develop
  • Deployed on kubernetes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/pluginPlugin-related issue or feature requestbugSomething isn't working

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions