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

app create --upsert does not auto refresh repository any longer #7800

Closed
3 tasks done
itewk opened this issue Nov 29, 2021 · 2 comments
Closed
3 tasks done

app create --upsert does not auto refresh repository any longer #7800

itewk opened this issue Nov 29, 2021 · 2 comments
Labels
bug Something isn't working works-for-me Works as intended, or unable to reproduce

Comments

@itewk
Copy link
Contributor

itewk commented Nov 29, 2021

If you are trying to resolve an environment-specific issue or have a one-off question about the edge case that does not require a feature then please consider asking a question in argocd slack channel.

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

Recently upgraded ArgoCD from 1.6.1 to 2.1.2. In ArgoCD 1.6.1 when doing a argocd app create --upsert to update an existing app with a new --revision it worked without issue directly after pushing a new tag to git. In ArgoCD 2.1.2 if I try to do an argocd app create --upsert passing a new --revision of a git tag that was just pushed it fails until undeterministic time when when run agian it will work.

The difference seems to be in ArgoCD 1.6.1 when doing an argocd app create --upsert an automatic app/repo refresh was taking place, but in ArgoCD 2.1.2 it is not.

To Reproduce

Behavior in ArogCD 1.6.1

> git tag new-git-tag-1
> git push --tags
> argocd app create my-test-app --upsert --revsion=new-git-tag-1 OTHER_FLAGS
application 'my-test-app' created
> git tag new-git-tag-2
> git push --tags
> argocd app create my-test-app --upsert --revsion=new-git-tag-2 OTHER_FLAGS
application 'my-test-app' created

Behavior in ArogCD 2.1.2

> git tag new-git-tag-1
> git push --tags
> argocd app create my-test-app --upsert --revsion=new-git-tag-1 OTHER_FLAGS
application 'my-test-app' created
> git tag new-git-tag-2
> git push --tags
> argocd app create my-test-app --upsert --revsion=new-git-tag-2 OTHER_FLAGS
FATA[0001] rpc error: code = InvalidArgument desc = application spec is invalid: InvalidSpecError: Unable to get app details: rpc error: code = Unknown desc = Unable to resolve 'new-git-tag-2' to a commit SHA

Expected behavior

Expected behavior is what happneed in ArgoCD 1.6.1, when i do an argocd app create --upsert it should auto refresh existing app so it can point at new revision/tag/branch without me having to manually invoke a refresh.

Workaround

In ArogCD 2.1.2 i can work aroudn this by manually invokeing the refresh.

> git tag new-git-tag-1
> git push --tags
> argocd app create my-test-app --upsert --revsion=new-git-tag-1 OTHER_FLAGS
application 'my-test-app' created
> git tag new-git-tag-2
> git push --tags
> argocd app get my-test-app  --refresh
> argocd app create my-test-app --upsert --revsion=new-git-tag-2 OTHER_FLAGS
application 'my-test-app' created

Screenshots

N/a

Version

argocd: v2.1.7+a408e29.dirty
  BuildDate: 2021-11-19T06:50:41Z
  GitCommit: a408e299ffa743213df3aa9135bf7945644ec936
  GitTreeState: dirty
  GoVersion: go1.17.2
  Compiler: gc
  Platform: darwin/amd64
WARN[0000] Failed to invoke grpc call. Use flag --grpc-web in grpc calls. To avoid this warning message, use flag --grpc-web.
argocd-server: v2.1.2+unknown
  BuildDate: 2021-10-27T13:19:31Z
  GitTreeState: clean
  GoVersion: go1.16.6
  Compiler: gc
  Platform: linux/amd64
  Ksonnet Version: unable to determine ksonnet version: exec: "ks": executable file not found in $PATH
  Kustomize Version: v4.2.0 1970-01-01T00:00:00Z
  Helm Version: v3.6.0+gd095be9
  Kubectl Version: v0.21.0
  Jsonnet Version: v0.17.0

Logs
N/A

@itewk itewk added the bug Something isn't working label Nov 29, 2021
@alexmt
Copy link
Collaborator

alexmt commented Nov 29, 2021

Hello @itewk , I believe issue was fixed in https://github.com/argoproj/argo-cd/releases/tag/v2.1.6 by #7508

Can you try upgrading please?

@alexmt alexmt added more-information-needed Further information is requested works-for-me Works as intended, or unable to reproduce labels Nov 29, 2021
@itewk
Copy link
Contributor Author

itewk commented Nov 30, 2021

@alexmt I am currently experincing this on an externally managed cluster where I can't do the upgrade, so I will have to spin up another cluster to install newer argo version to try. But I can take you at your word and the issue description that this is fixed in newer version. i will close htis.

@itewk itewk closed this as completed Nov 30, 2021
@no-response no-response bot removed the more-information-needed Further information is requested label Nov 30, 2021
itewk added a commit to itewk/ploigos-step-runner that referenced this issue Nov 30, 2021
itewk added a commit to itewk/ploigos-step-runner that referenced this issue Nov 30, 2021
itewk added a commit to itewk/ploigos-step-runner that referenced this issue Nov 30, 2021
itewk added a commit to itewk/ploigos-step-runner that referenced this issue Nov 30, 2021
itewk added a commit to itewk/ploigos-step-runner that referenced this issue Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working works-for-me Works as intended, or unable to reproduce
Projects
None yet
Development

No branches or pull requests

2 participants