diff --git a/workspaces/adr/.changeset/young-peaches-carry.md b/workspaces/adr/.changeset/young-peaches-carry.md new file mode 100644 index 0000000000..334528d525 --- /dev/null +++ b/workspaces/adr/.changeset/young-peaches-carry.md @@ -0,0 +1,5 @@ +--- +'@backstage-community/search-backend-module-adr': patch +--- + +Removed usages of `@backstage/backend-tasks` diff --git a/workspaces/adr/plugins/search-backend-module-adr/config.d.ts b/workspaces/adr/plugins/search-backend-module-adr/config.d.ts index 3476c06403..84d01865a0 100644 --- a/workspaces/adr/plugins/search-backend-module-adr/config.d.ts +++ b/workspaces/adr/plugins/search-backend-module-adr/config.d.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { TaskScheduleDefinitionConfig } from '@backstage/backend-tasks'; +import { SchedulerServiceTaskScheduleDefinitionConfig } from '@backstage/backend-plugin-api'; export interface Config { search?: { @@ -26,7 +26,7 @@ export interface Config { /** * The schedule for how often to run the collation job. */ - schedule?: TaskScheduleDefinitionConfig; + schedule?: SchedulerServiceTaskScheduleDefinitionConfig; }; }; }; diff --git a/workspaces/adr/plugins/search-backend-module-adr/package.json b/workspaces/adr/plugins/search-backend-module-adr/package.json index 6865cde5e1..fdd885fbde 100644 --- a/workspaces/adr/plugins/search-backend-module-adr/package.json +++ b/workspaces/adr/plugins/search-backend-module-adr/package.json @@ -32,7 +32,6 @@ "dependencies": { "@backstage-community/plugin-adr-common": "workspace:^", "@backstage/backend-plugin-api": "^1.1.0", - "@backstage/backend-tasks": "^0.6.1", "@backstage/catalog-client": "^1.9.0", "@backstage/catalog-model": "^1.7.2", "@backstage/config": "^1.3.1", diff --git a/workspaces/adr/plugins/search-backend-module-adr/src/collators/config.ts b/workspaces/adr/plugins/search-backend-module-adr/src/collators/config.ts index d02941656b..6cb02df5ed 100644 --- a/workspaces/adr/plugins/search-backend-module-adr/src/collators/config.ts +++ b/workspaces/adr/plugins/search-backend-module-adr/src/collators/config.ts @@ -15,9 +15,9 @@ */ import { - readTaskScheduleDefinitionFromConfig, - TaskScheduleDefinition, -} from '@backstage/backend-tasks'; + readSchedulerServiceTaskScheduleDefinitionFromConfig, + SchedulerServiceTaskScheduleDefinition, +} from '@backstage/backend-plugin-api/index'; import { Config } from '@backstage/config'; import { InputError } from '@backstage/errors'; @@ -33,15 +33,16 @@ export const defaults = { export function readScheduleConfigOptions( configRoot: Config, -): TaskScheduleDefinition { - let schedule: TaskScheduleDefinition | undefined = undefined; +): SchedulerServiceTaskScheduleDefinition { + let schedule: SchedulerServiceTaskScheduleDefinition | undefined = undefined; const config = configRoot.getOptionalConfig(configKey); if (config) { const scheduleConfig = config.getOptionalConfig('schedule'); if (scheduleConfig) { try { - schedule = readTaskScheduleDefinitionFromConfig(scheduleConfig); + schedule = + readSchedulerServiceTaskScheduleDefinitionFromConfig(scheduleConfig); } catch (error) { throw new InputError(`Invalid schedule at ${configKey}, ${error}`); } diff --git a/workspaces/adr/yarn.lock b/workspaces/adr/yarn.lock index 104064a6c7..c7e8919e8a 100644 --- a/workspaces/adr/yarn.lock +++ b/workspaces/adr/yarn.lock @@ -2666,7 +2666,6 @@ __metadata: dependencies: "@backstage-community/plugin-adr-common": "workspace:^" "@backstage/backend-plugin-api": ^1.1.0 - "@backstage/backend-tasks": ^0.6.1 "@backstage/backend-test-utils": ^1.2.0 "@backstage/catalog-client": ^1.9.0 "@backstage/catalog-model": ^1.7.2 @@ -2719,83 +2718,6 @@ __metadata: languageName: node linkType: hard -"@backstage/backend-common@npm:^0.24.1": - version: 0.24.1 - resolution: "@backstage/backend-common@npm:0.24.1" - dependencies: - "@aws-sdk/abort-controller": ^3.347.0 - "@aws-sdk/client-codecommit": ^3.350.0 - "@aws-sdk/client-s3": ^3.350.0 - "@aws-sdk/credential-providers": ^3.350.0 - "@aws-sdk/types": ^3.347.0 - "@backstage/backend-dev-utils": ^0.1.5 - "@backstage/backend-plugin-api": ^0.8.1 - "@backstage/cli-common": ^0.1.14 - "@backstage/config": ^1.2.0 - "@backstage/config-loader": ^1.9.0 - "@backstage/errors": ^1.2.4 - "@backstage/integration": ^1.14.0 - "@backstage/integration-aws-node": ^0.1.12 - "@backstage/plugin-auth-node": ^0.5.1 - "@backstage/types": ^1.1.1 - "@google-cloud/storage": ^7.0.0 - "@keyv/memcache": ^1.3.5 - "@keyv/redis": ^2.5.3 - "@kubernetes/client-node": 0.20.0 - "@manypkg/get-packages": ^1.1.3 - "@octokit/rest": ^19.0.3 - "@types/cors": ^2.8.6 - "@types/dockerode": ^3.3.0 - "@types/express": ^4.17.6 - "@types/luxon": ^3.0.0 - "@types/webpack-env": ^1.15.2 - archiver: ^6.0.0 - base64-stream: ^1.0.0 - compression: ^1.7.4 - concat-stream: ^2.0.0 - cors: ^2.8.5 - dockerode: ^4.0.0 - express: ^4.17.1 - express-promise-router: ^4.1.0 - fs-extra: ^11.2.0 - git-url-parse: ^14.0.0 - helmet: ^6.0.0 - isomorphic-git: ^1.23.0 - jose: ^5.0.0 - keyv: ^4.5.2 - knex: ^3.0.0 - lodash: ^4.17.21 - logform: ^2.3.2 - luxon: ^3.0.0 - minimatch: ^9.0.0 - minimist: ^1.2.5 - morgan: ^1.10.0 - mysql2: ^3.0.0 - node-fetch: ^2.7.0 - node-forge: ^1.3.1 - p-limit: ^3.1.0 - path-to-regexp: ^6.2.1 - pg: ^8.11.3 - pg-format: ^1.0.4 - raw-body: ^2.4.1 - selfsigned: ^2.0.0 - stoppable: ^1.1.0 - tar: ^6.1.12 - triple-beam: ^1.4.1 - uuid: ^9.0.0 - winston: ^3.2.1 - winston-transport: ^4.5.0 - yauzl: ^3.0.0 - yn: ^4.0.0 - peerDependencies: - pg-connection-string: ^2.3.0 - peerDependenciesMeta: - pg-connection-string: - optional: true - checksum: 5a326dec02d1d43a819e5b1d4a0be87ee00be23013e4a74c7c700f996d3b486d359ba2866c20a25788a9eef6a97d2f99b5ccbb140bcac3180d703eee6ad82c04 - languageName: node - linkType: hard - "@backstage/backend-common@npm:^0.25.0": version: 0.25.0 resolution: "@backstage/backend-common@npm:0.25.0" @@ -2963,25 +2885,6 @@ __metadata: languageName: node linkType: hard -"@backstage/backend-plugin-api@npm:^0.8.1": - version: 0.8.1 - resolution: "@backstage/backend-plugin-api@npm:0.8.1" - dependencies: - "@backstage/cli-common": ^0.1.14 - "@backstage/config": ^1.2.0 - "@backstage/errors": ^1.2.4 - "@backstage/plugin-auth-node": ^0.5.1 - "@backstage/plugin-permission-common": ^0.8.1 - "@backstage/types": ^1.1.1 - "@types/express": ^4.17.6 - "@types/luxon": ^3.0.0 - express: ^4.17.1 - knex: ^3.0.0 - luxon: ^3.0.0 - checksum: 4a6614ceec13ff5ace3e04e8a1bad40567ce6a66afc19c02935161d12bdd7edbf4863d1d0203539e8a353dd78184078eb873fd14da6cbd093d1d9e4ced44c0fb - languageName: node - linkType: hard - "@backstage/backend-plugin-api@npm:^1.0.0, @backstage/backend-plugin-api@npm:^1.1.0": version: 1.1.0 resolution: "@backstage/backend-plugin-api@npm:1.1.0" @@ -3000,27 +2903,6 @@ __metadata: languageName: node linkType: hard -"@backstage/backend-tasks@npm:^0.6.1": - version: 0.6.1 - resolution: "@backstage/backend-tasks@npm:0.6.1" - dependencies: - "@backstage/backend-common": ^0.24.1 - "@backstage/backend-plugin-api": ^0.8.1 - "@backstage/config": ^1.2.0 - "@backstage/errors": ^1.2.4 - "@backstage/types": ^1.1.1 - "@opentelemetry/api": ^1.3.0 - "@types/luxon": ^3.0.0 - cron: ^3.0.0 - knex: ^3.0.0 - lodash: ^4.17.21 - luxon: ^3.0.0 - uuid: ^9.0.0 - zod: ^3.22.4 - checksum: 2173a855d9707ce598c870e5791a639276e437741ffade30226ca876eaefb2cea28864af1a571b4548d926b7a5a213b4cebc2346868ddbd25d505180b5bf2ee9 - languageName: node - linkType: hard - "@backstage/backend-test-utils@npm:^1.2.0": version: 1.2.0 resolution: "@backstage/backend-test-utils@npm:1.2.0" @@ -3254,7 +3136,7 @@ __metadata: languageName: node linkType: hard -"@backstage/config-loader@npm:^1.9.0, @backstage/config-loader@npm:^1.9.1, @backstage/config-loader@npm:^1.9.3, @backstage/config-loader@npm:^1.9.4": +"@backstage/config-loader@npm:^1.9.1, @backstage/config-loader@npm:^1.9.3, @backstage/config-loader@npm:^1.9.4": version: 1.9.4 resolution: "@backstage/config-loader@npm:1.9.4" dependencies: @@ -3578,7 +3460,7 @@ __metadata: languageName: node linkType: hard -"@backstage/integration@npm:^1.14.0, @backstage/integration@npm:^1.15.0, @backstage/integration@npm:^1.16.0": +"@backstage/integration@npm:^1.15.0, @backstage/integration@npm:^1.16.0": version: 1.16.0 resolution: "@backstage/integration@npm:1.16.0" dependencies: @@ -3622,7 +3504,7 @@ __metadata: languageName: node linkType: hard -"@backstage/plugin-auth-node@npm:^0.5.1, @backstage/plugin-auth-node@npm:^0.5.2, @backstage/plugin-auth-node@npm:^0.5.5": +"@backstage/plugin-auth-node@npm:^0.5.2, @backstage/plugin-auth-node@npm:^0.5.5": version: 0.5.5 resolution: "@backstage/plugin-auth-node@npm:0.5.5" dependencies: @@ -3749,7 +3631,7 @@ __metadata: languageName: node linkType: hard -"@backstage/plugin-permission-common@npm:^0.8.1, @backstage/plugin-permission-common@npm:^0.8.3": +"@backstage/plugin-permission-common@npm:^0.8.3": version: 0.8.3 resolution: "@backstage/plugin-permission-common@npm:0.8.3" dependencies: @@ -6562,7 +6444,7 @@ __metadata: languageName: node linkType: hard -"@opentelemetry/api@npm:^1.3.0, @opentelemetry/api@npm:^1.9.0": +"@opentelemetry/api@npm:^1.9.0": version: 1.9.0 resolution: "@opentelemetry/api@npm:1.9.0" checksum: 9e88e59d53ced668f3daaecfd721071c5b85a67dd386f1c6f051d1be54375d850016c881f656ffbe9a03bedae85f7e89c2f2b635313f9c9b195ad033cdc31020 @@ -9947,20 +9829,6 @@ __metadata: languageName: node linkType: hard -"archiver-utils@npm:^4.0.1": - version: 4.0.1 - resolution: "archiver-utils@npm:4.0.1" - dependencies: - glob: ^8.0.0 - graceful-fs: ^4.2.0 - lazystream: ^1.0.0 - lodash: ^4.17.15 - normalize-path: ^3.0.0 - readable-stream: ^3.6.0 - checksum: 2917cdf63a912c74002a4a1e6de3076a4691030b4e722efdd6d862447b61cd64c8b7688d331b1d35f8d4fc661d6e34f91bc1ffc79478fca2e48ad060acece18c - languageName: node - linkType: hard - "archiver-utils@npm:^5.0.0, archiver-utils@npm:^5.0.2": version: 5.0.2 resolution: "archiver-utils@npm:5.0.2" @@ -9991,21 +9859,6 @@ __metadata: languageName: node linkType: hard -"archiver@npm:^6.0.0": - version: 6.0.2 - resolution: "archiver@npm:6.0.2" - dependencies: - archiver-utils: ^4.0.1 - async: ^3.2.4 - buffer-crc32: ^0.2.1 - readable-stream: ^3.6.0 - readdir-glob: ^1.1.2 - tar-stream: ^3.0.0 - zip-stream: ^5.0.1 - checksum: 17a20a1291d9bf41e25c96f029373bec5306d6e381063b3ab06ea805d234afaf55a7829c3577dd003558c188c6631769a80c51f245175fdb8310631df36ceb4b - languageName: node - linkType: hard - "archiver@npm:^7.0.0": version: 7.0.1 resolution: "archiver@npm:7.0.1" @@ -11687,18 +11540,6 @@ __metadata: languageName: node linkType: hard -"compress-commons@npm:^5.0.1": - version: 5.0.1 - resolution: "compress-commons@npm:5.0.1" - dependencies: - crc-32: ^1.2.0 - crc32-stream: ^5.0.0 - normalize-path: ^3.0.0 - readable-stream: ^3.6.0 - checksum: 65a68e56211a8d1dbe9dab0d35f1bd60a4df27aa01e6c3f0883080263e228c460758bab4f083637a380d4a96d2326722972a42ea1951360cc69728a3915f209f - languageName: node - linkType: hard - "compress-commons@npm:^6.0.2": version: 6.0.2 resolution: "compress-commons@npm:6.0.2" @@ -12035,16 +11876,6 @@ __metadata: languageName: node linkType: hard -"crc32-stream@npm:^5.0.0": - version: 5.0.0 - resolution: "crc32-stream@npm:5.0.0" - dependencies: - crc-32: ^1.2.0 - readable-stream: ^3.4.0 - checksum: 8e5dd04f22f3fbecc623492395107fbed2114f225bd606e39e8ed338f2fc1c454ac02a05741243620ab526473cb867fa86411a44a7ffcd88457cc1c2af82d0bc - languageName: node - linkType: hard - "crc32-stream@npm:^6.0.0": version: 6.0.0 resolution: "crc32-stream@npm:6.0.0" @@ -15270,7 +15101,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^8.0.0, glob@npm:^8.0.1, glob@npm:^8.0.3, glob@npm:^8.1.0": +"glob@npm:^8.0.1, glob@npm:^8.0.3, glob@npm:^8.1.0": version: 8.1.0 resolution: "glob@npm:8.1.0" dependencies: @@ -20734,13 +20565,6 @@ __metadata: languageName: node linkType: hard -"path-to-regexp@npm:^6.2.1": - version: 6.2.2 - resolution: "path-to-regexp@npm:6.2.2" - checksum: b7b0005c36f5099f9ed1fb20a820d2e4ed1297ffe683ea1d678f5e976eb9544f01debb281369dabdc26da82e6453901bf71acf2c7ed14b9243536c2a45286c33 - languageName: node - linkType: hard - "path-to-regexp@npm:^8.0.0": version: 8.1.0 resolution: "path-to-regexp@npm:8.1.0" @@ -26483,17 +26307,6 @@ __metadata: languageName: node linkType: hard -"zip-stream@npm:^5.0.1": - version: 5.0.1 - resolution: "zip-stream@npm:5.0.1" - dependencies: - archiver-utils: ^4.0.1 - compress-commons: ^5.0.1 - readable-stream: ^3.6.0 - checksum: 116cee5a2c1ecce7aa440b665470653f58ef56670c6aafa1b5491c9f9335992352145502af5fa865ac82f46336905e37fb7cbc649c2be72e2152c6b91802995c - languageName: node - linkType: hard - "zip-stream@npm:^6.0.1": version: 6.0.1 resolution: "zip-stream@npm:6.0.1"