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

Output artifact in same location as optional input artifact is not saved #1750

Closed
samath117 opened this issue Nov 8, 2019 · 4 comments · Fixed by #3029
Closed

Output artifact in same location as optional input artifact is not saved #1750

samath117 opened this issue Nov 8, 2019 · 4 comments · Fixed by #3029
Assignees
Labels

Comments

@samath117
Copy link

samath117 commented Nov 8, 2019

Is this a BUG REPORT or FEATURE REQUEST?: BUG REPORT

What happened: When an output artifact location matches that of an optional input artifact which is not supplied, the output artifact fails to save properly. This is related to #1503 and #1660.

How to reproduce it (as minimally and precisely as possible):

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: optional-input-output-artifact-same-location-
spec:
  entrypoint: plan
  templates:
  - name: plan
    steps:
    - - name: write
        template: file
    - - name: read
        template: file
        arguments:
          artifacts:
          - name: file
            from: "{{steps.write.outputs.artifacts.file}}"
  - name: file
    inputs:
      artifacts:
      - name: file
        path: /tmp/file1.txt
        optional: true
    container:
      image: alpine:latest
      command: [sh, -c]
      args: ["echo 'test' > /tmp/file1.txt"]
    outputs:
      artifacts:
      - name: file
        path: /tmp/file1.txt

When this is run, the write step passes, but the read step fails with this message: inputs.artifacts.file was not supplied. If the location of the optional input file is changed to /tmp/file2.txt, then both steps pass. This indicates that the output artifact is failing to save properly, but isn't raising an error in the process even though it isn't labeled as optional.

Environment: Argo version: 2.4.1

@samath117 samath117 changed the title Output artifacts in same location as optional input artifact is not saved Output artifact in same location as optional input artifact is not saved Nov 8, 2019
@samath117
Copy link
Author

Update: In v2.7.5, this example still fails, but on the write step and with a different error:
failed to save outputs: stat /mainctrfs/tmp/file1.txt: no such file or directory

@simster7 simster7 self-assigned this Apr 23, 2020
@alexec
Copy link
Contributor

alexec commented May 13, 2020

@simster7 are you looking into this please? If not, I would like to.

@simster7
Copy link
Member

simster7 commented May 13, 2020

Yes I am, was planning to start on this after closing my open PRs

@alexec
Copy link
Contributor

alexec commented May 13, 2020

Cool- Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants