Open Parkreiner opened 7 months ago
I've gotten started on testing out this migration. Importing the backend plugin was not too difficult following https://backstage.io/docs/backend-system/building-backends/migrating/. That was until I reached incompatible dependencies during build time. I'll continue on to see if I can figure out what's giving me issues during the build.
This is working with the new backend system:
# packages/backend/src/index.ts
...
import { createBackendModule } from '@backstage/backend-plugin-api';
import { DevcontainersProcessor } from '@coder/backstage-plugin-devcontainers-backend';
import { loggerToWinstonLogger } from '@backstage/backend-common';
const backend = createBackend();
....
export const catalogModuleDevcontainersProcessor = createBackendModule({
pluginId: 'catalog',
moduleId: 'devcontainers-processor',
register(env) {
env.registerInit({
deps: {
catalog: catalogProcessingExtensionPoint,
logger: coreServices.logger,
urlReader: coreServices.urlReader,
},
async init({ catalog, logger, urlReader }) {
catalog.addProcessor(new DevcontainersProcessor(urlReader, {
tagName: "devcontainers",
logger: loggerToWinstonLogger(logger)
}));
},
});
},
});
backend.add(catalogModuleDevcontainersProcessor);
...
backend.start();
I don't know how long will it work since backstage/backend-common is deprecated.
This is running every 2 minutes. It would be nice if we can increase this. Maybe processing loop ties in: https://backstage.io/docs/features/software-catalog/configuration/#processing-interval
The current code/documentation for the backend devcontainers plugin is based on Backstage's previous backend system. But recently, they've rolled out a New Backend System
I don't think we'll actually need to make any changes to the processor class itself, but we do want to make sure that: