diff --git a/.changeset/solid-bikes-leave.md b/.changeset/solid-bikes-leave.md new file mode 100644 index 0000000000..6f1bfe0b2f --- /dev/null +++ b/.changeset/solid-bikes-leave.md @@ -0,0 +1,9 @@ +--- +'@backstage/plugin-scaffolder-node': patch +--- + +**DEPRECATION**: We're going to be working on refactoring a lot of the internals of the Scaffolder backend plugin, and with that comes a lot of deprecations and removals for public types that are making these things hard. + +If you're using these types, please reach out to us either on Discord or a GitHub issue with your use cases. + +- `SerializedTask`, `SerializedTaskEvent`, `TaskBroker`, `TaskContext`, `TaskBrokerDispatchOptions`, `TaskBrokerDispatchResult`, `TaskCompletionState`, `TaskEventType`, `TaskFilter`, `TaskFilters`, `TaskStatus` are the types that have now been marked as deprecated, and will be removed in a future release. diff --git a/plugins/scaffolder-node/report-alpha.api.md b/plugins/scaffolder-node/report-alpha.api.md index 09541fbc56..c5ac6ce79d 100644 --- a/plugins/scaffolder-node/report-alpha.api.md +++ b/plugins/scaffolder-node/report-alpha.api.md @@ -147,7 +147,7 @@ export interface ScaffolderAutocompleteExtensionPoint { // @alpha export const scaffolderAutocompleteExtensionPoint: ExtensionPoint; -// @alpha +// @alpha @deprecated export interface ScaffolderTaskBrokerExtensionPoint { // (undocumented) setTaskBroker(taskBroker: TaskBroker): void; diff --git a/plugins/scaffolder-node/report.api.md b/plugins/scaffolder-node/report.api.md index fa0163b245..027d57ede4 100644 --- a/plugins/scaffolder-node/report.api.md +++ b/plugins/scaffolder-node/report.api.md @@ -327,7 +327,7 @@ export function serializeDirectoryContents( }, ): Promise; -// @public +// @public @deprecated export type SerializedTask = { id: string; spec: TaskSpec; @@ -339,7 +339,7 @@ export type SerializedTask = { state?: JsonObject; }; -// @public +// @public @deprecated export type SerializedTaskEvent = { id: number; isTaskRecoverable?: boolean; @@ -353,7 +353,7 @@ export type SerializedTaskEvent = { createdAt: string; }; -// @public +// @public @deprecated export interface TaskBroker { // (undocumented) cancel(taskId: string): Promise; @@ -396,22 +396,22 @@ export interface TaskBroker { vacuumTasks(options: { timeoutS: number }): Promise; } -// @public +// @public @deprecated export type TaskBrokerDispatchOptions = { spec: TaskSpec; secrets?: TaskSecrets; createdBy?: string; }; -// @public +// @public @deprecated export type TaskBrokerDispatchResult = { taskId: string; }; -// @public +// @public @deprecated export type TaskCompletionState = 'failed' | 'completed'; -// @public +// @public @deprecated export interface TaskContext { // (undocumented) cancelSignal: AbortSignal; @@ -455,16 +455,16 @@ export interface TaskContext { updateCheckpoint?(options: UpdateTaskCheckpointOptions): Promise; } -// @public +// @public @deprecated export type TaskEventType = 'completion' | 'log' | 'cancelled' | 'recovered'; -// @public +// @public @deprecated export type TaskFilter = { key: string; values?: string[]; }; -// @public +// @public @deprecated export type TaskFilters = | { anyOf: TaskFilter[]; @@ -482,7 +482,7 @@ export type TaskSecrets = Record & { backstageToken?: string; }; -// @public +// @public @deprecated export type TaskStatus = | 'cancelled' | 'completed' diff --git a/plugins/scaffolder-node/src/alpha/index.ts b/plugins/scaffolder-node/src/alpha/index.ts index 30f95f116a..2147085983 100644 --- a/plugins/scaffolder-node/src/alpha/index.ts +++ b/plugins/scaffolder-node/src/alpha/index.ts @@ -53,6 +53,7 @@ export const scaffolderActionsExtensionPoint = * Extension point for replacing the scaffolder task broker. * * @alpha + * @deprecated this extension point is planned to be removed, please reach out to us in an issue if you're using this extension point and your use cases. */ export interface ScaffolderTaskBrokerExtensionPoint { setTaskBroker(taskBroker: TaskBroker): void; diff --git a/plugins/scaffolder-node/src/tasks/types.ts b/plugins/scaffolder-node/src/tasks/types.ts index fd80d547c1..d6e4bb2dd9 100644 --- a/plugins/scaffolder-node/src/tasks/types.ts +++ b/plugins/scaffolder-node/src/tasks/types.ts @@ -33,6 +33,8 @@ export type TaskSecrets = Record & { * The status of each step of the Task * * @public + * @deprecated this type is planned to be removed. + * Please reach out to us in an issue if you're using this type and your use cases. */ export type TaskStatus = | 'cancelled' @@ -46,6 +48,8 @@ export type TaskStatus = * The state of a completed task. * * @public + * @deprecated this interface is planned to be removed. + * Please reach out to us in an issue if you're using this interface and your use cases. */ export type TaskCompletionState = 'failed' | 'completed'; @@ -53,6 +57,8 @@ export type TaskCompletionState = 'failed' | 'completed'; * SerializedTask * * @public + * @deprecated this type is planned to be removed. + * Please reach out to us in an issue if you're using this type and your use cases. */ export type SerializedTask = { id: string; @@ -69,6 +75,8 @@ export type SerializedTask = { * TaskEventType * * @public + * @deprecated this type is planned to be removed. + * Please reach out to us in an issue if you're using this type and your use cases. */ export type TaskEventType = 'completion' | 'log' | 'cancelled' | 'recovered'; @@ -76,6 +84,8 @@ export type TaskEventType = 'completion' | 'log' | 'cancelled' | 'recovered'; * SerializedTaskEvent * * @public + * @deprecated this type is planned to be removed. + * Please reach out to us in an issue if you're using this type and your use cases. */ export type SerializedTaskEvent = { id: number; @@ -94,6 +104,8 @@ export type SerializedTaskEvent = { * The result of {@link TaskBroker.dispatch} * * @public + * @deprecated this interface is planned to be removed. + * Please reach out to us in an issue if you're using this interface and your use cases. */ export type TaskBrokerDispatchResult = { taskId: string; @@ -104,6 +116,8 @@ export type TaskBrokerDispatchResult = { * Currently a spec and optional secrets * * @public + * @deprecated this interface is planned to be removed. + * Please reach out to us in an issue if you're using this interface and your use cases. */ export type TaskBrokerDispatchOptions = { spec: TaskSpec; @@ -114,6 +128,8 @@ export type TaskBrokerDispatchOptions = { /** * TaskFilter * @public + * @deprecated this type is planned to be removed. + * Please reach out to us in an issue if you're using this type and your use cases. */ export type TaskFilter = { key: string; @@ -123,6 +139,8 @@ export type TaskFilter = { /** * TaskFilters * @public + * @deprecated this type is planned to be removed. + * Please reach out to us in an issue if you're using this type and your use cases. */ export type TaskFilters = | { anyOf: TaskFilter[] } @@ -131,9 +149,12 @@ export type TaskFilters = | TaskFilter; /** - * Task + * TaskContext * * @public + * + * @deprecated this interface is planned to be removed. + * Please reach out to us in an issue if you're using this interface and your use cases. */ export interface TaskContext { taskId?: string; @@ -175,6 +196,8 @@ export interface TaskContext { * TaskBroker * * @public + * @deprecated this interface is planned to be removed. + * Please reach out to us in an issue if you're using this interface and your use cases. */ export interface TaskBroker { cancel(taskId: string): Promise;