clowdhaus / argo-cd-action

GitHub action for executing Argo CD 🦑
Apache License 2.0
77 stars 14 forks source link

v1.9.0 fails to run #12

Open cenobitedk opened 2 years ago

cenobitedk commented 2 years ago

Describe the bug v1.9.0 fails to run.

Our workflow is set up like the documentation instructs instruct: uses: clowdhaus/argo-cd-action@main, which will use latest version. However the workflow startet to fail today, and I can see that v1.9.0 was released yesterday.

Run clowdhaus/argo-cd-action@main
Destination file path /home/github/argocd already exists
Waiting 17 seconds before trying again
Destination file path /home/github/argocd already exists
Waiting 16 seconds before trying again
Error: Destination file path /home/github/argocd already exists

To Reproduce Steps to reproduce the behavior:

  1. set up a workflow that uses this action
  2. run it multiple times and it should fail on subsequent runs

Expected behavior The script will execute as usual, without errors

Screenshots image

Additional context Running as a github runner on a selfhosted runner using https://github.com/SanderKnape/github-runner

bryantbiggs commented 2 years ago

could you expand the output from the argo-cd-action step? it would also help if you could re-run with debug output to see any additional information

cenobitedk commented 2 years ago
...
##[debug]'
##[debug]Loading env
Run clowdhaus/argo-cd-action@v1.9.0
  with:
    options: --grpc-web --auth-token *** --server argo-cd.lqd.dk:443

    command: app create selfservice-web-application-test-baea616 --upsert --sync-policy auto --self-heal --repo git@github.com:nuuday/business-selfservice-helm-charts.git --path selfservice-web-application --values values-test.yaml --dest-namespace business-selfservice-test --dest-server https://api-knet.lqd.dk --project business-selfservice --parameter image.tag=baea616-20220207T102429 --parameter image.name=selfservice-web-application-test --parameter service.name=selfservice-web-application-test-baea616 --parameter service.ingress.rules.host=selvbetjening-test-baea616.knet.lqd.dk

    version: 2.2.4
  env:
    IMAGE_NAME: selfservice-web-application-test
    ARTIFACT_IMAGE_NAME: selfservice-web-application
    SHA: baea616409c2d1b3a452db2f2ba99afc8bbcbb[84](https://github.com/nuuday/tdc-selfservice/runs/5091483593?check_suite_focus=true#step:4:84)
    ID: baea616
    TAG: baea616-20220207T102429
    GITHUB_TOKEN: ***
##[debug][index] command: app,create,selfservice-web-application-test-baea616,--upsert,--sync-policy,auto,--self-heal,--repo,git@github.com:nuuday/business-selfservice-helm-charts.git,--path,selfservice-web-application,--values,values-test.yaml,--dest-namespace,business-selfservice-test,--dest-server,https://api-knet.lqd.dk/,--project,business-selfservice,--parameter,image.tag=baea616-20220207T[102](https://github.com/nuuday/tdc-selfservice/runs/5091483593?check_suite_focus=true#step:4:102)429,--parameter,image.name=selfservice-web-application-test,--parameter,service.name=selfservice-web-application-test-baea616,--parameter,service.ingress.rules.host=selvbetjening-test-baea616.knet.lqd.dk
##[debug][index] options: --grpc-web,--auth-token,***
##[debug][index] version: 2.2.4
##[debug]isExplicit: 2.2.4
##[debug]explicit? true
##[debug]checking cache: /home/github/_work/_tool/argocd/2.2.4/x64
##[debug]not found
##[debug]Unable to find "argocd" executable, downloading it now
##[debug][debug()] getExecutableUrl: https://github.com/argoproj/argo-cd/releases/download/v2.2.4/argocd-linux-amd64
##[debug]Downloading https://github.com/argoproj/argo-cd/releases/download/v2.2.4/argocd-linux-amd64
##[debug]Destination /home/github/argocd
Destination file path /home/github/argocd already exists
Waiting 14 seconds before trying again
Destination file path /home/github/argocd already exists
Waiting 14 seconds before trying again
Error: Destination file path /home/github/argocd already exists
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Run clowdhaus/argo-cd-action@v1.9.0

I hope this is enough. I didn't include the debug out before the action, cause it only seem to relate to setting up env vars.

cenobitedk commented 2 years ago
~/_work/_tool$ ls -R    
.:
argocd

./argocd:
2.2.3

./argocd/2.2.3:
x64  x64.complete

./argocd/2.2.3/x64:
argocd

This is the content of the _tool folder

cenobitedk commented 2 years ago

@bryantbiggs Let me know if you need more information

rafael-rsr commented 2 years ago

Hello, has this issue been completed? I am having the same problem. Thank you

olegandreyev commented 2 years ago

Issue is still relevant, seems it crashes after downloading argo version

[debug]Unable to find "argocd" executable, downloading it now

[debug][debug()] getExecutableUrl: https://github.com/argoproj/argo-cd/releases/download/v2.2.4/argocd-linux-amd64

[debug]Downloading https://github.com/argoproj/argo-cd/releases/download/v2.2.4/argocd-linux-amd64

[debug]Destination /home/github/argocd

Destination file path /home/github/argocd already exists

Downloading tool can't save argo client because directory exists

nxc933 commented 1 year ago

This issue still is present as of 1.16.0. running rm -f /home/runner/argocd on each run seems to fix this, but shouldn't be necessary. @bryantbiggs