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

When running yarn export-dynamic an almost empty app-config.yaml is needed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • None
    • Dynamic Plugins
    • RHDH Core Team 3256

      Description of problem: 

      When using yarn export-dynamic command to wrap a third-party plugin, it expects app-config.yaml to be present with app.baseUrl config present in it. This is unnecessary as this file is not used by the wrapper at all and I can give any dummy value for this config and that's sufficient to make the yarn command happy. Here's the value I provided in this file to make the yarn command work:

      app:
        baseUrl: "https://bogussite.com"

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

      Steps to Reproduce

      1. Follow the instructions given at https://github.com/janus-idp/backstage-showcase/blob/main/showcase-docs/dynamic-plugins.md#frontend-plugins to create a dynamic wrapper for a third-party plugin. I ran into this issue when creating a wrapper for a third-party frontend plugin though it could be the same issue when wrapping a third-party backend plugin. 

      Actual results:

      When the app-config.yaml file is not present, the yarn export-dynamic command failed with the following error:

      NotFoundError: Config file "<PROJECT_DIR>/app-config.yaml" does not exist

       

      When an empty app-config.yaml file is present, the yarn export-dynamic command failed with the following error

      Error: Missing required config value at 'app.baseUrl' in 'mock-config'

       

      Expected results:

      The yarn export-dynamic command should succeed and should not need app-config.yaml file to be present

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Build Details:

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

              dfestal David Festal
              sgahlot@redhat.com Sandip Gahlot
              RHIDP - Dynamic Plugins
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: