-
Task
-
Resolution: Done
-
Blocker
-
1.8.0
-
None
-
2
-
False
-
-
False
-
-
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? (See
RHIDP-8758)
can we write a script to convert a package.json's workspace references to pinned numbers for any plugin, and reuse that everywhere? Yes, see
RHIDP-8758- update-workspace.js @ https://gitlab.cee.redhat.com/rhidp/rhdh-plugin-catalog/-/blob/rhdh-1-rhel-9/build/scripts/update-workspace.js
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 plugin export + publish process there too?
- clones
-
RHIDP-8758 SPIKE: Investigate building individual plugins (remove monorepo build requirement) [overlay repo]
-
- Closed
-