@ship.zone/runner 5.2.0 → 5.4.0
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 +22 -0
- package/dist_rust/runnerworkspace_linux_amd64_musl +0 -0
- package/dist_rust/runnerworkspace_linux_amd64_musl.tsrust-build.json +4 -4
- package/dist_rust/runnerworkspace_linux_arm64_musl +0 -0
- package/dist_rust/runnerworkspace_linux_arm64_musl.tsrust-build.json +4 -4
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/api-client.js +11 -5
- package/dist_ts/cli.js +57 -7
- package/dist_ts/config.js +8 -5
- package/dist_ts/decommission.d.ts +19 -0
- package/dist_ts/decommission.js +122 -0
- package/dist_ts/egress-proxy.d.ts +28 -0
- package/dist_ts/egress-proxy.js +320 -1
- package/dist_ts/errors.d.ts +4 -1
- package/dist_ts/errors.js +7 -2
- package/dist_ts/index.d.ts +1 -0
- package/dist_ts/index.js +2 -1
- package/dist_ts/microvm-executor.d.ts +1 -0
- package/dist_ts/microvm-executor.js +54 -3
- package/dist_ts/runner.js +7 -1
- package/dist_ts/vsock-protocol.d.ts +6 -1
- package/dist_ts/vsock-protocol.js +5 -2
- package/package.json +1 -1
- package/rust/src/cpio.rs +15 -5
- package/rust/src/egress.rs +556 -0
- package/rust/src/guest.rs +128 -23
- package/rust/src/lib.rs +1 -0
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/api-client.ts +14 -3
- package/ts/cli.ts +66 -6
- package/ts/config.ts +9 -4
- package/ts/decommission.ts +167 -0
- package/ts/egress-proxy.ts +355 -0
- package/ts/errors.ts +10 -1
- package/ts/index.ts +1 -0
- package/ts/microvm-executor.ts +64 -2
- package/ts/runner.ts +6 -0
- package/ts/vsock-protocol.ts +8 -2
package/ts/runner.ts
CHANGED
|
@@ -903,6 +903,12 @@ export class ShipRunner {
|
|
|
903
903
|
const transferSignal = timedOut ? guard.controller.signal : executionSignal;
|
|
904
904
|
|
|
905
905
|
if (!cleanupFailure && !guard.controller.signal.aborted) {
|
|
906
|
+
if (systemFailure !== undefined && executionAbort.signal.reason !== 'log_delivery_failed') {
|
|
907
|
+
const failureMsg = systemFailure instanceof Error ? systemFailure.message : String(systemFailure);
|
|
908
|
+
if (failureMsg) {
|
|
909
|
+
await logs.writeRunnerMessage(`[runner] ${failureMsg}\n`).catch(() => {});
|
|
910
|
+
}
|
|
911
|
+
}
|
|
906
912
|
try {
|
|
907
913
|
await logs.flush();
|
|
908
914
|
} catch (error) {
|
package/ts/vsock-protocol.ts
CHANGED
|
@@ -39,6 +39,7 @@ export interface IGuestStepRequest {
|
|
|
39
39
|
uid: number;
|
|
40
40
|
gid: number;
|
|
41
41
|
rootMode?: boolean;
|
|
42
|
+
egressEnabled?: boolean;
|
|
42
43
|
timeoutMs: number;
|
|
43
44
|
memoryBytes: number;
|
|
44
45
|
cpus: number;
|
|
@@ -66,6 +67,7 @@ export interface IGuestImageBuildRequest {
|
|
|
66
67
|
importCacheDir?: string;
|
|
67
68
|
exportCacheDir?: string;
|
|
68
69
|
buildctlPath?: string;
|
|
70
|
+
egressProxyUrl?: string;
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
export interface IGuestImageBuildResult {
|
|
@@ -259,9 +261,13 @@ export class GuestVsockClient {
|
|
|
259
261
|
gid: number;
|
|
260
262
|
mode?: 'oci' | 'vm' | 'oci-image';
|
|
261
263
|
npmrcContent?: string;
|
|
262
|
-
|
|
264
|
+
enableEgress?: boolean;
|
|
265
|
+
}): Promise<{ egressProxyPort?: number }> {
|
|
263
266
|
await this.sendJson({ op: 'prepare_workspace', ...options });
|
|
264
|
-
await this.readJsonResponse<{ ok: true }>();
|
|
267
|
+
const res = await this.readJsonResponse<{ ok: true; egressProxyPort?: number }>();
|
|
268
|
+
return {
|
|
269
|
+
...(typeof res.egressProxyPort === 'number' ? { egressProxyPort: res.egressProxyPort } : {}),
|
|
270
|
+
};
|
|
265
271
|
}
|
|
266
272
|
|
|
267
273
|
async importTar(
|