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

Sequential Builds Overwriting Image Tags in Git Repository #712

Open
ccpatrut opened this issue May 16, 2024 · 0 comments
Open

Sequential Builds Overwriting Image Tags in Git Repository #712

ccpatrut opened this issue May 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ccpatrut
Copy link

Describe the bug
I am encountering an issue with ArgoCD Image Updater when handling sequential builds that result in two different images. The write-back method is set to git, and it appears that there are two pushes: one to write the tag together with the image, followed by a second push which deletes the first commit content and updates the image to latest@sha256:.

To Reproduce
Here are the relevant annotations for the ArgoCD application:


apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: example-service-dev
  annotations:
    argocd-image-updater.argoproj.io/write-back-method: git
    argocd-image-updater.argoproj.io/image-list: 'backend=docker.example.com/backend:feature-new-support,sender=docker.example.com/sender:feature-new-support'
    argocd-image-updater.argoproj.io/backend.helm.image-tag: backend.image.tag
    argocd-image-updater.argoproj.io/sender.helm.image-tag: sender.image.tag
    argocd-image-updater.argoproj.io/backend.helm.image-name: backend.image.repository
    argocd-image-updater.argoproj.io/sender.helm.image-name: sender.image.repository
    argocd-image-updater.argoproj.io/backend.update-strategy: digest
    argocd-image-updater.argoproj.io/sender.update-strategy: digest

  1. When two builds happen one after the other, it results in the following:
- name: sender.image.tag
  value: feature-new-support@sha256:ad689fe6aa78934c8e62a3456ba8492fc5b5e851a16e552e97e31f228bf6ffa7
  forcestring: true
  1. Followed by a commit:
- name: sender.image.tag
  value: latest@sha256:ad689fe6aa78934c8e62a3456ba8492fc5b5e851a16e552e97e31f228bf6ffa7
  forcestring: true

Tackend is also updated, the second push seems to overwrite the first commit content and update the image to latest@sha256: instead of maintaining the specific tag provided in the first commit.

Expected behavior
• The image updater should respect the digest strategy and not overwrite the tag with latest.
• Each commit should maintain its respective tag without being overwritten by subsequent commit

Additional context

Version
0.12.0

Logs
Not relevant

@ccpatrut ccpatrut added the bug Something isn't working label May 16, 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
Projects
None yet
Development

No branches or pull requests

1 participant