community-plugins icon indicating copy to clipboard operation
community-plugins copied to clipboard

feat(tech-insights): allow usage of API client from backend plugins

Open secustor opened this issue 1 year ago • 3 comments

Hey, I just made a Pull Request!

Moves the TechInsightsClient class to @backstage-community/plugin-tech-insights-common package under a new /client export.

This is to enable usage of the client for other backend plugins. To enable this, the client constructor accepts now IdentityApi or AuthService as parameter.

:heavy_check_mark: Checklist

  • [x] A changeset describing the change and affected packages. (more info)
  • [ ] 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)

secustor avatar Jul 15 '24 15:07 secustor

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage-community/plugin-tech-insights-common workspaces/tech-insights/plugins/tech-insights-common patch v0.2.16
@backstage-community/plugin-tech-insights workspaces/tech-insights/plugins/tech-insights patch v0.3.33

backstage-goalie[bot] avatar Jul 15 '24 15:07 backstage-goalie[bot]

For the current CI error you are going to need to update the Backstage CLI version. Essentially the package is missing the plugin metadata which will cause the process to publish to NPM to fail.

awanlin avatar Jul 15 '24 19:07 awanlin

FYI this PR is blocked because of an incompability between backstage-repo-tools dependencies used in backstage/community-plugins and backstage/backstage, which prevents getting a successful CI run.

https://github.com/backstage/backstage/pull/25671

secustor avatar Jul 17 '24 10:07 secustor

Hi @Xantier, could really use your eyes on this one, please?

@secustor, looks like a conflict crept in, sorry this is taking so long.

awanlin avatar Aug 23 '24 13:08 awanlin

It's not a complete shift.

There is now a function to abstract token fetching. https://github.com/backstage/community-plugins/pull/630/files#diff-18721d7dfb9f9c8fec43c477a4c28706fe62585cf382069c8c122ca12c68ead9R151-R164

secustor avatar Aug 23 '24 15:08 secustor

@nickboldt Sry, for the ping but you are a CodeOwner and this PR is already open for a while. Would you be able to review it?

Thanks!

secustor avatar Aug 30 '24 09:08 secustor