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

Cannot use folder as output artifact in master branch #1274

Closed
duboisf opened this issue Mar 21, 2019 · 0 comments · Fixed by #1275
Closed

Cannot use folder as output artifact in master branch #1274

duboisf opened this issue Mar 21, 2019 · 0 comments · Fixed by #1275
Milestone

Comments

@duboisf
Copy link
Contributor

duboisf commented Mar 21, 2019

Is this a BUG REPORT or FEATURE REQUEST?:

Bug report

What happened:

We updated argo to master branch (4bfbb20) and tried our workflow and it couldn't save an artifact from a folder.

What you expected to happen:

To be able to save a folder as an artifact like in version 2.2.1

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

cat <<EOF | argo --serviceaccount=basic-workflow submit --watch -
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: folder-artifact-
spec:
  entrypoint: artifact
  templates:
  - name: artifact
    steps:
    - - name: generate-artifact
        template: whalesay

  - name: whalesay
    container:
      image: docker/whalesay:latest
      command: [sh, -c]
      args: ["
        mkdir /tmp/result;
        cowsay hello world | tee /tmp/result/hello_world.txt;
        stat /tmp/result/hello_world.txt;
      "]
    outputs:
      artifacts:
      - name: hello-art
        path: /tmp/result
EOF
Name:                folder-artifact-qbvq9
Namespace:           argo
ServiceAccount:      basic-workflow
Status:              Failed
Message:             child 'folder-artifact-qbvq9-3898948278' failed
Created:             Thu Mar 21 13:15:05 -0400 (3 seconds ago)
Started:             Thu Mar 21 13:15:05 -0400 (3 seconds ago)
Finished:            Thu Mar 21 13:15:08 -0400 (now)
Duration:            3 seconds

STEP                      PODNAME                           DURATION  MESSAGE
 ✖ folder-artifact-qbvq9                                              child 'folder-artifact-qbvq9-3898948278' failed
 └---⚠ generate-artifact  folder-artifact-qbvq9-3898948278  2s        failed to save outputs: File or Artifact does not exist. /tmp/result

$ argo logs folder-artifact-qbvq9-3898948278
 _____________ 
< hello world >
 ------------- 
    \
     \
      \     
                    ##        .            
              ## ## ##       ==            
           ## ## ## ##      ===            
       /""""""""""""""""___/ ===        
  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~   
       \______ o          __/            
        \    \        __/             
          \____\______/   
  File: '/tmp/result/hello_world.txt'
  Size: 399             Blocks: 8          IO Block: 4096   regular file
Device: 10302h/66306d   Inode: 9445939     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2019-03-21 17:15:06.071716789 +0000
Modify: 2019-03-21 17:15:06.123717175 +0000
Change: 2019-03-21 17:15:06.123717175 +0000
 Birth: -

Environment:

  • Argo version:
    v2.2.1-92-g4bfbb20b
  • Kubernetes version :
$ kubectl version -o yaml
clientVersion:
  buildDate: 2019-01-16T18:24:45Z
  compiler: gc
  gitCommit: 51dd616cdd25d6ee22c83a858773b607328a18ec
  gitTreeState: clean
  gitVersion: v1.12.5
  goVersion: go1.10.7
  major: "1"
  minor: "12"
  platform: linux/amd64
serverVersion:
  buildDate: 2019-02-28T18:40:05Z
  compiler: gc
  gitCommit: 4e209c9383fa00631d124c8adcc011d617339b3c
  gitTreeState: clean
  gitVersion: v1.11.8
  goVersion: go1.10.8
  major: "1"
  minor: "11"
  platform: linux/amd64

Other debugging information (if applicable):

  • executor logs:
$ kubectl logs folder-artifact-qbvq9-3898948278 -c wait
time="2019-03-21T17:15:06Z" level=info msg="Creating a docker executor"
time="2019-03-21T17:15:06Z" level=info msg="Executor (version: v2.3.0+4bfbb20.dirty, build_date: 2019-03-19T19:56:58Z) initialized with template:\narchiveLocation:\n  s3:\n    accessKeySecret:\n
 key: accessKey\n      name: artifacts-repo\n    bucket: ***********\n    key: argo/2019/03/21/folder-artifact-qbvq9/folder-artifact-qbvq9-3898948278\n    region: us-east-1\n    secretKeySecret:\n      key: secretKey\n      name: artifacts-repo\ncontainer:\n  args:\n  - ' mkdir /tmp/result; cowsay hello world | tee /tmp/result/hello_world.txt; stat\n    /tmp/result/hello_world.txt; '\n  command:\n  - sh\n  - -c\n  image: docker/whalesay:latest\n  name: \"\"\n  resources: {}\ninputs: {}\nmetadata: {}\nname: whalesay\noutputs:\n
artifacts:\n  - name: hello-art\n    path: /tmp/result\n"
time="2019-03-21T17:15:06Z" level=info msg="Waiting on main container"
time="2019-03-21T17:15:07Z" level=info msg="main container started with container ID: 309868c3f02b062f313d4db24918286150a348c4a64797394791c63c0402220c"
time="2019-03-21T17:15:07Z" level=info msg="Starting annotations monitor"
time="2019-03-21T17:15:07Z" level=info msg="docker wait 309868c3f02b062f313d4db24918286150a348c4a64797394791c63c0402220c"
time="2019-03-21T17:15:07Z" level=info msg="Starting deadline monitor"
time="2019-03-21T17:15:07Z" level=info msg="Main container completed"
time="2019-03-21T17:15:07Z" level=info msg="No sidecars"
time="2019-03-21T17:15:07Z" level=info msg="No output parameters"
time="2019-03-21T17:15:07Z" level=info msg="Saving output artifacts"
time="2019-03-21T17:15:07Z" level=info msg="Saving artifact: hello-art"
time="2019-03-21T17:15:07Z" level=info msg="Archiving 309868c3f02b062f313d4db24918286150a348c4a64797394791c63c0402220c:/tmp/result to /argo/outputs/artifacts/hello-art.tgz"
time="2019-03-21T17:15:07Z" level=info msg="sh -c docker cp -a 309868c3f02b062f313d4db24918286150a348c4a64797394791c63c0402220c:/tmp/result - | gzip > /argo/outputs/artifacts/hello-art.tgz"
time="2019-03-21T17:15:07Z" level=info msg="Annotations monitor stopped"
time="2019-03-21T17:15:07Z" level=warning msg="File or Artifact does not exist. /tmp/result"
time="2019-03-21T17:15:07Z" level=info msg="Alloc=3188 TotalAlloc=10850 Sys=70078 NumGC=4 Goroutines=7"
time="2019-03-21T17:15:07Z" level=fatal msg="File or Artifact does not exist. /tmp/result\ngithub.com/argoproj/argo/errors.New\n\t/go/src/github.com/argoproj/argo/errors/errors.go:49\ngithub.com/argoproj/argo/errors.InternalError\n\t/go/src/github.com/argoproj/argo/errors/errors.go:60\ngithub.com/argoproj/argo/workflow/executor/docker.(*DockerExecutor).CopyFile\n\t/go/src/github.com/argoproj/argo/workflow/executor/docker/docker.go:59\ngithub.com/argoproj/argo/workflow/executor.(*WorkflowExecutor).saveArtifact\n\t/go/src/github.com/argoproj/argo/workflow/executor/executor.go:233\ngithub.com/argoproj/argo/workflow/executor.(*WorkflowExecutor).SaveArtifacts\n\t/go/src/github.com/argoproj/argo/workflow/executor/executor.go:212\ngithub.com/argoproj/argo/cmd/argoexec/commands.waitContainer\n\t/go/src/github.com/argoproj/argo/cmd/argoexec/commands/wait.go:50\ngithub.com/argoproj/argo/cmd/argoexec/commands.glob..func4\n\t/go/src/github.com/argoproj/argo/cmd/argoexec/commands/wait.go:19\ngithub.com/spf13/cobra.(*Command).execute\n\t/go/src/github.com/spf13/cobra/command.go:766\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/go/src/github.com/spf13/cobra/command.go:852\ngithub.com/spf13/cobra.(*Command).Execute\n\t/go/src/github.com/spf13/cobra/command.go:800\nmain.main\n\t/go/src/github.com/argoproj/argo/cmd/argoexec/main.go:17\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:201\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1333"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants