Uploaded image for project: 'OpenShift GitOps'
  1. OpenShift GitOps
  2. GITOPS-5672

write back to custom git branch failed by rejected push: tip of your current branch is behind

XMLWordPrintable

    • GitOps Tangerine - Sprint 3264

      More details in argocd-image-updater issues:
      https://github.com/argoproj-labs/argocd-image-updater/issues/879
      https://github.com/argoproj-labs/argocd-image-updater/issues/673

      Description of Problem

      Using git write back, and when the updater is performing a second update to the branch. It throws an error with git as it attempts to push the changes and git rejects the changes with the error tip of your current branch is behind with the remote counterpart.

      To Reproduce

      Setup git write back to a helmvalues file.
      argocd-image-updater.argoproj.io/write-back-target: 'helmvalues:/chart/argo_params.yaml'
      Along with setting the branch base and target. argocd-image-updater.argoproj.io/git-branch: 'main:.branch-test'

      Push new images, allow image updater to create a commit with the newest versions.

      Push another image, image updater will see it and attempt to perform updates to the same branch, but will fail with the error.

      Additional Info

      • <Any additional info such as logs, must-gather outputs, etc.>

      Problem Reproduction

      • <How do we reproduce the problem?>

      Reproducibility

      • <Always/Intermittent/Only Once>

      Prerequisites/Environment

      • <OpenShift, managed service (e.g., ROSA, ARO), operators, layered product, and other software versions, build details>

      Steps to Reproduce

      • ...

      Expected Results

      • ...

      Actual Results

      • ...

      Problem Analysis

      • <Completed by engineering team as part of the triage/refinement process>

      Root Cause

      • <What is the root cause of the problem? Or, why is it not a bug?>

      Workaround (If Possible)

      • <Are there any workarounds we can provide to the customers?>

      Fix Approaches

      • <If we decide to fix this bug, how will we do it?>

      Acceptance Criteria

      • ...

      Definition of Done

      • Code Complete:
        • All code has been written, reviewed, and approved.
      • Tested:
        • Unit tests have been written and passed.
        • Ensure code coverage is not reduced with the changes.
        • Integration tests have been automated.
        • System tests have been conducted, and all critical bugs have been fixed.
        • Tested and merged on OpenShift either upstream or downstream on a local build.
      • Documentation:
        • User documentation or release notes have been written (if applicable).
      • Build:
        • Code has been successfully built and integrated into the main repository / project.
        • Midstream changes (if applicable) are done, reviewed, approved and merged.
      • Review:
        • Code has been peer-reviewed and meets coding standards.
        • All acceptance criteria defined in the user story have been met.
        • Tested by reviewer on OpenShift.
      • Deployment:
        • The feature has been deployed on OpenShift cluster for testing.

              cfang@redhat.com Cheng Fang
              cfang@redhat.com Cheng Fang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: