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

Missing argocd binary from argocd-test-tools docker image #9459

Closed
2 of 3 tasks
cippaciong opened this issue May 20, 2022 · 4 comments · Fixed by #9467
Closed
2 of 3 tasks

Missing argocd binary from argocd-test-tools docker image #9459

cippaciong opened this issue May 20, 2022 · 4 comments · Fixed by #9467
Labels
bug Something isn't working

Comments

@cippaciong
Copy link
Contributor

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

While I was trying to run ArgoCD locally for development purposes, using the argocd-test-tools docker image as described in the docs, I found an issue adding private git repository because the argocd binary is missing from the image.

I was able to add the repository from the UI, but during the application creation, while referencing an helm dependency in a subpath of the repo, the dependency was not detected and I got this error in the logs

10:36:50 repo-server | ERRO[0126] finished unary call with code Internal error="rpc error: code = Internal desc = Failed to fetch default: 'git fetch origin --tags --force' failed exit status 128: error: cannot run argocd: No such file or directory\nfatal: could not read Username for 'https://gitlab.<company.tld>/': terminal prompts disabled" grpc.code=Internal grpc.method=GetAppDetails grpc.request.deadline="2022-05-18T10:37:49Z" grpc.service=repository.RepoServerService grpc.start_time="2022-05-18T10:36:49Z" grpc.time_ms=262.449 span.kind=server system=grpc

The problem exists only when running locally because the argocd binary is missing from the argocd-test-tools docker image but not from quay.io/argoproj/argocd

Would be acceptable to change the argocd-test-tool image to also include the argocd binary?

To Reproduce

Follow the steps from Running ArgoCD locally and try to create an application from a private git repository

Logs

10:36:49    api-server | INFO[0126] received unary call /repository.RepositoryService/GetAppDetails  grpc.method=GetAppDetails grpc.request.claims=null grpc.request.content="source:<repoURL:\"https://gitlab.<company.tld>/<path>\" path:\"environments/dhl-helm-oc\" targetRevision:\"HEAD\" chart:\"\" > appName:\"fadsfas\" appProject:\"default\" " grpc.service=repository.RepositoryService grpc.start_time="2022-05-18T10:36:49Z" span.kind=server system=grpc
10:36:49    api-server | DEBU[0126] https://gitlab.<company.tld>/<path> has credentials
10:36:49   repo-server | DEBU[0126] symbolic reference 'HEAD' (refs/heads/main) resolved to 'c6d6baa3fa1095fc8f38190b49d21d48edf00e9f'
10:36:49   repo-server | INFO[0126] app details cache miss: c6d6baa3fa1095fc8f38190b49d21d48edf00e9f/&ApplicationSource{RepoURL:https://gitlab.<company.tld>/<path>,Path:environments/dhl-helm-oc,TargetRevision:HEAD,Helm:nil,Kustomize:nil,Ksonnet:nil,Directory:nil,Plugin:nil,Chart:,}
10:36:49   repo-server | DEBU[0126] Successfully restored read/write/execute permissions on /tmp/_argocd-repo/a34fb0a4-3f65-4a8f-a50b-cfd4ebd93f26
10:36:49   repo-server | INFO[0126] git fetch origin --tags --force               dir=/tmp/_argocd-repo/a34fb0a4-3f65-4a8f-a50b-cfd4ebd93f26 execID=50acf
10:36:50   repo-server | DEBU[0126]                                               duration=261.798617ms execID=50acf
10:36:50   repo-server | ERRO[0126] `git fetch origin --tags --force` failed exit status 128: error: cannot run argocd: No such file or directory
10:36:50   repo-server | fatal: could not read Username for 'https://gitlab.<company.tld>': terminal prompts disabled  execID=50acf
10:36:50   repo-server | INFO[0126] Trace args="[git fetch origin --tags --force]" dir=/tmp/_argocd-repo/a34fb0a4-3f65-4a8f-a50b-cfd4ebd93f26 operation_name="exec git" time_ms=261.886966
10:36:50   repo-server | ERRO[0126] finished unary call with code Internal        error="rpc error: code = Internal desc = Failed to fetch default: `git fetch origin --tags --force` failed exit status 128: error: cannot run argocd: No such file or directory\nfatal: could not read Username for 'https://gitlab.<company.tld>': terminal prompts disabled" grpc.code=Internal grpc.method=GetAppDetails grpc.request.deadline="2022-05-18T10:37:49Z" grpc.service=repository.RepoServerService grpc.start_time="2022-05-18T10:36:49Z" grpc.time_ms=262.449 span.kind=server system=grpc
10:36:50    api-server | ERRO[0126] finished unary call with code Internal        error="rpc error: code = Internal desc = Failed to fetch default: `git fetch origin --tags --force` failed exit status 128: error: cannot run argocd: No such file or directory\nfatal: could not read Username for 'https://gitlab.<company.tld>': terminal prompts disabled" grpc.code=Internal grpc.method=GetAppDetails grpc.service=repository.RepositoryService grpc.start_time="2022-05-18T10:36:49Z" grpc.time_ms=265.161 span.kind=server system=grpc
@cippaciong cippaciong added the bug Something isn't working label May 20, 2022
@crenshaw-dev
Copy link
Collaborator

Would be acceptable to change the argocd-test-tool image to also include the argocd binary?

I can't think of a reason why it wouldn't be acceptable. Might slow down the test container build a bit, but seems like a worthwhile tradeoff.

@cippaciong
Copy link
Contributor Author

@crenshaw-dev I just pushed a possible fix in #9467, let me know what you think about it

@jannfis
Copy link
Member

jannfis commented May 20, 2022

Hi. The test tools image should not contain any of the Argo CD binaries, but rather build it upon start-up. The only thing that the image should contain is the build and execution environment.

So probably, the right thing to do would be to make the cli-local target a dependency of start, and then add the dist directory to the environment's $PATH.

cippaciong added a commit to DataHow/argo-cd that referenced this issue May 23, 2022
)

Signed-off-by: Tommaso Sardelli <lacapannadelloziotom@gmail.com>
@cippaciong
Copy link
Contributor Author

@jannfis thanks for the feedback, I updated #9467 to follow your approach.

jannfis pushed a commit that referenced this issue May 24, 2022
)

Signed-off-by: Tommaso Sardelli <lacapannadelloziotom@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants