catalog-backend: switch default orphanProviderStrategy to 'delete'
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': major
|
||||
---
|
||||
|
||||
**BREAKING**: The default `catalog.orphanProviderStrategy` has been switched to `'delete'`.
|
||||
Vendored
+1
-1
@@ -167,7 +167,7 @@ export interface Config {
|
||||
/**
|
||||
* The strategy to use for entities that are referenced by providers that are orphaned,
|
||||
* i.e. entities with no providers currently configured in the catalog. The default value is
|
||||
* "keep".
|
||||
* "delete".
|
||||
*/
|
||||
orphanProviderStrategy?: 'keep' | 'delete';
|
||||
|
||||
|
||||
@@ -622,9 +622,7 @@ export class CatalogBuilder {
|
||||
enableRelationsCompatibility,
|
||||
});
|
||||
|
||||
if (
|
||||
config.getOptionalString('catalog.orphanProviderStrategy') === 'delete'
|
||||
) {
|
||||
if (config.getOptionalString('catalog.orphanProviderStrategy') !== 'keep') {
|
||||
await evictEntitiesFromOrphanedProviders({
|
||||
db: providerDatabase,
|
||||
providers: entityProviders,
|
||||
|
||||
Reference in New Issue
Block a user