@backstage/plugin-catalog-backend 0.13.7 → 0.16.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,133 @@
1
1
  # @backstage/plugin-catalog-backend
2
2
 
3
+ ## 0.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 2c5bab2f82: Errors emitted from processors are now considered a failure during entity processing and will prevent entities from being updated. The impact of this change is that when errors are emitted while for example reading a location, then ingestion effectively stops there. If you emit a number of entities along with just one error, then the error will be persisted on the current entity but the emitted entities will _not_ be stored. This fixes [a bug](https://github.com/backstage/backstage/issues/6973) where entities would get marked as orphaned rather than put in an error state when the catalog failed to read a location.
8
+
9
+ In previous versions of the catalog, an emitted error was treated as a less severe problem than an exception thrown by the processor. We are now ensuring that the behavior is consistent for these two cases. Even though both thrown and emitted errors are treated the same, emitted errors stay around as they allow you to highlight multiple errors related to an entity at once. An emitted error will also only prevent the writing of the processing result, while a thrown error will skip the rest of the processing steps.
10
+
11
+ ### Patch Changes
12
+
13
+ - 957e4b3351: Updated dependencies
14
+ - f66c38148a: Avoid duplicate logging of entity processing errors.
15
+ - 426d5031a6: A number of classes and types, that were part of the old catalog engine implementation, are now formally marked as deprecated. They will be removed entirely from the code base in a future release.
16
+
17
+ After upgrading to this version, it is recommended that you take a look inside your `packages/backend/src/plugins/catalog.ts` file (using a code editor), to see if you are using any functionality that it marks as deprecated. If you do, please migrate away from it at your earliest convenience.
18
+
19
+ Migrating to using the new engine implementation is typically a matter of calling `CatalogBuilder.create({ ... })` instead of `new CatalogBuilder({ ... })`.
20
+
21
+ If you are seeing deprecation warnings for `createRouter`, you can either use the `router` field from the return value from updated catalog builder, or temporarily call `createNextRouter`. The latter will however also be deprecated at a later time.
22
+
23
+ - 7b78dd17e6: Replace slash stripping regexp with trimEnd to remove CodeQL warning
24
+ - Updated dependencies
25
+ - @backstage/catalog-model@0.9.4
26
+ - @backstage/backend-common@0.9.6
27
+ - @backstage/catalog-client@0.5.0
28
+ - @backstage/integration@0.6.7
29
+
30
+ ## 0.15.0
31
+
32
+ ### Minor Changes
33
+
34
+ - 1572d02b63: Introduced a new `CatalogProcessorCache` that is available to catalog processors. It allows arbitrary values to be saved that will then be visible during the next run. The cache is scoped to each individual processor and entity, but is shared across processing steps in a single processor.
35
+
36
+ The cache is available as a new argument to each of the processing steps, except for `validateEntityKind` and `handleError`.
37
+
38
+ This also introduces an optional `getProcessorName` to the `CatalogProcessor` interface, which is used to provide a stable identifier for the processor. While it is currently optional it will move to be required in the future.
39
+
40
+ The breaking part of this change is the modification of the `state` field in the `EntityProcessingRequest` and `EntityProcessingResult` types. This is unlikely to have any impact as the `state` field was previously unused, but could require some minor updates.
41
+
42
+ - c1836728e0: Add `/entities/by-name/:kind/:namespace/:name/ancestry` to get the "processing parents" lineage of an entity.
43
+
44
+ This involves a breaking change of adding the method `entityAncestry` to `EntitiesCatalog`.
45
+
46
+ ### Patch Changes
47
+
48
+ - 3d10360c82: When issuing a `full` update from an entity provider, entities with updates are now properly persisted.
49
+ - 9ea4565b00: Fixed a bug where internal references within the catalog were broken when new entities where added through entity providers, such as registering a new location or adding one in configuration. These broken references then caused some entities to be incorrectly marked as orphaned and prevented refresh from working properly.
50
+ - Updated dependencies
51
+ - @backstage/backend-common@0.9.5
52
+ - @backstage/integration@0.6.6
53
+
54
+ ## 0.14.0
55
+
56
+ ### Minor Changes
57
+
58
+ - d6f90e934d: #### Enforcing catalog rules
59
+
60
+ Apply the catalog rules enforcer, based on origin location.
61
+
62
+ This is a breaking change, in the sense that this was not properly checked in earlier versions of the new catalog engine. You may see ingestion of certain entities start to be rejected after this update, if the following conditions apply to you:
63
+
64
+ - You are using the configuration key `catalog.rules.[].allow`, and
65
+ - Your registered locations point (directly or transitively) to entities whose kinds are not listed in `catalog.rules.[].allow`
66
+
67
+ and/or
68
+
69
+ - You are using the configuration key `catalog.locations.[].rules.[].allow`
70
+ - The config locations point (directly or transitively) to entities whose kinds are not listed neither `catalog.rules.[].allow`, nor in the corresponding `.rules.[].allow` of that config location
71
+
72
+ This is an example of what the configuration might look like:
73
+
74
+ ```yaml
75
+ catalog:
76
+ # These do not list Template as a valid kind; users are therefore unable to
77
+ # manually register entities of the Template kind
78
+ rules:
79
+ - allow:
80
+ - Component
81
+ - API
82
+ - Resource
83
+ - Group
84
+ - User
85
+ - System
86
+ - Domain
87
+ - Location
88
+ locations:
89
+ # This lists Template as valid only for that specific config location
90
+ - type: file
91
+ target: ../../plugins/scaffolder-backend/sample-templates/all-templates.yaml
92
+ rules:
93
+ - allow: [Template]
94
+ ```
95
+
96
+ If you are not using any of those `rules` section, you should not be affected by this change.
97
+
98
+ If you do use any of those `rules` sections, make sure that they are complete and list all of the kinds that are in active use in your Backstage installation.
99
+
100
+ #### Other
101
+
102
+ Also, the class `CatalogRulesEnforcer` was renamed to `DefaultCatalogRulesEnforcer`, implementing the type `CatalogRulesEnforcer`.
103
+
104
+ - 501ce92f9c: Bitbucket Cloud Discovery support
105
+ - 89fd81a1ab: Add API endpoint for requesting a catalog refresh at `/refresh`, which is activated if a `RefreshService` is passed to `createRouter`.
106
+
107
+ The new method is used to trigger a refresh of an entity in an as localized was as possible, usually by refreshing the parent location.
108
+
109
+ ### Patch Changes
110
+
111
+ - 9ef2987a83: Update `createLocation` to optionally return `exists` to signal that the location already exists, this is only returned for dry runs.
112
+ - febddedcb2: Bump `lodash` to remediate `SNYK-JS-LODASH-590103` security vulnerability
113
+ - Updated dependencies
114
+ - @backstage/integration@0.6.5
115
+ - @backstage/catalog-client@0.4.0
116
+ - @backstage/catalog-model@0.9.3
117
+ - @backstage/backend-common@0.9.4
118
+ - @backstage/config@0.1.10
119
+
120
+ ## 0.13.8
121
+
122
+ ### Patch Changes
123
+
124
+ - fab79adde1: Add AWS S3 Discovery Processor. Add readTree() to AwsS3UrlReader. Add ReadableArrayResponse type that implements ReadTreeResponse to use in AwsS3UrlReader's readTree()
125
+ - a41ac6b952: Fill in most missing type exports.
126
+ - 96fef17a18: Upgrade git-parse-url to v11.6.0
127
+ - Updated dependencies
128
+ - @backstage/backend-common@0.9.3
129
+ - @backstage/integration@0.6.4
130
+
3
131
  ## 0.13.7
4
132
 
5
133
  ### Patch Changes