-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate plugins to new Backstage Backend system #1325
Comments
@drodil here is the issue we discussed. |
I have interest on updating scoffolder-backend-module-http-request and scaffolder-backend-module-utils. I will share the PR once the work is complete. |
Opened #1341 |
@kissmikijr @vanessap-aa could you advice if there is a way to use argocd backend plugin with the new backstage backend system? or do you have any migration plans? |
Is it possible to re-open #1341 and get a review? |
I think you should be able to use the
|
@kissmikijr First of all thanks for the reply. I tried that way, unfortunately it doesn't work.
it didn't work, then I tried to remove that entity completely, so it doesn't depend on tried like this: it gave me some incompatibilities at the compile time.
|
Hey @supersol I got the backend plugin working with this: // backend/src/plugins/argocd.ts
import { createRouter } from '@roadiehq/backstage-plugin-argo-cd-backend';
import { PluginEnvironment } from '../types';
import {Router} from "express";
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
return await createRouter({
logger: env.logger,
config: env.config,
});
} // backend/src/index.ts
+import {legacyPlugin} from '@backstage/backend-common';
...
+backend.add(legacyPlugin('argocd', import('./plugins/argocd'))); |
If you have a custom environment for your plugins you will need to use the following way to provide the custom environment to your plugins An example custom env config. // backend/src/index.ts
import { coreServices } from '@backstage/backend-plugin-api';
import {
makeLegacyPlugin,
loggerToWinstonLogger,
cacheToPluginCacheManager,
} from '@backstage/backend-common';
...
const legacyPlugin = makeLegacyPlugin(
{
logger: coreServices.logger,
cache: coreServices.cache,
database: coreServices.database,
auth: coreServices.auth,
config: coreServices.config,
reader: coreServices.urlReader,
discovery: coreServices.discovery,
tokenManager: coreServices.tokenManager,
permissions: coreServices.permissions,
scheduler: coreServices.scheduler,
// ... and your own additions
},
{
logger: log => loggerToWinstonLogger(log),
cache: cache => cacheToPluginCacheManager(cache),
},
);
...
backend.add(legacyPlugin('argocd', import('./plugins/argocd'))); |
Hello @kissmikijr is it possible to get a review on #1341 ? |
thanks @kissmikijr @martina-equinix for your replies. After some time I managed to make it work with the new backend, in case it will help to someone, I'll leave it here.
3 . index.ts - added this "custom plugin" ( add parameters should match then name from 1. step)
Then the build didn't fail and the argocd cards in the UI were showing apps state and some history. |
Hello, We're working on a port of the RAG-AI to backend system of Backstage v1.30.x which includes a lot of deprecated API removals. If you're interresed we can make PR once we update the doc ? link to the repo: https://github.com/alithya-oss/backstage-plugins/tree/main/workspaces/rag-ai/plugins |
Thanks @fjudith, a pull request would be very welcome for that yeah. |
I battled for a week trying pass the Backstage tinter locally, it seems that relying on the old backend system will make our life worst and worst over time. Considering that Backstage 1.31.0 will officially declare the v1 of the new backend system. I guess this will make the plugin migration tracking a bit more easier as well as keeping consistent documentation during the transition process |
Hello @fjudith P.S. : it is really great that you also added distinct |
RSS plugin also needs to be migrated. I am willing to open a PR for it |
Sorry i still did'nt submitted the PR for Rag-AI. I will first submit one for backstage-aws-backend. In the coming hours. |
@fjudith How are you faring with the aws-backend? We're curious about adopting it and if it is just hours away then i'd be glad to try it out. :) |
The new backstage backend system is ready to be used at this point. The old backend system will be deprecated and is scheduled to be removed at the end of this year. As such this repo needs its backend plugins migrated to use the new Backstage Backend system.
If you would like to take ownership of migrating a plugin in this repo please, write a comment on this issue expressing your interest in helping out. Then create a pull request referencing this issue.
Here is an example of the pull request for the rag-ai-backend plugin #1319
The text was updated successfully, but these errors were encountered: