Version Packages (next)
This commit is contained in:
@@ -1,5 +1,54 @@
|
||||
# @backstage/plugin-tech-insights-backend
|
||||
|
||||
## 0.2.0-next.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- dfd5e81721: BREAKING CHANGES:
|
||||
|
||||
- The helper function to create a fact retriever registration is now expecting an object of configuration items instead of individual arguments.
|
||||
Modify your `techInsights.ts` plugin configuration in `packages/backend/src/plugins/techInsights.ts` (or equivalent) the following way:
|
||||
|
||||
```diff
|
||||
-createFactRetrieverRegistration(
|
||||
- '1 1 1 * *', // Example cron, At 01:01 on day-of-month 1.
|
||||
- entityOwnershipFactRetriever,
|
||||
-),
|
||||
+createFactRetrieverRegistration({
|
||||
+ cadende: '1 1 1 * *', // Example cron, At 01:01 on day-of-month 1.
|
||||
+ factRetriever: entityOwnershipFactRetriever,
|
||||
+}),
|
||||
|
||||
```
|
||||
|
||||
- `TechInsightsStore` interface has changed its signature of `insertFacts` method. If you have created your own implementation of either `TechInsightsDatabase` or `FactRetrieverEngine` you need to modify the implementation/call to this method to accept/pass-in an object instead if individual arguments. The interface now accepts an additional `lifecycle` argument which is optional (defined below). An example modification to fact retriever engine:
|
||||
|
||||
```diff
|
||||
-await this.repository.insertFacts(factRetriever.id, facts);
|
||||
+await this.repository.insertFacts({
|
||||
+ id: factRetriever.id,
|
||||
+ facts,
|
||||
+ lifecycle,
|
||||
+});
|
||||
```
|
||||
|
||||
Adds a configuration option to fact retrievers to define lifecycle for facts the retriever persists. Possible values are either 'max items' or 'time-to-live'. The former will keep only n number of items in the database for each fact per entity. The latter will remove all facts that are older than the TTL value.
|
||||
|
||||
Possible values:
|
||||
|
||||
- `{ maxItems: 5 }` // Deletes all facts for the retriever/entity pair, apart from the last five
|
||||
- `{ ttl: 1209600000 }` // (2 weeks) Deletes all facts older than 2 weeks for the retriever/entity pair
|
||||
- `{ ttl: { weeks: 2 } }` // Deletes all facts older than 2 weeks for the retriever/entity pair
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/backend-common@0.10.4-next.0
|
||||
- @backstage/config@0.1.13-next.0
|
||||
- @backstage/plugin-tech-insights-node@0.2.0-next.0
|
||||
- @backstage/catalog-model@0.9.10-next.0
|
||||
- @backstage/catalog-client@0.5.5-next.0
|
||||
|
||||
## 0.1.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@backstage/plugin-tech-insights-backend",
|
||||
"version": "0.1.5",
|
||||
"version": "0.2.0-next.0",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -31,13 +31,13 @@
|
||||
"clean": "backstage-cli clean"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-common": "^0.10.3",
|
||||
"@backstage/catalog-client": "^0.5.4",
|
||||
"@backstage/catalog-model": "^0.9.9",
|
||||
"@backstage/config": "^0.1.12",
|
||||
"@backstage/backend-common": "^0.10.4-next.0",
|
||||
"@backstage/catalog-client": "^0.5.5-next.0",
|
||||
"@backstage/catalog-model": "^0.9.10-next.0",
|
||||
"@backstage/config": "^0.1.13-next.0",
|
||||
"@backstage/errors": "^0.2.0",
|
||||
"@backstage/plugin-tech-insights-common": "^0.2.1",
|
||||
"@backstage/plugin-tech-insights-node": "^0.1.2",
|
||||
"@backstage/plugin-tech-insights-node": "^0.2.0-next.0",
|
||||
"@types/express": "^4.17.6",
|
||||
"express": "^4.17.1",
|
||||
"express-promise-router": "^4.1.0",
|
||||
@@ -51,8 +51,8 @@
|
||||
"yn": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/backend-test-utils": "^0.1.13",
|
||||
"@backstage/cli": "^0.11.0",
|
||||
"@backstage/backend-test-utils": "^0.1.14-next.0",
|
||||
"@backstage/cli": "^0.12.0-next.0",
|
||||
"@types/supertest": "^2.0.8",
|
||||
"@types/node-cron": "^3.0.0",
|
||||
"@types/semver": "^7.3.8",
|
||||
|
||||
Reference in New Issue
Block a user