backstage icon indicating copy to clipboard operation
backstage copied to clipboard

Dynamic frontend features based on module federation and the new frontend system

Open davidfestal opened this issue 1 year ago • 10 comments

Hey, I just made a Pull Request!

This PR contributes support for the dynamic frontend features, which completes the already-existing support for backend dynamic features provided by package backend-dynamic-feature-service.

Dynamic frontend features are based on both the module federation support and the new frontend system.

In more details:

  • On the backend it exposes the module federation assets of any frontend dynamic plugin found in the dynamic plugins root folder, as well as a list of all frontend dynamic plugins module federation manifests
  • On the frontend side, it provides a CreateAppFeatureLoader which loads the exposed module federation remote modules through the module federation runtime library.
Testing

This PR can be more easily tested using the content of the temporary PR #28580 which based on this one, and provides updated frontend and backend application to test it, as well as a detailed description of steps to test the current PR.

:heavy_check_mark: Checklist

  • [x] A changeset describing the change and affected packages. (more info)
  • [x] Added or updated documentation
  • [x] Tests for new functionality and regression tests for bug fixes
  • [ ] Screenshots attached (for UI changes)
  • [x] All your commits have a Signed-off-by line in the message. (more info)

davidfestal avatar Dec 10 '24 14:12 davidfestal

[!IMPORTANT] This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior.

Unexpected Changesets

The following changeset(s) reference packages that have not been changed in this PR:

  • /home/runner/work/backstage/backstage/.changeset/large-phones-tie.md: @backstage/frontend-defaults

Note that only changes that affect the published package require changesets, for example changes to tests and storybook stories do not require changesets.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage/backend-dynamic-feature-service packages/backend-dynamic-feature-service patch v0.6.2-next.2
@backstage/frontend-dynamic-feature-loader packages/frontend-dynamic-feature-loader minor v0.0.0

backstage-goalie[bot] avatar Dec 10 '24 14:12 backstage-goalie[bot]

This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution!

github-actions[bot] avatar Dec 31 '24 13:12 github-actions[bot]

Hi! Feel free to rebase this while waiting for us to get back up to speed.

freben avatar Dec 31 '24 13:12 freben

Hi! Feel free to rebase this while waiting for us to get back up to speed.

Thanks @freben. This is now done, and I also updated the dependencies to module federation packages to 0.8.0 as has been done in the CLI in the meantime.

davidfestal avatar Jan 06 '25 13:01 davidfestal

@Rugvip Any idea when you would be able to review this PR ? During the Framework SIG meeting on January 7th, when this PR was presented for review (after demoing it on Dec 2024), there seemed to be a general agreement on it with other Core maintainers. But since you expressed the need to test it manually before approving, I created a second temporary PR whose content makes it much easier to quickly test the current PR. See the new Testing sub-section of the current PR description.

davidfestal avatar Jan 22 '25 22:01 davidfestal

@davidfestal thank you! Yep just need to get to it, there's quite a couple of big ones on the way

Rugvip avatar Jan 23 '25 21:01 Rugvip

Any news ?

davidfestal avatar Jan 28 '25 22:01 davidfestal

This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution!

github-actions[bot] avatar Feb 18 '25 16:02 github-actions[bot]

This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution!

github-actions[bot] avatar Mar 11 '25 10:03 github-actions[bot]

This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution!

github-actions[bot] avatar Mar 25 '25 11:03 github-actions[bot]

Just popping by to note that I was going through old pull requests and saw this one. There are conflicts and actionable comments above still, right, am I understanding this correctly?

freben avatar Apr 08 '25 09:04 freben

There are conflicts and actionable comments above still, right, am I understanding this correctly?

Sure. I had to rework part of the structure to fix some of the review comments, and also rebase it on top of main. I isolated to changes fixing the review comments in the last 5 commits, starting from Fix simple review comments.

davidfestal avatar Apr 08 '25 20:04 davidfestal

@freben @Rugvip Afaict I adressed all your review comments, either by restructuring some parts, fixing details, or just by providing an answer.

davidfestal avatar Apr 08 '25 21:04 davidfestal

Any idea whether it could be included into the 1.38.0 release ?

davidfestal avatar Apr 09 '25 16:04 davidfestal

Thank you for contributing to Backstage! The changes in this pull request will be part of the 1.38.0 release, scheduled for Tue, 15 Apr 2025.

github-actions[bot] avatar Apr 15 '25 10:04 github-actions[bot]