Hey y'all. After a migration to the new backend system I have 2 issues I cannot solve.
-
I want to use
addProcessorwithin' custom extension for catalog, the code goes as on attached picture, please don't mind red highlight, its just for post reasons.
There are places where for example Validator2 should get the data that is processed with Validator1. In such cases when the Validator1 data is not yet processed I get the errors saying it couldn't find the data. Is there any solution to run those processing in specific order and wait for the task to be completed OR rerun the processing on some failure? -
Beside the processing I have another module to run the db migrations:
import { coreServices, createBackendModule } from '@backstage/backend-plugin-api';
import { applyDatabaseMigrations } from '@internal/plugin-plugin-catalog-backend-backend-module-dv-views-module-backend';
export default createBackendModule({
pluginId: 'catalog',
moduleId: 'migrations',
register(env) {
env.registerInit({
deps: {
database: coreServices.database,
},
async init({ database }) {
const client = await database.getClient();
if (!database.migrations?.skip) {
await doSomeDBMigration(client);
}
},
});
},
});
when I import the extensions to the index.ts files they are places one under another, the custom-extensions goes first and migrations goes second. Yet still migration fails due to not having the catalog items ready. As above is there any option to run those in some order?