Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UploadFiles to Namespace Files does not work correctly #6304

Open
wrussell1999 opened this issue Dec 4, 2024 · 0 comments
Open

UploadFiles to Namespace Files does not work correctly #6304

wrussell1999 opened this issue Dec 4, 2024 · 0 comments
Assignees
Labels
area/backend Needs backend code changes area/frontend Needs frontend code changes bug Something isn't working

Comments

@wrussell1999
Copy link
Member

Describe the issue

I have a namespace file called myfile.txt. I was unable to write to it / overwrite it using the UploadFiles task. This was a common occurrence at the HackFrost hackathon that took place last week too.

id: files
namespace: company.team

tasks:
  - id: python_output
    type: io.kestra.plugin.scripts.python.Script
    namespaceFiles:
      enabled: true
    taskRunner:
      type: io.kestra.plugin.core.runner.Process
    outputFiles:
      - "*.txt"
    script: |
      with open("myfile.txt", "a") as f:
        f.write("Hi, this is output from a script 👋")

  - id: save_file
    type: io.kestra.plugin.core.namespace.UploadFiles
    files:
      - "{{ outputs.python_output.outputFiles['myfile.txt'] }}"
    namespace: "{{ flow.namespace }}"

  - id: read_output
    type: io.kestra.plugin.core.log.Log
    message: "{{ read(outputs.python_output.outputFiles['myfile.txt']) }}"

This also didn't work if myfile.txt didn't exist in the first place.

Environment

  • Kestra Version: develop
@wrussell1999 wrussell1999 added bug Something isn't working area/backend Needs backend code changes area/frontend Needs frontend code changes labels Dec 4, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Issues Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend Needs backend code changes area/frontend Needs frontend code changes bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

2 participants