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

Short Commit SHA produces an error after first refresh #19820

Open
3 tasks done
dr14-make opened this issue Sep 6, 2024 · 0 comments
Open
3 tasks done

Short Commit SHA produces an error after first refresh #19820

dr14-make opened this issue Sep 6, 2024 · 0 comments
Assignees
Labels
bug Something isn't working component:git Interaction with GitHub, Gitlab etc component:sync version:2.12 Latest confirmed affected version is 2.12

Comments

@dr14-make
Copy link

dr14-make commented Sep 6, 2024

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

When short commit SHA is used the app initially produces the error

Failed to load target state: failed to compare revisions for source 1 of 2: pc error: code = Internal desc = unable to get
changed files for repo git@xxxx.git with revision c408ce6b: invalid revision
provided, must be SHA

The error however disappears after the next refresh actions

To Reproduce

create an application and use short SHA as targetRevision
change the target revision to another short SHA , and refresh the app, observe the error
refresh the app again and the error is gone the sync message points to correct revision and everything is synced

Expected behavior

No error should be shown

Screenshots

image

Version

argocd: v2.6.7+5bcd846.dirty
  BuildDate: 2023-03-23T17:23:10Z
  GitCommit: 5bcd846fa16e4b19d8f477de7da50ec0aef320e5
  GitTreeState: dirty
  GoVersion: go1.20.2
  Compiler: gc
  Platform: darwin/arm64
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.12.0+ec30a48
  BuildDate: 2024-08-05T13:25:54Z
  GitCommit: ec30a48bce7a60046836e481cd2160e28c59231d
  GitTreeState: clean
  GoVersion: go1.22.4
  Compiler: gc
  Platform: linux/amd64
  Kustomize Version: v5.4.2 2024-05-22T15:19:38Z
  Helm Version: v3.15.2+g1a500d5
  Kubectl Version: v0.29.6
  Jsonnet Version: v0.20.0

Logs

Paste any relevant application logs here.

I think the issue is in client.go
file where it is tested only by IsCommitSHA function, but instead both IsCommitSHA and IsTruncatedCommitSHA ? WDYT?
git diff comand works with shortSHA as well so I do not see any blocker to do it

@dr14-make dr14-make added the bug Something isn't working label Sep 6, 2024
@dr14-make dr14-make changed the title Short Commit hashes produces a error Short Commit SHA produces an error after first refresh Sep 6, 2024
@pasha-codefresh pasha-codefresh added component:git Interaction with GitHub, Gitlab etc component:sync labels Sep 7, 2024
@andrii-korotkov-verkada andrii-korotkov-verkada added the version:2.12 Latest confirmed affected version is 2.12 label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component:git Interaction with GitHub, Gitlab etc component:sync version:2.12 Latest confirmed affected version is 2.12
Projects
None yet
Development

No branches or pull requests

3 participants