Uploaded image for project: 'Red Hat Internal Developer Platform'
  1. Red Hat Internal Developer Platform
  2. RHIDP-8758

SPIKE: Investigate building individual plugins (remove monorepo build requirement) [overlay repo]

    • RHDH COPE 3279

      The current process for building a single Backstage plugin in our overlay repository is broken and inefficient. It requires us to build the entire `backstage/backstage` monorepo, which creates conflicts with Hermeto as it does not support `.patch` files or git references.

      To resolve this, we propose a new approach that isolates the plugin from the monorepo. Instead of cloning the entire repository, we will copy only the minimum files required to build a specific plugin: its own directory, its parent directory, and the root `package.json` and `yarn.lock` (maybe more).

      After copying the necessary files, we will update the plugin's `package.json` to resolve its internal dependencies. We will replace all `workspace:^` references with the specific package versions corresponding to a tagged release. These versions will be sourced by cross-referencing the official release manifests found in the `backstage/versions` repository.

      To be determined:

      • how many root files (beyond package.json and yarn.lock) are required to build an individual plugin?
      • do any of the plugins we need to build as dynamic require patch files (RHIDP-8489) or git protocol (RHIDP-8391)? or will this change work around those "bad" plugins?
      • can we reuse this approach for BCP and rhdh-plugins too so as to optimize teh plugin export + publish process there too?
      • can we write a script to convert a package.json's workspace references to pinned numbers for any plugin, and reuse that everywhere?

              pschultz@redhat.com Paul Schultz
              pschultz@redhat.com Paul Schultz
              RHIDP - Cope
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: