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

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,95 @@
1
1
  # @backstage/plugin-catalog-backend
2
2
 
3
+ ## 1.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 16891a212c: Added new `POST /entities/by-refs` endpoint, which allows you to efficiently
8
+ batch-fetch entities by their entity ref. This can be useful e.g. in graphql
9
+ resolvers or similar contexts where you need to fetch many entities at the same
10
+ time.
11
+ - 273ba3a77f: Deprecated Prometheus metrics in favour of OpenTelemtry metrics.
12
+ - c395abb5b2: The catalog no longer stops after the first processor `validateEntityKind`
13
+ method returns `true` when validating entity kind shapes. Instead, it continues
14
+ through all registered processors that have this method, and requires that _at
15
+ least one_ of them returned true.
16
+
17
+ The old behavior of stopping early made it harder to extend existing core kinds
18
+ with additional fields, since the `BuiltinKindsEntityProcessor` is always
19
+ present at the top of the processing chain and ensures that your additional
20
+ validation code would never be run.
21
+
22
+ This is technically a breaking change, although it should not affect anybody
23
+ under normal circumstances, except if you had problematic validation code that
24
+ you were unaware that it was not being run. That code may now start to exhibit
25
+ those problems.
26
+
27
+ If you need to disable this new behavior, `CatalogBuilder` as used in your
28
+ `packages/backend/src/plugins/catalog.ts` file now has a
29
+ `useLegacySingleProcessorValidation()` method to go back to the old behavior.
30
+
31
+ ```diff
32
+ const builder = await CatalogBuilder.create(env);
33
+ +builder.useLegacySingleProcessorValidation();
34
+ ```
35
+
36
+ - 3072ebfdd7: The search table also holds the original entity value now and the facets endpoint fetches the filtered entity data from the search table.
37
+
38
+ ### Patch Changes
39
+
40
+ - ba13ff663c: Added a new `catalog.rules[].location` configuration that makes it possible to configure catalog rules to only apply to specific locations, either via exact match or a glob pattern.
41
+ - d8593ce0e6: Do not use deprecated `LocationSpec` from the `@backstage/plugin-catalog-node` package
42
+ - c507aee8a2: Ensured typescript type checks in migration files.
43
+ - 2a8e3cc0b5: Optimize `Stitcher` process to be more memory efficient
44
+ - 884d749b14: Refactored to use `coreServices` from `@backstage/backend-plugin-api`.
45
+ - eacc8e2b55: Make it possible for entity providers to supply only entity refs, instead of full entities, in `delta` mutation deletions.
46
+ - b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries
47
+ - 5b3e2afa45: Fixed deprecated use of `substr` into `substring`.
48
+ - 71147d5c16: Internal code reorganization.
49
+ - 93870e4df1: Track the last time the final entity changed with new timestamp "last updated at" data in final entities database, which gets updated with the time when final entity is updated.
50
+ - 20a5161f04: Adds MySQL support for the catalog-backend
51
+ - 3280711113: Updated dependency `msw` to `^0.49.0`.
52
+ - e982f77fe3: Registered shutdown hook in experimental catalog plugin.
53
+ - b3fac9c107: Ignore attempts at emitting the current entity as a child of itself.
54
+ - Updated dependencies
55
+ - @backstage/catalog-client@1.2.0
56
+ - @backstage/backend-common@0.17.0
57
+ - @backstage/plugin-catalog-node@1.3.0
58
+ - @backstage/plugin-permission-common@0.7.2
59
+ - @backstage/plugin-permission-node@0.7.2
60
+ - @backstage/errors@1.1.4
61
+ - @backstage/backend-plugin-api@0.2.0
62
+ - @backstage/integration@1.4.1
63
+ - @backstage/types@1.0.2
64
+ - @backstage/plugin-search-common@1.2.0
65
+ - @backstage/catalog-model@1.1.4
66
+ - @backstage/config@1.0.5
67
+ - @backstage/plugin-catalog-common@1.0.9
68
+ - @backstage/plugin-scaffolder-common@1.2.3
69
+
70
+ ## 1.6.0-next.3
71
+
72
+ ### Patch Changes
73
+
74
+ - ba13ff663c: Added a new `catalog.rules[].location` configuration that makes it possible to configure catalog rules to only apply to specific locations, either via exact match or a glob pattern.
75
+ - b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries
76
+ - 71147d5c16: Internal code reorganization.
77
+ - Updated dependencies
78
+ - @backstage/plugin-permission-common@0.7.2-next.2
79
+ - @backstage/plugin-permission-node@0.7.2-next.3
80
+ - @backstage/backend-common@0.17.0-next.3
81
+ - @backstage/backend-plugin-api@0.2.0-next.3
82
+ - @backstage/catalog-client@1.2.0-next.1
83
+ - @backstage/catalog-model@1.1.4-next.1
84
+ - @backstage/config@1.0.5-next.1
85
+ - @backstage/errors@1.1.4-next.1
86
+ - @backstage/integration@1.4.1-next.1
87
+ - @backstage/types@1.0.2-next.1
88
+ - @backstage/plugin-catalog-common@1.0.9-next.3
89
+ - @backstage/plugin-catalog-node@1.3.0-next.3
90
+ - @backstage/plugin-scaffolder-common@1.2.3-next.1
91
+ - @backstage/plugin-search-common@1.2.0-next.3
92
+
3
93
  ## 1.6.0-next.2
4
94
 
5
95
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-backend",
3
- "version": "1.6.0-next.2",
3
+ "version": "1.6.0",
4
4
  "main": "../dist/index.cjs.js",
5
5
  "types": "../dist/index.alpha.d.ts"
6
6
  }
package/config.d.ts CHANGED
@@ -38,6 +38,37 @@ export interface Config {
38
38
  * E.g. ["Component", "API", "Template", "Location"]
39
39
  */
40
40
  allow: Array<string>;
41
+ /**
42
+ * Limit this rule to a specific location
43
+ *
44
+ * Example with a fixed location
45
+ * { "type": "url", "exact": "https://github.com/a/b/blob/file.yaml"}
46
+ *
47
+ * Example using a Regex
48
+ * { "type": "url", "pattern": "https://github.com/org/*\/blob/master/*.yaml"}
49
+ *
50
+ * Using both exact and pattern will result in an error starting the application
51
+ */
52
+ locations?: Array<{
53
+ /**
54
+ * The type of location, e.g. "url".
55
+ */
56
+ type: string;
57
+ /**
58
+ * The exact location, e.g.
59
+ * "https://github.com/org/repo/blob/master/users.yaml".
60
+ *
61
+ * The exact location can also be used to match on locations
62
+ * that contain glob characters themselves, e.g.
63
+ * "https://github.com/org/*\/blob/master/*.yaml".
64
+ */
65
+ exact?: string;
66
+ /**
67
+ * The pattern allowed for the location, e.g.
68
+ * "https://github.com/org/*\/blob/master/*.yaml".
69
+ */
70
+ pattern?: string;
71
+ }>;
41
72
  }>;
42
73
 
43
74
  /**
@@ -392,7 +392,13 @@ export declare type CatalogPermissionRule<TParams extends PermissionRuleParams =
392
392
  */
393
393
  export declare const catalogPlugin: (options?: undefined) => BackendFeature;
394
394
 
395
- /** @public */
395
+ /**
396
+ * Represents the engine that drives the processing loops. Some backend
397
+ * instances may choose to not call start, if they focus only on API
398
+ * interactions.
399
+ *
400
+ * @public
401
+ */
396
402
  export declare interface CatalogProcessingEngine {
397
403
  start(): Promise<void>;
398
404
  stop(): Promise<void>;
@@ -345,7 +345,13 @@ export declare type CatalogEnvironment = {
345
345
 
346
346
  /* Excluded from this release type: catalogPlugin */
347
347
 
348
- /** @public */
348
+ /**
349
+ * Represents the engine that drives the processing loops. Some backend
350
+ * instances may choose to not call start, if they focus only on API
351
+ * interactions.
352
+ *
353
+ * @public
354
+ */
349
355
  export declare interface CatalogProcessingEngine {
350
356
  start(): Promise<void>;
351
357
  stop(): Promise<void>;