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

Frontend plugins not able to see the configuration values

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • None
    • None
    • Dynamic Plugins
    • None
    • 2
    • False
    • Hide

      None

      Show
      None
    • False
    • RHDH Core Team 3256, RHDH Core Team 3257

      Description of problem:

      The config keys are always filtered out for the frontend plugins which reads configurations using ConfigApi even though the @visibility: frontend is defined in `config.d.ts` of those plugins.

      Steps to Reproduce:

      1. Add the configuration values in app-config.yaml
        example:

       

      quay: 
       uiUrl: 'https://quay.io'
      
      
      1. Run `yarn start` and navigate to the browser. In the console you can see the warnings.

      Actual results:

      Browser console warning

      index.esm.js:388 Failed to read configuration value at 'quay.uiUrl' as it is not visible. See https://backstage.io/docs/conf/defining#visibility for instructions on how to make it visible.
      

      Expected results:

      Frontend plugins should be able to access the configuration values, if the visibility of the config is set to `frontend`.

      Reproducibility (Always/Intermittent/Only Once):
      Always

       

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

      Backstage config Reader executes this block of code when the NODE_ENV is development - https://github.com/backstage/backstage/blob/master/packages/config/src/reader.ts#L265-L278 

      slack thread - https://redhat-internal.slack.com/archives/C05HGAR2DT5/p1715165060479499 

        1. screenshot-3.png
          screenshot-3.png
          38 kB
        2. screenshot-2.png
          screenshot-2.png
          132 kB
        3. screenshot-1.png
          screenshot-1.png
          276 kB
        4. browser-console.png
          browser-console.png
          83 kB

              dfestal David Festal
              karthik.jk Karthik Jeeyar
              RHIDP - Dynamic Plugins
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: