Uploaded image for project: 'Red Hat Developer Hub Bugs'
  1. Red Hat Developer Hub Bugs
  2. RHDHBUGS-1154

Error parsing revision id for argocd application for Argo plugin

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Undefined Undefined
    • None
    • 1.4.0
    • ArgoCD Plugin
    • None
    • False
    • Hide

      None

      Show
      None
    • False

      Description of problem:

      When using the argocd plugin for developer hub, the plugin can load the application from argocd successful, but when loading the revision metadata, the revisionID is undefined and the api call returns a http code 500

       

      {"level":"\u001b[32minfo\u001b[39m","message":"[04/Feb/2025:09:34:54 +0000] \"GET /api/argocd/argoInstance/test/applications/name/my-test-app/revisions/undefined/metadata HTTP/1.1\" 500 232 
      
      

       

      Issue only happens argocd application have "revisions" (more than 1 revision id) attribute instead of "revision"  like below

       

      "history": [{
           ...
           "revisions": [
               "abcdef",
               "12345"
           ],

       

      It works fine with below attribute.

        

      history:
          - deployStartedAt: '2025-02-06T14:57:33Z'
            deployedAt: '2025-02-06T14:57:36Z'
            id: 0
            initiatedBy:
              username: admin
            revision: abcdef

      Prerequisites (if any, like setup, operators/versions):

       

      Steps to Reproduce

      1. Configure Argocd plugin in RHDH to fetch any application with multiple revisions. 
      2. Altough the application is loaded correctly, the revision details are not fetched.

      Actual results: Revision details is fetched as undefined.

      Expected results: Revision detail needs to be fetched correctly

      Reproducibility (Always/Intermittent/Only Once): Always

      Additional info (Such as Logs, Screenshots, etc):

      Plugin code seems to be looking for singular revision attribute, it's considering argocd multiple source scenario.

              aormandy Adam Ormandy
              rhn-support-sudnair Sudhish Nair
              RHIDP - Plugins
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: