@backstage/plugin-catalog-backend 1.9.1-next.2 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # @backstage/plugin-catalog-backend
2
2
 
3
+ ## 1.9.1
4
+
5
+ ### Patch Changes
6
+
7
+ - ce8d203235b: Ensure that entity cache state is only written to the database when actually changed
8
+ - 485a6c5f7b5: Internal refactoring for performance in the service handlers
9
+ - 3587a968dcd: Fixed a bug in the `queryEntities` endpoint that was causing filtered entities to be included in cursor requests.
10
+ - ce335df9d1c: Improve the query for orphan pruning
11
+ - 27956d78671: Adjusted the OpenAPI schema file name according to the new structure
12
+ - 51064e6e5ee: Change orphan cleanup task to only log a message if it deleted entities.
13
+ - 12a345317ab: Remove unnecessary join in the entity facets endpoint, exclude nulls
14
+ - Updated dependencies
15
+ - @backstage/backend-common@0.18.5
16
+ - @backstage/integration@1.4.5
17
+ - @backstage/plugin-scaffolder-common@1.3.0
18
+ - @backstage/plugin-permission-node@0.7.8
19
+ - @backstage/backend-tasks@0.5.2
20
+ - @backstage/plugin-catalog-node@1.3.6
21
+ - @backstage/plugin-search-backend-module-catalog@0.1.1
22
+ - @backstage/backend-plugin-api@0.5.2
23
+ - @backstage/catalog-client@1.4.1
24
+ - @backstage/catalog-model@1.3.0
25
+ - @backstage/config@1.0.7
26
+ - @backstage/errors@1.1.5
27
+ - @backstage/types@1.0.2
28
+ - @backstage/plugin-catalog-common@1.0.13
29
+ - @backstage/plugin-permission-common@0.7.5
30
+ - @backstage/plugin-search-common@1.2.3
31
+
3
32
  ## 1.9.1-next.2
4
33
 
5
34
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-backend",
3
- "version": "1.9.1-next.2",
3
+ "version": "1.9.1",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "types": "../dist/alpha.d.ts"
6
6
  }
package/dist/alpha.cjs.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var alpha = require('@backstage/plugin-catalog-common/alpha');
6
6
  var pluginPermissionNode = require('@backstage/plugin-permission-node');
7
- var CatalogBuilder = require('./cjs/CatalogBuilder-77581d41.cjs.js');
7
+ var CatalogBuilder = require('./cjs/CatalogBuilder-6a9091b7.cjs.js');
8
8
  var backendPluginApi = require('@backstage/backend-plugin-api');
9
9
  var alpha$1 = require('@backstage/plugin-catalog-node/alpha');
10
10
  var backendCommon = require('@backstage/backend-common');
@@ -1177,10 +1177,12 @@ async function deleteOrphanedEntities(options) {
1177
1177
  for (let i = 0; i < 100; ++i) {
1178
1178
  const candidates = await tx.with(
1179
1179
  "orphans",
1180
- (orphans) => orphans.from("refresh_state").select("entity_id", "entity_ref").whereNotIn(
1181
- "entity_ref",
1182
- (keep) => keep.distinct("target_entity_ref").from("refresh_state_references")
1183
- )
1180
+ ["entity_id", "entity_ref"],
1181
+ (orphans) => orphans.from("refresh_state").select("refresh_state.entity_id", "refresh_state.entity_ref").leftOuterJoin(
1182
+ "refresh_state_references",
1183
+ "refresh_state_references.target_entity_ref",
1184
+ "refresh_state.entity_ref"
1185
+ ).whereNull("refresh_state_references.target_entity_ref")
1184
1186
  ).select({
1185
1187
  entityId: "orphans.entity_id",
1186
1188
  relationSourceId: "refresh_state.entity_id"
@@ -1697,7 +1699,9 @@ class DefaultCatalogProcessingEngine {
1697
1699
  try {
1698
1700
  await this.processingDatabase.transaction(async (tx) => {
1699
1701
  const n = await this.processingDatabase.deleteOrphanedEntities(tx);
1700
- this.logger.info(`Deleted ${n} orphaned entities`);
1702
+ if (n > 0) {
1703
+ this.logger.info(`Deleted ${n} orphaned entities`);
1704
+ }
1701
1705
  });
1702
1706
  } catch (error) {
1703
1707
  this.logger.warn(`Failed to delete orphaned entities`, error);
@@ -5055,4 +5059,4 @@ exports.createCatalogPermissionRule = createCatalogPermissionRule;
5055
5059
  exports.createRandomProcessingInterval = createRandomProcessingInterval;
5056
5060
  exports.parseEntityYaml = parseEntityYaml;
5057
5061
  exports.permissionRules = permissionRules;
5058
- //# sourceMappingURL=CatalogBuilder-77581d41.cjs.js.map
5062
+ //# sourceMappingURL=CatalogBuilder-6a9091b7.cjs.js.map