diff --git a/.changeset/cool-rockets-confess.md b/.changeset/cool-rockets-confess.md new file mode 100644 index 0000000..b527c95 --- /dev/null +++ b/.changeset/cool-rockets-confess.md @@ -0,0 +1,13 @@ +--- +'@spreadshirt/backstage-plugin-s3-viewer-backend': patch +--- + +Replace some deprecations caused by the removal of the backend-tasks plugin and deprecate old backend system. +Please, remove any usage of `RouterOptions` and `createRouter`. + +The old backend system methods will be completely removed in the next release, so none of the deprecations +caused by these functions are going to be addressed. + +More info about this process [in this issue](https://github.com/backstage/community-plugins/issues/1176). + +To set up the backend using the new backend system, follow [this documentation](https://github.com/spreadshirt/backstage-plugin-s3/tree/main/plugins/s3-viewer-backend#new-backend-system). \ No newline at end of file diff --git a/plugins/s3-viewer-backend/README.md b/plugins/s3-viewer-backend/README.md index 845d308..ad4452b 100644 --- a/plugins/s3-viewer-backend/README.md +++ b/plugins/s3-viewer-backend/README.md @@ -14,6 +14,8 @@ It also includes a permission integration, to restrict access to certain data wi ## Getting started +> :warning: **This setup is deprecated and will be removed in a future release. Please, use the [new backend system instead](#new-backend-system).** + To get started, follow these steps: 1. Install the plugin by running this command: diff --git a/plugins/s3-viewer-backend/config.d.ts b/plugins/s3-viewer-backend/config.d.ts index d441e96..eb00764 100644 --- a/plugins/s3-viewer-backend/config.d.ts +++ b/plugins/s3-viewer-backend/config.d.ts @@ -1,4 +1,4 @@ -import { TaskScheduleDefinitionConfig } from '@backstage/backend-tasks'; +import { SchedulerServiceTaskScheduleDefinitionConfig } from '@backstage/backend-plugin-api'; /** Configuration for the S3 Viewer plugin */ export interface Config { @@ -7,7 +7,9 @@ export interface Config { * If defined, it sets the schedule used to refresh the list of buckets * @visibility backend * */ - bucketRefreshSchedule: TaskScheduleDefinitionConfig | undefined; + bucketRefreshSchedule: + | SchedulerServiceTaskScheduleDefinitionConfig + | undefined; /** @visibility backend */ bucketLocatorMethods: Array< diff --git a/plugins/s3-viewer-backend/src/service/router.ts b/plugins/s3-viewer-backend/src/service/router.ts index 8bd1844..906a55c 100644 --- a/plugins/s3-viewer-backend/src/service/router.ts +++ b/plugins/s3-viewer-backend/src/service/router.ts @@ -35,6 +35,10 @@ import { PolicyDecision, } from '@backstage/plugin-permission-common'; +/** + * @deprecated Use the new backend system instead: https://github.com/spreadshirt/backstage-plugin-s3/tree/main/plugins/s3-viewer-backend#new-backend-system + * @public + */ export interface RouterOptions { logger: LoggerService; config: RootConfigService; @@ -45,6 +49,10 @@ export interface RouterOptions { httpAuth?: HttpAuthService; } +/** + * @deprecated Use the new backend system instead: https://github.com/spreadshirt/backstage-plugin-s3/tree/main/plugins/s3-viewer-backend#new-backend-system + * @public + */ export async function createRouter( options: RouterOptions, ): Promise {