feat: remove scalprum frontend support - #182
hopehadfield wants to merge 11 commits into
Conversation
Make frontend plugin export use Backstage standard module federation exclusively and remove the legacy Scalprum bundler, commands, options, and dependencies. Clean legacy artifacts from packaged output, preserve NFS feature metadata when available, and update end-to-end expectations for NFS remotes. Assisted-by: gpt-5.6-luna
|
🤖 Finished Review · ❌ Failure (validation failed after 2 iteration(s)) · Started 8:39 PM UTC · Completed 9:20 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high |
|
🤖 Finished Review · ❌ Failure (validation failed after 1 iteration(s)) · Started 6:45 PM UTC · Completed 6:47 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-5 · Effort: high |
|
🤖 Finished Review · ✅ Success · Started 2:02 PM UTC · Completed 2:22 PM UTC Commit: Runtime: claude · Model: sonnet → claude-sonnet-4-6 · Effort: high · Cost: $6.17 |
|
Risk Assessment: moderate (2/5) DetailsRe-anchoring to prior score of 2: Tier 1 signals are unchanged (large blast radius, 0 protected paths, 2 dependency files changed), and while Tier 2 shows 8 fix commits and 7 distinct human authors, these are concentrated on yarn.lock and the 27 files being deleted — a primarily deletional PR removing legacy code carries lower forward risk than the raw line count suggests. Previous runRisk Assessment: moderate (2/5) DetailsRe-anchoring to prior score of 2: Tier 1 signals are unchanged (large blast radius, 0 protected paths, 2 dependency files changed), and Tier 2 reveals modest churn driven largely by housekeeping files with 6 fix commits concentrated on paths being deleted. Previous run (2)Risk Assessment: moderate (2/5) DetailsRe-anchoring to prior score of 2: Tier 1 signals are unchanged (large blast radius, 0 protected paths, expected dependency-file changes), and while the new delta introduces a functional modification of the actively-maintained frontend.ts, the overall PR remains a large removal of confirmed-dormant bundler code with no protected paths or security-sensitive changes. Previous run (3)Risk Assessment: moderate (2/5) DetailsLarge deletion PR removing stable, dormant bundler code keeps overall risk moderate despite the size and dependency-file changes; the only high-churn file is yarn.lock, which is expected for a dependency removal. |
ReviewFindingsHigh
Low
Next steps:
Previous runReviewFindingsHigh
Medium
Low
Next steps:
Previous run (2)ReviewFindingsMedium
Low
Next steps:
Previous run (3)ReviewFindingsHigh
Medium
Low
Next steps:
|
Document the breaking frontend export migration to standard Backstage module federation and NFS metadata. Remove legacy Scalprum options and output references from the supported workflow, and publish the cutover as a major CLI release. Assisted-by: gpt-5.6-luna
Only remove files entries that target dist-scalprum or one of its glob variants, avoiding false positives for unrelated package paths. Assisted-by: gpt-5.6-luna
Keep the recursive-readdir third-party import with the other package imports and separate it from the Node.js path import. Assisted-by: gpt-5.6-luna
|
🤖 Finished Review · ✅ Success · Started 4:38 PM UTC · Completed 4:58 PM UTC Commit: Runtime: claude · Model: sonnet → claude-sonnet-4-6 · Effort: high · Cost: $4.33 |
Keep the e2e coverage focused on the standard module federation output and feature metadata rather than asserting the absence of removed implementation details. Assisted-by: gpt-5.6-luna
Use the minimal dist-scalprum substring check for the small set of supported frontend packages, as suggested in review.
Fail frontend exports when plugin metadata, files entries, or output directories still reference Scalprum instead of silently filtering or cleaning them.
|
🤖 Review · ❌ Terminated · Started 9:29 PM UTC · Ended 9:51 PM UTC Commit: |
|
Updated with your comments @jonkoops, thanks for the review! Looks like we have some removals to do on the plugins side before this gets in... |
|
🤖 Finished Review · ✅ Success · Started 9:29 PM UTC · Completed 9:51 PM UTC Commit: Runtime: claude · Model: sonnet → claude-sonnet-4-6 · Effort: high · Cost: $6.72 |
Keep the documented Scalprum removal migration on the 2.1 release line as requested. Assisted-by: gpt-5.6-luna
|
|
🤖 Finished Review · ✅ Success · Started 7:34 PM UTC · Completed 7:56 PM UTC Commit: Runtime: claude · Model: sonnet → claude-sonnet-4-6 · Effort: high · Cost: $7.50 |
| "name": "@red-hat-developer-hub/cli", | ||
| "description": "CLI for developing Backstage plugins and apps", | ||
| "version": "2.0.8", | ||
| "version": "2.1.0", |
There was a problem hiding this comment.
[high] semver-versioning
Multiple backward-incompatible changes (five CLI options removed, output artifact format changed, hard errors for previously-valid Scalprum configurations, two commands removed) are shipped under a semver minor bump (2.0.8 → 2.1.0). The CHANGELOG (line 5) explicitly declares adherence to Semantic Versioning, which requires a MAJOR increment for any incompatible API change. Consumers resolving ^2.0.x or ~2.x will silently receive this breaking update.
Suggested fix: Bump to 3.0.0 per the project's stated Semantic Versioning commitment. Update the CHANGELOG heading and README migration section to reference 3.0.0 accordingly.
| true, | ||
| ) | ||
| .option('--no-generate-module-federation-assets', '', false) | ||
| .action(lazy(() => import('./export-dynamic-plugin').then(m => m.command))); |
There was a problem hiding this comment.
[high] breaking-cli
Five options are removed from rhdh-cli plugin export: --scalprum-config, --generate-scalprum-assets, --no-generate-scalprum-assets, --generate-module-federation-assets, and --no-generate-module-federation-assets. Any external CI pipeline, Makefile, or shell script passing any of these flags will receive an unknown option error and the export will abort.
Suggested fix: Remove all five options from rhdh-cli plugin export invocations. Standard module-federation assets are now generated unconditionally.
| const { name, files } = originalPkg; | ||
|
|
||
| if (!opts.generateScalprumAssets && !opts.generateModuleFederationAssets) { | ||
| if ('scalprum' in originalPkg) { |
There was a problem hiding this comment.
[high] breaking-contract
Three hard-error traps block export for plugins with Scalprum artifacts: (1) a scalprum field in the plugin package.json throws at line 48; (2) a dist-scalprum glob in the plugin files array throws at line 57; (3) a physical dist-scalprum/ directory on disk throws at line 63. Any of these conditions blocks export for unprepared plugins.
Suggested fix: Before upgrading: remove the scalprum key from each plugin package.json, remove any dist-scalprum globs from plugin files fields, and delete any stale dist-scalprum/ directories.
| - Removed the legacy Scalprum frontend bundler and the `plugin build` and `plugin start` commands. | ||
| - Frontend dynamic packages no longer contain `dist-scalprum/`, `plugin-manifest.json`, or a `scalprum` package manifest field. | ||
|
|
||
| ### Migration |
There was a problem hiding this comment.
[low] changelog-conventions
The 2.1.0 entry introduces a Migration section header that is not a standard Keep a Changelog section type. The CHANGELOG header (line 5) declares adherence to Keep a Changelog, whose standard types are: Added, Changed, Deprecated, Removed, Fixed, Security.
Suggested fix: Move the migration bullets into the existing Changed section, or add a Removed section for removed options/commands and fold the migration notes there.



https://redhat.atlassian.net/browse/RHIDP-15353
Make frontend plugin export use Backstage standard module federation exclusively and remove the legacy Scalprum bundler, commands, options, and dependencies. Clean legacy artifacts from packaged output, preserve NFS feature metadata when available, and update end-to-end expectations for NFS remotes.
Assisted-by: gpt-5.6-luna