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

[bulk-import][UI] Link to software catalog in the default PR description always points to http://localhost:3000

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • 1.3.0
    • Bulk Import Plugin
    • None
    • RHDH F&UI plugins 3262

      Description of problem:

      When using the new bulk import feature (RHDH 1.3), the import PR has a default description linking to http://localhost:3000, which will not work when the application is deployed on a cluster and remotely accessible.

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

      • Some GitHub integrations are configured in the app-config. See https://backstage.io/docs/integrations/github/locations/#configuration
      • Enable the bulk import plugins in the dynamic plugins config. Example with the Dynamic Plugins ConfigMap:
        1.  
          apiVersion: v1
          kind: ConfigMap
          metadata:
            name: dynamic-plugins-rhdh
          data:
            dynamic-plugins.yaml: |
              includes:
                - dynamic-plugins.default.yaml
              plugins:
                # Enable Bulk import plugins.
                - package: ./dynamic-plugins/dist/janus-idp-backstage-plugin-bulk-import-backend-dynamic
                  disabled: false
                - package: ./dynamic-plugins/dist/janus-idp-backstage-plugin-bulk-import
                  disabled: false

      Steps to Reproduce

      1. Deployed RHDH using the Operator, with the following CR:
      apiVersion: rhdh.redhat.com/v1alpha1
      kind: Backstage
      metadata:
        name: my-rhdh
      spec:
        application:
          image: quay.io/janus-idp/backstage-showcase:pr-1547
          appConfig:
            configMaps:
              - name: app-config-rhdh
          dynamicPluginsConfigMapName: dynamic-plugins-rhdh
          extraEnvs:
            secrets:
              - name: secrets-rhdh
              - name: gh-apps-creds

      Actual results:

      See the screencast attached to better understand the issue: Screencast from 2024-09-02 10-23-49.mp4

      Expected results:

      The link to the software catalog in the PR description should not be hardcoded. The host in the URL should be that of the deployed Backstage instance the user is using. So in this case, it should be: https://backstage-my-rhdh-my-ns.apps.ci-ln-1n5nbg2-76ef8.origin-ci-int-aws.dev.rhcloud.com/catalog 

      Reproducibility (Always/Intermittent/Only Once):

      Always (when the bulk import plugins are enabled). It looks like http://localhost:3000 is hardcoded in the bulk import frontend plugin, from what I can see here: https://github.com/janus-idp/backstage-plugins/blob/main/plugins/bulk-import/src/utils/repository-utils.tsx#L94 

      Build Details:

      RHDH Version: 1.3.0
      Backstage Version: 1.29.2
      Last Commit: janus-idp/backstage-showcase/pull/1547 @ 9aeca2c
      Build Time: 2024-08-30T13:27:19Z
      
      

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

              dsantra12 Debsmita Santra
              rh-ee-asoro Armel Soro
              RHIDP - Frontend Plugins & UI
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: