-
Notifications
You must be signed in to change notification settings - Fork 282
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
Image Updater continuously force-pushes new commits when checkout branch is specified. #895
Comments
If the updates are the same as existing data, the git commit will be skipped. See https://github.com/argoproj-labs/argocd-image-updater/blob/master/pkg/argocd/git.go#L284 and https://github.com/argoproj-labs/argocd-image-updater/blob/master/pkg/argocd/git.go#L366 . So it's a bit surprising to see pushing new commits with no changes. |
same behaviour on my side, constantly pushes the same update. Very annoying cause it triggers pipeline each time argocd-image-updater pushes a new commit. Had to rollback to |
I was able to reproduce it with this sample app https://github.com/chengfang/image-updater-examples/tree/main/push-branch-kustomize For each update cycle, it force-pushes the same update to the target branch, overwriting the previous update commit in the target git branch. I think in v0.14.0, the same operation occurred too, but the push just failed to go through. In v0.15.0, with the additional --force option, these pushes succeeded. With no new updates, the update cycle should skip git-commit or git-push steps. Will look into it more. |
When using a custom write-back branch in the form of One way to fix it is modify the current behaviro such that, if the |
…mmits when checkout branch is specified Signed-off-by: Cheng Fang <[email protected]>
…mmits when checkout branch is specified (argoproj-labs#911) Signed-off-by: Cheng Fang <[email protected]>
Describe the bug
After upgrading to v0.15.0, if
pushBranch
is not the same ascheckOutBranch
, argocd image updater continuously force pushes new commits.To Reproduce
argocd-image-updater.argoproj.io/git-branch
to:image-updater/master/account/{{range .Images}}{{.Name}}-{{.NewTag}}{{end}}
Expected behavior
If there is no change, nothing is pushed.
Additional context
Version
After v0.15.0
Logs
The text was updated successfully, but these errors were encountered: