janus-idp / backstage-showcase

Enterprise-ready Backstage distribution

Home Page:https://showcase.janus-idp.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Impossible to dynamically load a number of upstream backend plugins

davidfestal opened this issue · comments

Describe the bug

There is currently a limitation in the dynamic backend plugin loading mechanism that makes it impossible to dynamically load a number of upstream backend plugins.
More precisely, the dynamic backend plugin loading mechanism does not support the resolvePackagePath() method of the @backstage/backend-common core package.
So all plugins that use this "reflection" method in order to retrieve the folder where the plugin has been installed (and thus get resources inside it), especially all the plugins that use the database service (and thus use this function at loading time, like this) will fail loading.

Expected Behavior

What are the steps to reproduce this bug?

  1. Convert the upstream tech-insights-backend plugin to dynamic by running the npx --package=@janus-idp/cli@1.7.5 janus-cli package export-dynamic-plugin
  2. Create a package archive for the dynamic plugin package: cd dist-dynamic && npm pack
  3. Install this dynamic plugin in the Backstage-shiwcase application
  4. You will get an error saying that it cannot resolve the @backstage/plugin-tech-insights-backend-dynamic/package.json module.

Versions of software used and environment