-
Task
-
Resolution: Done
-
Blocker
-
1.8.0
-
None
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?
- is cloned by
-
RHIDP-8889 Fix export-dynamic to support filtering [overlay repo]
-
- Closed
-
- is related to
-
RHIDP-8391 [workspaces/backstage] cannot fetch GendocuPublicApis dependency with hermeto (git protocol not supported)
-
- New
-
-
RHIDP-8489 [workspaces/backstage] yarn .patch files not supported by hermeto
-
- New
-