@backstage/plugin-scaffolder-node 0.13.6 → 0.13.7-next.1
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 +24 -0
- package/dist/alpha.d.ts +4 -1
- package/dist/index.d.ts +12 -1
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-node
|
|
2
2
|
|
|
3
|
+
## 0.13.7-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/plugin-scaffolder-common@2.3.0-next.1
|
|
9
|
+
- @backstage/integration@2.1.2-next.0
|
|
10
|
+
- @backstage/backend-test-utils@1.11.7-next.0
|
|
11
|
+
- @backstage/plugin-permission-node@0.11.4-next.0
|
|
12
|
+
- @backstage/backend-plugin-api@1.10.1-next.0
|
|
13
|
+
|
|
14
|
+
## 0.13.7-next.0
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- e95b649: Added task recovery feature with new `scaffolder.taskRecovery` config section. When enabled, tasks that crash or timeout are automatically recovered and resume from the last completed step, task secrets are retained until the task reaches a terminal state so recovery can continue, and completed step outputs are persisted. Enabling recovery applies to all scaffolder tasks, so actions used by those tasks should be idempotent or use checkpoints. When recovery is disabled (the default), the previous behavior is unchanged: secrets are cleared as soon as a task is claimed and retries re-run every step. The new config consolidates previous experimental flags (`EXPERIMENTAL_recoverTasks`, `EXPERIMENTAL_workspaceSerialization`, `EXPERIMENTAL_recoverTasksTimeout`) which remain supported as fallbacks. The legacy workspace provider setting continues to select a provider only when `EXPERIMENTAL_workspaceSerialization` is `true`.
|
|
19
|
+
|
|
20
|
+
Workspace serialization for task recovery now requires installing a separate workspace provider module, including when you use the legacy configuration. For development, use `@backstage/plugin-scaffolder-backend-module-workspace-database` (50 MB limit, not recommended for production). On first startup, that module migrates existing database workspace snapshots from the legacy task storage. For production, use `@backstage/plugin-scaffolder-backend-module-gcp` or a similar external storage provider. The scaffolder rejects a configured provider that has not been installed and registered.
|
|
21
|
+
|
|
22
|
+
Enabling crash recovery does not keep completed task event streams open; normal task completion remains terminal for event-stream clients.
|
|
23
|
+
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
- @backstage/plugin-scaffolder-common@2.3.0-next.0
|
|
26
|
+
|
|
3
27
|
## 0.13.6
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/dist/alpha.d.ts
CHANGED
|
@@ -140,6 +140,8 @@ type CheckpointState = {
|
|
|
140
140
|
/**
|
|
141
141
|
* Context for checkpoint function invocation.
|
|
142
142
|
*
|
|
143
|
+
* The value returned by `fn` will be serialized to JSON for storage.
|
|
144
|
+
*
|
|
143
145
|
* @alpha
|
|
144
146
|
*/
|
|
145
147
|
type CheckpointContext<T extends JsonValue | void = JsonValue> = {
|
|
@@ -148,7 +150,8 @@ type CheckpointContext<T extends JsonValue | void = JsonValue> = {
|
|
|
148
150
|
*/
|
|
149
151
|
key: string;
|
|
150
152
|
/**
|
|
151
|
-
* Function to execute for the checkpoint
|
|
153
|
+
* Function to execute for the checkpoint.
|
|
154
|
+
* The return value will be JSON-serialized for storage.
|
|
152
155
|
*/
|
|
153
156
|
fn: () => Promise<T> | T;
|
|
154
157
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JsonObject,
|
|
1
|
+
import { JsonObject, JsonValue, Observable, Expand } from '@backstage/types';
|
|
2
2
|
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
3
3
|
import { BackstageCredentials, LoggerService, UrlReaderService } from '@backstage/backend-plugin-api';
|
|
4
4
|
import { PermissionCriteria } from '@backstage/plugin-permission-common';
|
|
@@ -157,6 +157,13 @@ interface TaskContext {
|
|
|
157
157
|
taskId: string;
|
|
158
158
|
targetPath: string;
|
|
159
159
|
}): Promise<void>;
|
|
160
|
+
updateStepState?(options: {
|
|
161
|
+
stepId: string;
|
|
162
|
+
status: 'completed';
|
|
163
|
+
output: {
|
|
164
|
+
[name: string]: JsonValue;
|
|
165
|
+
};
|
|
166
|
+
}): Promise<void>;
|
|
160
167
|
getWorkspaceName(): Promise<string>;
|
|
161
168
|
getInitiatorCredentials(): Promise<BackstageCredentials>;
|
|
162
169
|
}
|
|
@@ -215,6 +222,10 @@ type ActionContext<TActionInput extends JsonObject, TActionOutput extends JsonOb
|
|
|
215
222
|
secrets?: TaskSecrets;
|
|
216
223
|
workspacePath: string;
|
|
217
224
|
input: TActionInput;
|
|
225
|
+
/**
|
|
226
|
+
* Execute a function with checkpoint support for recovery.
|
|
227
|
+
* The return value is serialized to JSON for storage.
|
|
228
|
+
*/
|
|
218
229
|
checkpoint<T extends JsonValue | void>(opts: CheckpointContext<T>): Promise<T>;
|
|
219
230
|
output(name: keyof TActionOutput, value: TActionOutput[keyof TActionOutput]): void;
|
|
220
231
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-scaffolder-node",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.7-next.1",
|
|
4
4
|
"description": "The plugin-scaffolder-node module for @backstage/plugin-scaffolder-backend",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "node-library",
|
|
@@ -70,14 +70,14 @@
|
|
|
70
70
|
"test": "backstage-cli package test"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@backstage/backend-plugin-api": "
|
|
74
|
-
"@backstage/catalog-model": "
|
|
75
|
-
"@backstage/errors": "
|
|
76
|
-
"@backstage/integration": "
|
|
77
|
-
"@backstage/plugin-permission-common": "
|
|
78
|
-
"@backstage/plugin-permission-node": "
|
|
79
|
-
"@backstage/plugin-scaffolder-common": "
|
|
80
|
-
"@backstage/types": "
|
|
73
|
+
"@backstage/backend-plugin-api": "1.10.1-next.0",
|
|
74
|
+
"@backstage/catalog-model": "1.10.0",
|
|
75
|
+
"@backstage/errors": "1.3.1",
|
|
76
|
+
"@backstage/integration": "2.1.2-next.0",
|
|
77
|
+
"@backstage/plugin-permission-common": "0.9.10",
|
|
78
|
+
"@backstage/plugin-permission-node": "0.11.4-next.0",
|
|
79
|
+
"@backstage/plugin-scaffolder-common": "2.3.0-next.1",
|
|
80
|
+
"@backstage/types": "1.2.2",
|
|
81
81
|
"@isomorphic-git/pgp-plugin": "^0.0.7",
|
|
82
82
|
"concat-stream": "^2.0.0",
|
|
83
83
|
"fs-extra": "^11.2.0",
|
|
@@ -93,14 +93,14 @@
|
|
|
93
93
|
"zod-to-json-schema": "^3.25.1"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
|
-
"@backstage/backend-test-utils": "
|
|
97
|
-
"@backstage/cli": "
|
|
98
|
-
"@backstage/config": "
|
|
96
|
+
"@backstage/backend-test-utils": "1.11.7-next.0",
|
|
97
|
+
"@backstage/cli": "0.36.6-next.0",
|
|
98
|
+
"@backstage/config": "1.3.8",
|
|
99
99
|
"@types/lodash": "^4.14.151",
|
|
100
100
|
"msw": "^2.0.0"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
103
|
-
"@backstage/backend-test-utils": "
|
|
103
|
+
"@backstage/backend-test-utils": "1.11.7-next.0"
|
|
104
104
|
},
|
|
105
105
|
"peerDependenciesMeta": {
|
|
106
106
|
"@backstage/backend-test-utils": {
|