@backstage/plugin-catalog-backend 0.21.4 → 0.23.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 +187 -6
- package/alpha/package.json +6 -0
- package/config.d.ts +0 -48
- package/dist/index.alpha.d.ts +1506 -0
- package/dist/index.beta.d.ts +1427 -0
- package/dist/index.cjs.js +1504 -1375
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1427 -0
- package/migrations/20220222164811_reprocess_for_relation_refs.js +31 -0
- package/package.json +23 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,186 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-backend
|
|
2
2
|
|
|
3
|
+
## 0.23.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 0c9cf2822d: **Breaking**: Mark permission-related exports as alpha. This means that the exports below should now be imported from `@backstage/plugin-catalog-backend/alpha` instead of `@backstage/plugin-catalog-backend`.
|
|
8
|
+
|
|
9
|
+
- `catalogConditions`
|
|
10
|
+
- `createCatalogPolicyDecision`
|
|
11
|
+
- `permissionRules`
|
|
12
|
+
- `createCatalogPermissionRule`
|
|
13
|
+
|
|
14
|
+
- 862e416239: **Breaking**: Removed `entityRef` from `CatalogProcessorRelationResult`. The field is not used by the catalog and relation information is already available inside the `reation` property.
|
|
15
|
+
- c85292b768: **Breaking**: Removed optional `handleError()` from `CatalogProcessor`. This optional method is never called by the catalog processing engine and can therefore be removed.
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 83a83381b0: **DEPRECATED**: The `results` export, and instead adding `processingResult` with the same shape and purpose.
|
|
20
|
+
- 83a83381b0: Internal restructuring to collect the various provider files in a `modules` folder while waiting to be externalized
|
|
21
|
+
- fc6d31b5c3: Deprecated the `BitbucketRepositoryParser` type.
|
|
22
|
+
- 022507c860: A `DefaultCatalogCollatorFactory`, which works with the new stream-based
|
|
23
|
+
search indexing subsystem, is now available. The `DefaultCatalogCollator` will
|
|
24
|
+
continue to be available for those unable to upgrade to the stream-based
|
|
25
|
+
`@backstage/search-backend-node` (and related packages), however it is now
|
|
26
|
+
marked as deprecated and will be removed in a future version.
|
|
27
|
+
|
|
28
|
+
To upgrade this plugin and the search indexing subsystem in one go, check
|
|
29
|
+
[this upgrade guide](https://backstage.io/docs/features/search/how-to-guides#how-to-migrate-from-search-alpha-to-beta)
|
|
30
|
+
for necessary changes to your search backend plugin configuration.
|
|
31
|
+
|
|
32
|
+
- ab7b6cb7b1: **DEPRECATION**: Moved the `CatalogEntityDocument` to `@backstage/plugin-catalog-common` and deprecated the export from `@backstage/plugin-catalog-backend`.
|
|
33
|
+
|
|
34
|
+
A new `type` field has also been added to `CatalogEntityDocument` as a replacement for `componentType`, which is now deprecated. Both fields are still present and should be set to the same value in order to avoid issues with indexing.
|
|
35
|
+
|
|
36
|
+
Any search customizations need to be updated to use this new `type` field instead, including any custom frontend filters, custom frontend result components, custom search decorators, or non-default Catalog collator implementations.
|
|
37
|
+
|
|
38
|
+
- cb09096607: Tweaked the wording of the "does not have a location" errors to include the actual missing annotation name, to help users better in fixing their inputs.
|
|
39
|
+
- 36aa63022b: Use `CompoundEntityRef` instead of `EntityName`, and `getCompoundEntityRef` instead of `getEntityName`, from `@backstage/catalog-model`.
|
|
40
|
+
- b753d22a56: **DEPRECATION**: Deprecated the `RefreshIntervalFunction` and `createRandomRefreshInterval` in favour of the `ProcessingIntervalFunction` and `createRandomProcessingInterval` type and method respectively. Please migrate to use the new names.
|
|
41
|
+
|
|
42
|
+
**DEPRECATION**: Deprecated the `setRefreshInterval` and `setRefreshIntervalSeconds` methods on the `CatalogBuilder` for the new `setProcessingInterval` and `setProcessingIntervalSeconds` methods. Please migrate to use the new names.
|
|
43
|
+
|
|
44
|
+
- Updated dependencies
|
|
45
|
+
- @backstage/catalog-model@0.12.0
|
|
46
|
+
- @backstage/catalog-client@0.8.0
|
|
47
|
+
- @backstage/backend-common@0.12.0
|
|
48
|
+
- @backstage/plugin-catalog-common@0.2.0
|
|
49
|
+
- @backstage/integration@0.8.0
|
|
50
|
+
- @backstage/plugin-permission-common@0.5.2
|
|
51
|
+
- @backstage/plugin-permission-node@0.5.3
|
|
52
|
+
- @backstage/search-common@0.3.0
|
|
53
|
+
- @backstage/plugin-scaffolder-common@0.2.3
|
|
54
|
+
|
|
55
|
+
## 0.22.0
|
|
56
|
+
|
|
57
|
+
### Minor Changes
|
|
58
|
+
|
|
59
|
+
- 209fd128e6: The `CodeOwnersProcessor` no longer supports the deprecated SCM-specific location types like `'github/api'`. This is a breaking change but it is unlikely to have an impact, as these location types haven't been supported by the rest of the catalog for a long time.
|
|
60
|
+
- 9876e7f172: **BREAKING**: Removed unused `durationText` utility.
|
|
61
|
+
- 25e97e7242: **BREAKING**: Removed `AwsOrganizationCloudAccountProcessor` from the default
|
|
62
|
+
set of builtin processors, and instead moved it into its own module
|
|
63
|
+
`@backstage/plugin-catalog-backend-module-aws`.
|
|
64
|
+
|
|
65
|
+
If you were using this processor, through making use of the location type
|
|
66
|
+
`aws-cloud-accounts` and/or using the configuration key
|
|
67
|
+
`catalog.processors.awsOrganization`, you will from now on have to add the
|
|
68
|
+
processor manually to your catalog.
|
|
69
|
+
|
|
70
|
+
First, add the `@backstage/plugin-catalog-backend-module-aws` dependency to your
|
|
71
|
+
`packages/backend` package.
|
|
72
|
+
|
|
73
|
+
Then, in `packages/backend/src/plugins/catalog.ts`:
|
|
74
|
+
|
|
75
|
+
```diff
|
|
76
|
+
+import { AwsOrganizationCloudAccountProcessor } from '@backstage/plugin-catalog-backend-module-aws';
|
|
77
|
+
|
|
78
|
+
export default async function createPlugin(
|
|
79
|
+
env: PluginEnvironment,
|
|
80
|
+
): Promise<Router> {
|
|
81
|
+
const builder = await CatalogBuilder.create(env);
|
|
82
|
+
+ builder.addProcessor(
|
|
83
|
+
+ AwsOrganizationCloudAccountProcessor.fromConfig(
|
|
84
|
+
+ env.config,
|
|
85
|
+
+ { logger: env.logger }
|
|
86
|
+
+ )
|
|
87
|
+
+ );
|
|
88
|
+
// ...
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
- e9cf0dd03e: Made the `GitLabDiscoveryProcessor.updateLastActivity` method private, as it was accidentally exposed. It has also been fixed to properly operate in its own cache namespace to avoid collisions with other processors.
|
|
92
|
+
- df61ca71dd: Updated all processors to implement `getProcessorName`.
|
|
93
|
+
|
|
94
|
+
**BREAKING**: The `CatalogProcessor` interface now require that the `CatalogProcessor` class implements `getProcessorName()`.
|
|
95
|
+
The processor name has previously defaulted processor class name. It's therefore _recommended_ to keep your return the same name as the class name if you did not implement this method previously.
|
|
96
|
+
|
|
97
|
+
For example:
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
class CustomProcessor implements CatalogProcessor {
|
|
101
|
+
getProcessorName() {
|
|
102
|
+
// Use the same name as the class name if this method was not previously implemented.
|
|
103
|
+
return 'CustomProcessor';
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Patch Changes
|
|
109
|
+
|
|
110
|
+
- 919cf2f836: The catalog API now returns entity relations that have three fields: The old
|
|
111
|
+
`type` and `target` fields, as well as a new `targetRef` field. The last one is
|
|
112
|
+
the stringified form of the second one.
|
|
113
|
+
|
|
114
|
+
**DEPRECATION**: The `target` field is hereby deprecated, both as seen from the
|
|
115
|
+
catalog API as well as from the `@backstage/catalog-model` package. Both
|
|
116
|
+
`target` and `targetRef` will be produced for some time, but eventually,
|
|
117
|
+
`target` will be removed entirely. Please update your readers to stop consuming
|
|
118
|
+
the `relations.[].target` field from the catalog API as soon as possible.
|
|
119
|
+
|
|
120
|
+
- 957cb4cb20: Deprecated the `runPeriodically` function which is no longer in use.
|
|
121
|
+
- 01e124ea60: Added an `/entity-facets` endpoint, which lets you query the distribution of
|
|
122
|
+
possible values for fields of entities.
|
|
123
|
+
|
|
124
|
+
This can be useful for example when populating a dropdown in the user interface,
|
|
125
|
+
such as listing all tag values that are actually being used right now in your
|
|
126
|
+
catalog instance, along with putting the most common ones at the top.
|
|
127
|
+
|
|
128
|
+
- 082c32f948: Deprecated the second parameter of `results.location()` that determines whether an emitted location is optional. In cases where this is currently being set to `false`, the parameter can simply be dropped, as that is the default. Usage where this was being set to `true` should be migrated to set the `presence` option of the emitted location to `optional`. For example:
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
results.location(
|
|
132
|
+
{
|
|
133
|
+
type: 'url',
|
|
134
|
+
target: 'http://example.com/foo',
|
|
135
|
+
},
|
|
136
|
+
true,
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
// migrated to
|
|
140
|
+
|
|
141
|
+
results.location({
|
|
142
|
+
type: 'url',
|
|
143
|
+
target: 'http://example.com/foo',
|
|
144
|
+
presence: 'optional',
|
|
145
|
+
});
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
- ed09ad8093: Added `LocationSpec`, which was moved over from `@backstage/catalog-model`.
|
|
149
|
+
|
|
150
|
+
Added `LocationInput`, which replaced `LocationSpec` where it was used in the `LocationService` and `LocationStore` interfaces. The `LocationInput` type deprecates the `presence` field, which was not being used in those contexts.
|
|
151
|
+
|
|
152
|
+
- 6d994fd9da: Cleanup catalog-backend API report.
|
|
153
|
+
- 7010349c9a: Added `EntityRelationSpec`, which was moved over from `@backstage/catalog-model`.
|
|
154
|
+
- 6e1cbc12a6: Updated according to the new `getEntityFacets` catalog API method
|
|
155
|
+
- 420f8d710f: Removed the `processors.githubOrg` config section which is unused and has been replaced by the integrations config.
|
|
156
|
+
- b1296f1f57: Deprecated `StaticLocationProcessor` which is unused and replaced by `ConfigLocationEntityProvider`.
|
|
157
|
+
- Updated dependencies
|
|
158
|
+
- @backstage/backend-common@0.11.0
|
|
159
|
+
- @backstage/plugin-scaffolder-common@0.2.2
|
|
160
|
+
- @backstage/catalog-model@0.11.0
|
|
161
|
+
- @backstage/catalog-client@0.7.2
|
|
162
|
+
- @backstage/plugin-permission-node@0.5.2
|
|
163
|
+
- @backstage/integration@0.7.5
|
|
164
|
+
|
|
165
|
+
## 0.21.5
|
|
166
|
+
|
|
167
|
+
### Patch Changes
|
|
168
|
+
|
|
169
|
+
- Fix for the previous release with missing type declarations.
|
|
170
|
+
- Updated dependencies
|
|
171
|
+
- @backstage/backend-common@0.10.9
|
|
172
|
+
- @backstage/catalog-client@0.7.1
|
|
173
|
+
- @backstage/catalog-model@0.10.1
|
|
174
|
+
- @backstage/config@0.1.15
|
|
175
|
+
- @backstage/errors@0.2.2
|
|
176
|
+
- @backstage/integration@0.7.4
|
|
177
|
+
- @backstage/search-common@0.2.4
|
|
178
|
+
- @backstage/types@0.1.3
|
|
179
|
+
- @backstage/plugin-catalog-common@0.1.4
|
|
180
|
+
- @backstage/plugin-permission-common@0.5.1
|
|
181
|
+
- @backstage/plugin-permission-node@0.5.1
|
|
182
|
+
- @backstage/plugin-scaffolder-common@0.2.1
|
|
183
|
+
|
|
3
184
|
## 0.21.4
|
|
4
185
|
|
|
5
186
|
### Patch Changes
|
|
@@ -765,16 +946,16 @@
|
|
|
765
946
|
|
|
766
947
|
### Minor Changes
|
|
767
948
|
|
|
768
|
-
- 8bfc0571c: Add a default catalog value for BitBucketDiscoveryProcessor. This allows to have a target like so: https://bitbucket.mycompany.com/projects/backstage/repos/service
|
|
769
|
-
which will be expanded to https://bitbucket.mycompany.com/projects/backstage/repos/service-a/catalog-info.yaml given that repository 'service-a' exists.
|
|
949
|
+
- 8bfc0571c: Add a default catalog value for BitBucketDiscoveryProcessor. This allows to have a target like so: `https://bitbucket.mycompany.com/projects/backstage/repos/service-*`
|
|
950
|
+
which will be expanded to `https://bitbucket.mycompany.com/projects/backstage/repos/service-a/catalog-info.yaml` given that repository 'service-a' exists.
|
|
770
951
|
|
|
771
952
|
## Migration
|
|
772
953
|
|
|
773
954
|
If you are using a custom [Bitbucket parser](https://backstage.io/docs/integrations/bitbucket/discovery#custom-repository-processing) and your `bitbucket-discovery` target (e.g. in your app-config.yaml) omits the catalog path in any of the following ways:
|
|
774
955
|
|
|
775
|
-
- https://bitbucket.mycompany.com/projects/backstage/repos/service
|
|
776
|
-
- https://bitbucket.mycompany.com/projects/backstage/repos
|
|
777
|
-
- https://bitbucket.mycompany.com/projects/backstage/repos
|
|
956
|
+
- `https://bitbucket.mycompany.com/projects/backstage/repos/service-*`
|
|
957
|
+
- `https://bitbucket.mycompany.com/projects/backstage/repos/*`
|
|
958
|
+
- `https://bitbucket.mycompany.com/projects/backstage/repos/*/`
|
|
778
959
|
|
|
779
960
|
then you will be affected by this change.
|
|
780
961
|
The 'target' input to your parser before this commit would be '/', and after this commit it will be '/catalog-info.yaml', and as such needs to be handled to maintain the same functionality.
|
|
@@ -1092,7 +1273,7 @@
|
|
|
1092
1273
|
|
|
1093
1274
|
- 0fd4ea443: Updates the `GithubCredentialsProvider` to return the token type, it can either be `token` or `app` depending on the authentication method.
|
|
1094
1275
|
|
|
1095
|
-
Update the `GithubOrgReaderProcessor` NOT to query for email addresses if GitHub Apps is used for authentication, this is due to inconsistencies in the GitHub API when using server to server communications and installation tokens. https://github.community/t/api-v4-unable-to-retrieve-email-resource-not-accessible-by-integration/13831/4 for more info.
|
|
1276
|
+
Update the `GithubOrgReaderProcessor` NOT to query for email addresses if GitHub Apps is used for authentication, this is due to inconsistencies in the GitHub API when using server to server communications and installation tokens. See [this community discussion](https://github.community/t/api-v4-unable-to-retrieve-email-resource-not-accessible-by-integration/13831/4) for more info.
|
|
1096
1277
|
|
|
1097
1278
|
**Removes** deprecated GithubOrgReaderProcessor provider configuration(`catalog.processors.githubOrg`). If you're using the deprecated config section make sure to migrate to [integrations](https://backstage.io/docs/integrations/github/locations) instead.
|
|
1098
1279
|
|
package/config.d.ts
CHANGED
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { JsonValue } from '@backstage/config';
|
|
18
|
-
|
|
19
17
|
export interface Config {
|
|
20
18
|
/**
|
|
21
19
|
* Configuration options for the catalog plugin.
|
|
@@ -112,39 +110,6 @@ export interface Config {
|
|
|
112
110
|
* List of processor-specific options and attributes
|
|
113
111
|
*/
|
|
114
112
|
processors?: {
|
|
115
|
-
/**
|
|
116
|
-
* GithubOrgReaderProcessor configuration
|
|
117
|
-
*
|
|
118
|
-
* @deprecated Configure a GitHub integration instead.
|
|
119
|
-
*/
|
|
120
|
-
githubOrg?: {
|
|
121
|
-
/**
|
|
122
|
-
* The configuration parameters for each single GitHub org provider.
|
|
123
|
-
*/
|
|
124
|
-
providers: Array<{
|
|
125
|
-
/**
|
|
126
|
-
* The prefix of the target that this matches on, e.g.
|
|
127
|
-
* "https://github.com", with no trailing slash.
|
|
128
|
-
*/
|
|
129
|
-
target: string;
|
|
130
|
-
/**
|
|
131
|
-
* The base URL of the API of this provider, e.g.
|
|
132
|
-
* "https://api.github.com", with no trailing slash.
|
|
133
|
-
*
|
|
134
|
-
* May be omitted specifically for GitHub; then it will be deduced.
|
|
135
|
-
*/
|
|
136
|
-
apiBaseUrl?: string;
|
|
137
|
-
/**
|
|
138
|
-
* The authorization token to use for requests to this provider.
|
|
139
|
-
*
|
|
140
|
-
* If no token is specified, anonymous access is used.
|
|
141
|
-
*
|
|
142
|
-
* @visibility secret
|
|
143
|
-
*/
|
|
144
|
-
token?: string;
|
|
145
|
-
}>;
|
|
146
|
-
};
|
|
147
|
-
|
|
148
113
|
/**
|
|
149
114
|
* GithubMultiOrgReaderProcessor configuration
|
|
150
115
|
*/
|
|
@@ -172,19 +137,6 @@ export interface Config {
|
|
|
172
137
|
userNamespace?: string;
|
|
173
138
|
}>;
|
|
174
139
|
};
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* AwsOrganizationCloudAccountProcessor configuration
|
|
178
|
-
*/
|
|
179
|
-
awsOrganization?: {
|
|
180
|
-
provider: {
|
|
181
|
-
/**
|
|
182
|
-
* The role to be assumed by this processor
|
|
183
|
-
*
|
|
184
|
-
*/
|
|
185
|
-
roleArn?: string;
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
140
|
};
|
|
189
141
|
};
|
|
190
142
|
}
|