Merge pull request #29478 from RoadieHQ/dont-add-processors
Add ability disable the built in entity processors [ContribFest]
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': minor
|
||||
---
|
||||
|
||||
Adds the ability to disable the default entity processors using a new boolean app config item `catalog.disableDefaultProcessors`.
|
||||
Vendored
+9
@@ -148,6 +148,15 @@ export interface Config {
|
||||
*/
|
||||
disableRelationsCompatibility?: boolean;
|
||||
|
||||
/**
|
||||
* Disables the default backstage processors.
|
||||
*
|
||||
* Enabling this option allows more complete control of which processors are included
|
||||
* in the backstage processing loop.
|
||||
*
|
||||
*/
|
||||
disableDefaultProcessors?: boolean;
|
||||
|
||||
/**
|
||||
* The strategy to use for entities that are orphaned, i.e. no longer have
|
||||
* any other entities or providers referencing them. The default value is
|
||||
|
||||
@@ -736,8 +736,14 @@ export class CatalogBuilder {
|
||||
processors.push(builtinKindsEntityProcessor);
|
||||
}
|
||||
|
||||
// These are only added unless the user replaced them all
|
||||
if (!this.processorsReplace) {
|
||||
const disableDefaultProcessors = config.getOptionalBoolean(
|
||||
'catalog.disableDefaultProcessors',
|
||||
);
|
||||
|
||||
// Add default processors if:
|
||||
// - processors have NOT been explicitly replaced
|
||||
// - and default processors are NOT disabled via config
|
||||
if (!this.processorsReplace && !disableDefaultProcessors) {
|
||||
processors.push(...this.getDefaultProcessors());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user