@backstage/plugin-catalog-backend 0.23.1 → 1.0.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 +245 -0
- package/alpha/package.json +1 -1
- package/config.d.ts +0 -33
- package/dist/index.alpha.d.ts +9 -702
- package/dist/index.beta.d.ts +9 -702
- package/dist/index.cjs.js +2068 -3250
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +9 -702
- package/migrations/20200702153613_entities.js +2 -2
- package/migrations/20200807120600_entitySearch.js +2 -2
- package/migrations/20201005122705_add_entity_full_name.js +1 -1
- package/migrations/20201006130744_entity_data_column.js +1 -1
- package/migrations/20201123205611_relations_table_uniq.js +2 -2
- package/migrations/20201210185851_fk_index.js +2 -2
- package/migrations/20201230103504_update_log_varchar.js +2 -2
- package/migrations/20210209121210_locations_fk_index.js +2 -2
- package/package.json +20 -24
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,250 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-backend
|
|
2
2
|
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- b58c70c223: This package has been promoted to v1.0! To understand how this change affects the package, please check out our [versioning policy](https://backstage.io/docs/overview/versioning-policy).
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- 6145ca7189: **BREAKING**: A number of types and classes have been removed, without a prior deprecation period. These were all very internal, essentially unused by the vast majority of users, and their being exposed was leading to excessive breaking of public interfaces for little-to-zero benefit. So for the 1.0 release of the catalog, the following interface changes have been made (but should have no effect on most users):
|
|
12
|
+
|
|
13
|
+
- The return type of `CatalogBuilder.build()` now only has the fields `processingEngine` and `router` which is what most users actually consume; the other three fields (`entitiesCatalog`, `locationAnalyzer`, `locationService`) that see very little use have been removed. If you were relying on the presence of either of these in any way, please [open an issue](https://github.com/backstage/backstage/issues/new/choose) that describes your use case, and we'll see how we could fill the gap.
|
|
14
|
+
|
|
15
|
+
- The function `createRouter` is removed; use `CatalogBuilder` as follows instead:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
const builder = await CatalogBuilder.create(env);
|
|
19
|
+
// add things as needed, e.g builder.addProcessor(new ScaffolderEntitiesProcessor());
|
|
20
|
+
const { processingEngine, router } = await builder.build();
|
|
21
|
+
await processingEngine.start();
|
|
22
|
+
return router;
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- The following types were removed:
|
|
26
|
+
|
|
27
|
+
- `CatalogProcessingOrchestrator`
|
|
28
|
+
- `CatalogRule`
|
|
29
|
+
- `CatalogRulesEnforcer`
|
|
30
|
+
- `EntityAncestryResponse`
|
|
31
|
+
- `EntityFacetsRequest`
|
|
32
|
+
- `EntityFacetsResponse`
|
|
33
|
+
- `EntityPagination`
|
|
34
|
+
- `EntityProcessingRequest`
|
|
35
|
+
- `EntityProcessingResult`
|
|
36
|
+
- `EntitiesCatalog`
|
|
37
|
+
- `EntitiesRequest`
|
|
38
|
+
- `EntitiesResponse`
|
|
39
|
+
- `LocationService`
|
|
40
|
+
- `LocationInput`
|
|
41
|
+
- `LocationStore`
|
|
42
|
+
- `PageInfo`
|
|
43
|
+
- `RefreshOptions`
|
|
44
|
+
- `RefreshService`
|
|
45
|
+
- `RouterOptions`
|
|
46
|
+
|
|
47
|
+
- The following classes were removed:
|
|
48
|
+
|
|
49
|
+
- `DefaultCatalogProcessingOrchestrator`
|
|
50
|
+
- `DefaultCatalogRulesEnforcer`
|
|
51
|
+
|
|
52
|
+
- 02ad19d189: **BREAKING**: Removed the deprecated `metadata.generation` field entirely. It is no longer present in TS types, nor in the REST API output. Entities that have not yet been re-stitched may still have the field present for some time, but it will get phased out gradually by your catalog instance.
|
|
53
|
+
- 7250b6993d: **BREAKING**: Removed the previously deprecated `results` export. Please use `processingResult` instead.
|
|
54
|
+
- 077e7c132f: **BREAKING**: Removed the following deprecated symbols:
|
|
55
|
+
|
|
56
|
+
- `catalogBuilder.setRefreshInterval`, use `catalogBuilder.setProcessingInterval` instead.
|
|
57
|
+
- `catalogBuilder.setRefreshIntervalSeconds`, use `catalogBuilder.setProcessingIntervalSeconds` instead.
|
|
58
|
+
- `createRandomRefreshInterval`, use `createRandomProcessingInterval` instead.
|
|
59
|
+
- `RefreshIntervalFunction`, use `ProcessingIntervalFunction` instead.
|
|
60
|
+
|
|
61
|
+
- 74375be2c6: **BREAKING**: Removed the export of the `RecursivePartial` utility type. If you relied on this type it can be redefined like this:
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
type RecursivePartial<T> = {
|
|
65
|
+
[P in keyof T]?: T[P] extends (infer U)[]
|
|
66
|
+
? RecursivePartial<U>[]
|
|
67
|
+
: T[P] extends object
|
|
68
|
+
? RecursivePartial<T[P]>
|
|
69
|
+
: T[P];
|
|
70
|
+
};
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
- ced3016f2a: **BREAKING**: The deprecated `CatalogEntityDocument` export has been removed, it can be imported from `@backstage/plugin-catalog-common` instead.
|
|
74
|
+
- 0163c41be2: **BREAKING**: Removed the deprecated `presence` field from `LocationInput`.
|
|
75
|
+
- d3e9ec43b7: **BREAKING**: Removed the `target` property from `EntityRelation`. This field has been replaced by `targetRef`.
|
|
76
|
+
This means that `target: { name: 'team-a', kind: 'group', namespace: 'default' }` is now replaced with `targetRef: 'group:default/team-a'` in entity relations.
|
|
77
|
+
|
|
78
|
+
The entities API endpoint still return the old `target` field for to ease transitions, however the future removal of this field will be considered non breaking.
|
|
79
|
+
|
|
80
|
+
### Patch Changes
|
|
81
|
+
|
|
82
|
+
- 89c7e47967: Minor README update
|
|
83
|
+
- 26fb159a30: Pass in auth token to ancestry endpoint
|
|
84
|
+
- efc73db10c: Use `better-sqlite3` instead of `@vscode/sqlite3`
|
|
85
|
+
- f24ef7864e: Minor typo fixes
|
|
86
|
+
- e949d68059: Made sure to move the catalog-related github and ldap config into their right places
|
|
87
|
+
- Updated dependencies
|
|
88
|
+
- @backstage/backend-common@0.13.1
|
|
89
|
+
- @backstage/catalog-model@1.0.0
|
|
90
|
+
- @backstage/plugin-scaffolder-common@1.0.0
|
|
91
|
+
- @backstage/integration@1.0.0
|
|
92
|
+
- @backstage/catalog-client@1.0.0
|
|
93
|
+
- @backstage/config@1.0.0
|
|
94
|
+
- @backstage/errors@1.0.0
|
|
95
|
+
- @backstage/types@1.0.0
|
|
96
|
+
- @backstage/plugin-catalog-common@1.0.0
|
|
97
|
+
- @backstage/plugin-permission-common@0.5.3
|
|
98
|
+
- @backstage/plugin-permission-node@0.5.5
|
|
99
|
+
- @backstage/plugin-search-common@0.3.2
|
|
100
|
+
|
|
101
|
+
## 0.24.0
|
|
102
|
+
|
|
103
|
+
### Minor Changes
|
|
104
|
+
|
|
105
|
+
- 66ba5d9023: **BREAKING**: Removed `GithubDiscoveryProcessor`, `GithubMultiOrgReaderProcessor`, `GitHubOrgEntityProvider`, `GithubOrgReaderProcessor`, and `GithubMultiOrgConfig` which now instead should be imported from `@backstage/plugin-catalog-backend-module-github`. NOTE THAT the `GithubDiscoveryProcessor` and `GithubOrgReaderProcessor` were part of the default set of processors in the catalog backend, and if you are a user of discovery or location based org ingestion on GitLab, you MUST now add them manually in the catalog initialization code of your backend.
|
|
106
|
+
|
|
107
|
+
```diff
|
|
108
|
+
// In packages/backend/src/plugins/catalog.ts
|
|
109
|
+
+import {
|
|
110
|
+
+ GithubDiscoveryProcessor,
|
|
111
|
+
+ GithubOrgReaderProcessor,
|
|
112
|
+
+} from '@backstage/plugin-catalog-backend-module-github';
|
|
113
|
+
+import {
|
|
114
|
+
+ ScmIntegrations,
|
|
115
|
+
+ DefaultGithubCredentialsProvider
|
|
116
|
+
+} from '@backstage/integration';
|
|
117
|
+
|
|
118
|
+
export default async function createPlugin(
|
|
119
|
+
env: PluginEnvironment,
|
|
120
|
+
): Promise<Router> {
|
|
121
|
+
const builder = await CatalogBuilder.create(env);
|
|
122
|
+
+ const integrations = ScmIntegrations.fromConfig(config);
|
|
123
|
+
+ const githubCredentialsProvider =
|
|
124
|
+
+ DefaultGithubCredentialsProvider.fromIntegrations(integrations);
|
|
125
|
+
+ builder.addProcessor(
|
|
126
|
+
+ GithubDiscoveryProcessor.fromConfig(config, {
|
|
127
|
+
+ logger,
|
|
128
|
+
+ githubCredentialsProvider,
|
|
129
|
+
+ }),
|
|
130
|
+
+ GithubOrgReaderProcessor.fromConfig(config, {
|
|
131
|
+
+ logger,
|
|
132
|
+
+ githubCredentialsProvider,
|
|
133
|
+
+ }),
|
|
134
|
+
+ );
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**BREAKING**: Removed `GitLabDiscoveryProcessor`, which now instead should be imported from `@backstage/plugin-catalog-backend-module-gitlab`. NOTE THAT this processor was part of the default set of processors in the catalog backend, and if you are a user of discovery on GitLab, you MUST now add it manually in the catalog initialization code of your backend.
|
|
138
|
+
|
|
139
|
+
```diff
|
|
140
|
+
// In packages/backend/src/plugins/catalog.ts
|
|
141
|
+
+import { GitLabDiscoveryProcessor } from '@backstage/plugin-catalog-backend-module-gitlab';
|
|
142
|
+
|
|
143
|
+
export default async function createPlugin(
|
|
144
|
+
env: PluginEnvironment,
|
|
145
|
+
): Promise<Router> {
|
|
146
|
+
const builder = await CatalogBuilder.create(env);
|
|
147
|
+
+ builder.addProcessor(
|
|
148
|
+
+ GitLabDiscoveryProcessor.fromConfig(env.config, { logger: env.logger })
|
|
149
|
+
+ );
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**BREAKING**: Removed `BitbucketDiscoveryProcessor`, which now instead should be imported from `@backstage/plugin-catalog-backend-module-bitbucket`. NOTE THAT this processor was part of the default set of processors in the catalog backend, and if you are a user of discovery on Bitbucket, you MUST now add it manually in the catalog initialization code of your backend.
|
|
153
|
+
|
|
154
|
+
```diff
|
|
155
|
+
// In packages/backend/src/plugins/catalog.ts
|
|
156
|
+
+import { BitbucketDiscoveryProcessor } from '@backstage/plugin-catalog-backend-module-bitbucket';
|
|
157
|
+
|
|
158
|
+
export default async function createPlugin(
|
|
159
|
+
env: PluginEnvironment,
|
|
160
|
+
): Promise<Router> {
|
|
161
|
+
const builder = await CatalogBuilder.create(env);
|
|
162
|
+
+ builder.addProcessor(
|
|
163
|
+
+ BitbucketDiscoveryProcessor.fromConfig(env.config, { logger: env.logger })
|
|
164
|
+
+ );
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**BREAKING**: Removed `AzureDevOpsDiscoveryProcessor`, which now instead should be imported from `@backstage/plugin-catalog-backend-module-azure`. This processor was not part of the set of default processors. If you were using it, you should already have a reference to it in your backend code and only need to update the import.
|
|
168
|
+
|
|
169
|
+
**BREAKING**: Removed the formerly deprecated type `BitbucketRepositoryParser`, which is instead reintroduced in `@backstage/plugin-catalog-backend-module-bitbucket`.
|
|
170
|
+
|
|
171
|
+
- f115a7f8fd: **BREAKING**: Removed `AwsS3DiscoveryProcessor`, which now instead should be imported from `@backstage/plugin-catalog-backend-module-aws`.
|
|
172
|
+
- 55150919ed: - **BREAKING**: Support for `backstage.io/v1beta2` Software Templates has been removed. Please migrate your legacy templates to the new `scaffolder.backstage.io/v1beta3` `apiVersion` by following the [migration guide](https://backstage.io/docs/features/software-templates/migrating-from-v1beta2-to-v1beta3)
|
|
173
|
+
|
|
174
|
+
### Patch Changes
|
|
175
|
+
|
|
176
|
+
- ab7cd7d70e: Do some groundwork for supporting the `better-sqlite3` driver, to maybe eventually replace `@vscode/sqlite3` (#9912)
|
|
177
|
+
- e0a69ba49f: build(deps): bump `fs-extra` from 9.1.0 to 10.0.1
|
|
178
|
+
- 616f02ade2: support Bitbucket Cloud's code search to discover catalog files (multiple per repo, Location entities for existing files only)
|
|
179
|
+
- e421d77536: **BREAKING**:
|
|
180
|
+
|
|
181
|
+
- Removed the previously deprecated `runPeriodically` export. Please use the `@backstage/backend-tasks` package instead, or copy [the actual implementation](https://github.com/backstage/backstage/blob/02875d4d56708c60f86f6b0a5b3da82e24988354/plugins/catalog-backend/src/util/runPeriodically.ts#L29) into your own code if you explicitly do not want coordination of task runs across your worker nodes.
|
|
182
|
+
- Removed the previously deprecated `CatalogProcessorLocationResult.optional` field. Please set the corresponding `LocationSpec.presence` field to `'optional'` instead.
|
|
183
|
+
- Related to the previous point, the `processingResult.location` function no longer has a second boolean `optional` argument. Please set the corresponding `LocationSpec.presence` field to `'optional'` instead.
|
|
184
|
+
- Removed the previously deprecated `StaticLocationProcessor`. It has not been in use for some time; its functionality is covered by `ConfigLocationEntityProvider` instead.
|
|
185
|
+
|
|
186
|
+
- 3c2bc73901: Use `setupRequestMockHandlers` from `@backstage/backend-test-utils`
|
|
187
|
+
- c1168bb440: Fixed display of the location in the log message that is printed when entity envelope validation fails.
|
|
188
|
+
- b1aacbf96a: Applied the fix for the `/alpha` entry point resolution that was part of the `v0.70.1` release of Backstage.
|
|
189
|
+
- 3e54f6c436: Use `@backstage/plugin-search-common` package instead of `@backstage/search-common`.
|
|
190
|
+
- Updated dependencies
|
|
191
|
+
- @backstage/backend-common@0.13.0
|
|
192
|
+
- @backstage/plugin-scaffolder-common@0.3.0
|
|
193
|
+
- @backstage/catalog-model@0.13.0
|
|
194
|
+
- @backstage/plugin-catalog-common@0.2.2
|
|
195
|
+
- @backstage/plugin-search-common@0.3.1
|
|
196
|
+
- @backstage/catalog-client@0.9.0
|
|
197
|
+
- @backstage/plugin-permission-node@0.5.4
|
|
198
|
+
|
|
199
|
+
## 0.24.0-next.0
|
|
200
|
+
|
|
201
|
+
### Minor Changes
|
|
202
|
+
|
|
203
|
+
- 66ba5d9023: **BREAKING**: Removed `GitLabDiscoveryProcessor`, which now instead should be imported from `@backstage/plugin-catalog-backend-module-gitlab`. NOTE THAT this processor was part of the default set of processors in the catalog backend, and if you are a user of discovery on GitLab, you MUST now add it manually in the catalog initialization code of your backend.
|
|
204
|
+
|
|
205
|
+
```diff
|
|
206
|
+
// In packages/backend/src/plugins/catalog.ts
|
|
207
|
+
+import { GitLabDiscoveryProcessor } from '@backstage/plugin-catalog-backend-module-gitlab';
|
|
208
|
+
|
|
209
|
+
export default async function createPlugin(
|
|
210
|
+
env: PluginEnvironment,
|
|
211
|
+
): Promise<Router> {
|
|
212
|
+
const builder = await CatalogBuilder.create(env);
|
|
213
|
+
+ builder.addProcessor(
|
|
214
|
+
+ GitLabDiscoveryProcessor.fromConfig(env.config, { logger: env.logger })
|
|
215
|
+
+ );
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**BREAKING**: Removed `AzureDevOpsDiscoveryProcessor`, which now instead should be imported from `@backstage/plugin-catalog-backend-module-azure`. This processor was not part of the set of default processors. If you were using it, you should already have a reference to it in your backend code and only need to update the import.
|
|
219
|
+
|
|
220
|
+
- f115a7f8fd: **BREAKING**: Removed `AwsS3DiscoveryProcessor`, which now instead should be imported from `@backstage/plugin-catalog-backend-module-aws`.
|
|
221
|
+
- 55150919ed: - **BREAKING**: Support for `backstage.io/v1beta2` Software Templates has been removed. Please migrate your legacy templates to the new `scaffolder.backstage.io/v1beta3` `apiVersion` by following the [migration guide](https://backstage.io/docs/features/software-templates/migrating-from-v1beta2-to-v1beta3)
|
|
222
|
+
|
|
223
|
+
### Patch Changes
|
|
224
|
+
|
|
225
|
+
- ab7cd7d70e: Do some groundwork for supporting the `better-sqlite3` driver, to maybe eventually replace `@vscode/sqlite3` (#9912)
|
|
226
|
+
- e0a69ba49f: build(deps): bump `fs-extra` from 9.1.0 to 10.0.1
|
|
227
|
+
- 616f02ade2: support Bitbucket Cloud's code search to discover catalog files (multiple per repo, Location entities for existing files only)
|
|
228
|
+
- e421d77536: **BREAKING**:
|
|
229
|
+
|
|
230
|
+
- Removed the previously deprecated `runPeriodically` export. Please use the `@backstage/backend-tasks` package instead, or copy [the actual implementation](https://github.com/backstage/backstage/blob/02875d4d56708c60f86f6b0a5b3da82e24988354/plugins/catalog-backend/src/util/runPeriodically.ts#L29) into your own code if you explicitly do not want coordination of task runs across your worker nodes.
|
|
231
|
+
- Removed the previously deprecated `CatalogProcessorLocationResult.optional` field. Please set the corresponding `LocationSpec.presence` field to `'optional'` instead.
|
|
232
|
+
- Related to the previous point, the `processingResult.location` function no longer has a second boolean `optional` argument. Please set the corresponding `LocationSpec.presence` field to `'optional'` instead.
|
|
233
|
+
- Removed the previously deprecated `StaticLocationProcessor`. It has not been in use for some time; its functionality is covered by `ConfigLocationEntityProvider` instead.
|
|
234
|
+
|
|
235
|
+
- 3c2bc73901: Use `setupRequestMockHandlers` from `@backstage/backend-test-utils`
|
|
236
|
+
- c1168bb440: Fixed display of the location in the log message that is printed when entity envelope validation fails.
|
|
237
|
+
- b1aacbf96a: Applied the fix for the `/alpha` entry point resolution that was part of the `v0.70.1` release of Backstage.
|
|
238
|
+
- 3e54f6c436: Use `@backstage/plugin-search-common` package instead of `@backstage/search-common`.
|
|
239
|
+
- Updated dependencies
|
|
240
|
+
- @backstage/backend-common@0.13.0-next.0
|
|
241
|
+
- @backstage/plugin-scaffolder-common@0.3.0-next.0
|
|
242
|
+
- @backstage/catalog-model@0.13.0-next.0
|
|
243
|
+
- @backstage/plugin-catalog-common@0.2.2-next.0
|
|
244
|
+
- @backstage/plugin-search-common@0.3.1-next.0
|
|
245
|
+
- @backstage/catalog-client@0.9.0-next.0
|
|
246
|
+
- @backstage/plugin-permission-node@0.5.4-next.0
|
|
247
|
+
|
|
3
248
|
## 0.23.1
|
|
4
249
|
|
|
5
250
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/config.d.ts
CHANGED
|
@@ -105,38 +105,5 @@ export interface Config {
|
|
|
105
105
|
allow: Array<string>;
|
|
106
106
|
}>;
|
|
107
107
|
}>;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* List of processor-specific options and attributes
|
|
111
|
-
*/
|
|
112
|
-
processors?: {
|
|
113
|
-
/**
|
|
114
|
-
* GithubMultiOrgReaderProcessor configuration
|
|
115
|
-
*/
|
|
116
|
-
githubMultiOrg?: {
|
|
117
|
-
/**
|
|
118
|
-
* The configuration parameters for each GitHub org to process.
|
|
119
|
-
*/
|
|
120
|
-
orgs: Array<{
|
|
121
|
-
/**
|
|
122
|
-
* The name of the GitHub org to process.
|
|
123
|
-
*/
|
|
124
|
-
name: string;
|
|
125
|
-
/**
|
|
126
|
-
* The namespace of the group created for this org.
|
|
127
|
-
*
|
|
128
|
-
* Defaults to org name if omitted.
|
|
129
|
-
*/
|
|
130
|
-
groupNamespace?: string;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* The namespace of the users created from this org.
|
|
134
|
-
*
|
|
135
|
-
* Defaults to empty string if omitted.
|
|
136
|
-
*/
|
|
137
|
-
userNamespace?: string;
|
|
138
|
-
}>;
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
108
|
};
|
|
142
109
|
}
|