deepline 0.3.206 → 0.3.208
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/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +6 -5
- package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +1 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/run-deployment.ts +41 -2
- package/dist/cli/index.js +255 -105
- package/dist/cli/index.mjs +255 -105
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +1 -1
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
|
@@ -200,7 +200,7 @@ export const SDK_RELEASE = {
|
|
|
200
200
|
// getters keep their established compatibility behavior.
|
|
201
201
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
202
202
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
203
|
-
version: '0.3.
|
|
203
|
+
version: '0.3.208',
|
|
204
204
|
updateSummary:
|
|
205
205
|
'Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.',
|
|
206
206
|
packageCapabilities: {
|
package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts
CHANGED
|
@@ -748,7 +748,8 @@ export type AbsurdRuntimeWorkerDeps = {
|
|
|
748
748
|
inspectDetachedRunner?: (suspension: DetachedRunnerSuspension) => Promise<{
|
|
749
749
|
exitCode: number | null;
|
|
750
750
|
result: PlayRunnerResult | null;
|
|
751
|
-
|
|
751
|
+
// Written by the runner, possibly an older build: readers default it.
|
|
752
|
+
diagnosis?: { stage: string; detail: string | null };
|
|
752
753
|
} | null>;
|
|
753
754
|
readSandboxCrashDiagnostic?: (
|
|
754
755
|
request: PostgresSchedulerSandboxCrashDiagnosticRequest,
|
|
@@ -4356,7 +4357,7 @@ async function resolveDetachedRunnerOutcome(input: {
|
|
|
4356
4357
|
let inspection: {
|
|
4357
4358
|
exitCode: number | null;
|
|
4358
4359
|
result: PlayRunnerResult | null;
|
|
4359
|
-
diagnosis
|
|
4360
|
+
diagnosis?: { stage: string; detail: string | null };
|
|
4360
4361
|
} | null = null;
|
|
4361
4362
|
let inspectionFailed = false;
|
|
4362
4363
|
if (input.inspectDetachedRunner) {
|
|
@@ -4370,7 +4371,7 @@ async function resolveDetachedRunnerOutcome(input: {
|
|
|
4370
4371
|
runnerAttempt: suspension.runnerAttempt,
|
|
4371
4372
|
sandboxId: suspension.sandboxId,
|
|
4372
4373
|
exitCode: inspection.exitCode,
|
|
4373
|
-
diagnosis: inspection.diagnosis
|
|
4374
|
+
diagnosis: inspection.diagnosis?.stage,
|
|
4374
4375
|
resultStatus: inspection.result.status,
|
|
4375
4376
|
}),
|
|
4376
4377
|
);
|
|
@@ -4384,7 +4385,7 @@ async function resolveDetachedRunnerOutcome(input: {
|
|
|
4384
4385
|
runnerAttempt: suspension.runnerAttempt,
|
|
4385
4386
|
sandboxId: suspension.sandboxId,
|
|
4386
4387
|
exitCode: inspection.exitCode,
|
|
4387
|
-
diagnosis: inspection.diagnosis
|
|
4388
|
+
diagnosis: inspection.diagnosis?.stage,
|
|
4388
4389
|
resultStatus: inspection.result?.status ?? null,
|
|
4389
4390
|
}),
|
|
4390
4391
|
);
|
|
@@ -4421,7 +4422,7 @@ async function resolveDetachedRunnerOutcome(input: {
|
|
|
4421
4422
|
terminalResultFound: false,
|
|
4422
4423
|
inspectionAttempted: Boolean(input.inspectDetachedRunner),
|
|
4423
4424
|
inspectionStage: inspection
|
|
4424
|
-
? safeDiagnosticLabel(inspection.diagnosis
|
|
4425
|
+
? safeDiagnosticLabel(inspection.diagnosis?.stage)
|
|
4425
4426
|
: inspectionFailed
|
|
4426
4427
|
? 'inspection_failed'
|
|
4427
4428
|
: input.inspectDetachedRunner
|
|
@@ -157,6 +157,11 @@ export type PlayDeployOutcome = {
|
|
|
157
157
|
* the deployment into `succeeded_with_warnings`.
|
|
158
158
|
*/
|
|
159
159
|
warning?: string;
|
|
160
|
+
/**
|
|
161
|
+
* The new version exists only because a newer Deepline SDK rebuilt the play:
|
|
162
|
+
* its code and everything it imports match what is live.
|
|
163
|
+
*/
|
|
164
|
+
sdkUpdated?: true;
|
|
160
165
|
error?: string;
|
|
161
166
|
};
|
|
162
167
|
|
|
@@ -294,6 +299,26 @@ function carriesArtifact(
|
|
|
294
299
|
);
|
|
295
300
|
}
|
|
296
301
|
|
|
302
|
+
/**
|
|
303
|
+
* Same code as what is live, different build output. `sourceHash` covers only
|
|
304
|
+
* the entry file and `graphHash` covers every local import, package version,
|
|
305
|
+
* and imported play, so both must match — an edited helper is a real change.
|
|
306
|
+
*/
|
|
307
|
+
export function isSdkUpdated(
|
|
308
|
+
live: DeploymentPlayState['liveRevision'],
|
|
309
|
+
artifact: Pick<
|
|
310
|
+
PlayBundleArtifact,
|
|
311
|
+
'sourceHash' | 'graphHash' | 'artifactHash'
|
|
312
|
+
>,
|
|
313
|
+
): boolean {
|
|
314
|
+
return Boolean(
|
|
315
|
+
live &&
|
|
316
|
+
live.sourceHash === artifact.sourceHash &&
|
|
317
|
+
live.graphHash === artifact.graphHash &&
|
|
318
|
+
live.artifactHash !== artifact.artifactHash,
|
|
319
|
+
);
|
|
320
|
+
}
|
|
321
|
+
|
|
297
322
|
function annotationForFailure(input: {
|
|
298
323
|
file: string;
|
|
299
324
|
message: string;
|
|
@@ -978,6 +1003,17 @@ export async function runDeployment(
|
|
|
978
1003
|
}
|
|
979
1004
|
|
|
980
1005
|
const playByName = new Map(ordered.map((play) => [play.name, play]));
|
|
1006
|
+
// Against what was live when this build started, so a PR build and the
|
|
1007
|
+
// merge that promotes its revision describe the play the same way.
|
|
1008
|
+
const sdkUpdated = (
|
|
1009
|
+
name: string,
|
|
1010
|
+
): Pick<PlayDeployOutcome, 'sdkUpdated'> => {
|
|
1011
|
+
const artifact = playByName.get(name)?.result.artifact;
|
|
1012
|
+
const live = stateByName.get(name)?.liveRevision ?? null;
|
|
1013
|
+
return artifact && isSdkUpdated(live, artifact)
|
|
1014
|
+
? { sdkUpdated: true }
|
|
1015
|
+
: {};
|
|
1016
|
+
};
|
|
981
1017
|
const outcomes: PlayDeployOutcome[] = [];
|
|
982
1018
|
const toRegister: Array<{
|
|
983
1019
|
play: (typeof ordered)[number];
|
|
@@ -1068,6 +1104,7 @@ export async function runDeployment(
|
|
|
1068
1104
|
file: play.file,
|
|
1069
1105
|
status: 'registered',
|
|
1070
1106
|
version: playState?.workingRevision?.version ?? undefined,
|
|
1107
|
+
...sdkUpdated(play.name),
|
|
1071
1108
|
...(warning ? { warning } : {}),
|
|
1072
1109
|
});
|
|
1073
1110
|
}
|
|
@@ -1115,6 +1152,7 @@ export async function runDeployment(
|
|
|
1115
1152
|
typeof artifact.version === 'number'
|
|
1116
1153
|
? artifact.version
|
|
1117
1154
|
: undefined,
|
|
1155
|
+
...sdkUpdated(item.play.name),
|
|
1118
1156
|
...(warning ? { warning } : {}),
|
|
1119
1157
|
});
|
|
1120
1158
|
}
|
|
@@ -1137,7 +1175,7 @@ export async function runDeployment(
|
|
|
1137
1175
|
summary: outcomes
|
|
1138
1176
|
.map(
|
|
1139
1177
|
(outcome) =>
|
|
1140
|
-
`- \`${outcome.name}\`: ${outcome.status}${outcome.version !== undefined ? ` (v${outcome.version})` : ''}${outcome.warning ? `\n - :warning: ${outcome.warning}` : ''}`,
|
|
1178
|
+
`- \`${outcome.name}\`: ${outcome.status}${outcome.version !== undefined ? ` (v${outcome.version})` : ''}${outcome.sdkUpdated ? ' — SDK updated' : ''}${outcome.warning ? `\n - :warning: ${outcome.warning}` : ''}`,
|
|
1141
1179
|
)
|
|
1142
1180
|
.join('\n'),
|
|
1143
1181
|
});
|
|
@@ -1180,6 +1218,7 @@ export async function runDeployment(
|
|
|
1180
1218
|
previousVersion !== outcome.version
|
|
1181
1219
|
? { previousVersion }
|
|
1182
1220
|
: {}),
|
|
1221
|
+
...(outcome.status === 'promoted' ? sdkUpdated(outcome.name) : {}),
|
|
1183
1222
|
...(outcome.status === 'promoted' && warning ? { warning } : {}),
|
|
1184
1223
|
...(outcome.error ? { error: outcome.error } : {}),
|
|
1185
1224
|
});
|
|
@@ -1246,7 +1285,7 @@ export async function runDeployment(
|
|
|
1246
1285
|
summary: outcomes
|
|
1247
1286
|
.map(
|
|
1248
1287
|
(outcome) =>
|
|
1249
|
-
`- \`${outcome.name}\`: ${outcome.status}${outcome.warning ? `\n - :warning: ${outcome.warning}` : ''}`,
|
|
1288
|
+
`- \`${outcome.name}\`: ${outcome.status}${outcome.sdkUpdated ? ' — SDK updated' : ''}${outcome.warning ? `\n - :warning: ${outcome.warning}` : ''}`,
|
|
1250
1289
|
)
|
|
1251
1290
|
.join('\n'),
|
|
1252
1291
|
});
|