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

Bitbucket webhook diffstat does not work with upper case repo slug

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 1.18.0
    • ArgoCD
    • False
    • Hide

      None

      Show
      None
    • False
    • GitOps Crimson Sprint 23

      Description of Problem

      • Bitbucket webhook diffstat fail on 404 error if the repo slug has uppercase letters in it.
      • This causes manifest-generate-paths annotations to be ignored completely, and triggers reconciliation for all applications in the repository, instead of just the ones affected by the change in the commit.
      • Once the repo slug is changed to all lowercase letters, it works

      Additional Info

      time="2025-05-20T05:16:14Z" level=debug msg="no bitbucket repository configured for URL https://bitbucket.org/redacted/argocd-applications, initializing with empty bearer token"
      time="2025-05-20T05:16:14Z" level=debug msg="no credentials available for repository URL 'https://bitbucket.org/redacted/argocd-applications', initializing no auth client"
      time="2025-05-20T05:16:14Z" level=debug msg="created bitbucket client with base URL 'https://api.bitbucket.org/2.0'"
      time="2025-05-20T05:16:14Z" level=debug msg="invoking diffstat call with parameters: [Owner:redacted/argocd-applications, RepoSlug:ArgoCD-applications, Spec:e3429d01467a60c1f0e927bfcf9eb7e0cc9048b7..e932e180e59e521339edb0b163c2a6bf1507c210]"
      time="2025-05-20T05:16:14Z" level=warning msg="error fetching changed files using bitbucket diffstat api: error getting the diffstat: 404 Not Found"
      time="2025-05-20T05:16:14Z" level=info msg="Loading TLS configuration from secret argocd-hub/argocd-server-tls"
      time="2025-05-20T05:16:14Z" level=warning msg="error fetching bitbucket repo details: 404 Not Found"
      time="2025-05-20T05:16:14Z" level=info msg="Received push event repo: https://bitbucket.org/redacted/argocd-applications, revision: master, touchedHead: true" 

      Problem Reproduction

      • <How do we reproduce the problem?>

      Reproducibility

      • Always

      Prerequisites/Environment

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

      Steps to Reproduce

      • Create a Bitbucket webhook in a repository that has upper-case letters in the repo slug
      • Set webhook.bitbucket.uuid in argocd-secret 
      • Create applications with manifest-generate-paths annotation
      • Trigger a commit 

      Expected Results

      • When a webhook is triggered and applications do have manifest-generate-paths annotations defined, reconciliation should only happen for applications that are affected by the change in the commit that triggered the webhook.

      Actual Results

      • Observe that all applications are refreshed instead of just the one application that was affected by the change in the commit...

      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.

              rh-ee-anjoseph Anand Francis Joseph
              rhn-support-vab Varsha B
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: