rightsize 0.7.10 → 0.7.13
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/README.md +6 -4
- package/dist/backend-docker/backend.d.ts +25 -2
- package/dist/backend-docker/backend.d.ts.map +1 -1
- package/dist/backend-docker/backend.js +26 -3
- package/dist/backend-docker/backend.js.map +1 -1
- package/dist/backend-msb/backend.d.ts +39 -15
- package/dist/backend-msb/backend.d.ts.map +1 -1
- package/dist/backend-msb/backend.js +83 -16
- package/dist/backend-msb/backend.js.map +1 -1
- package/dist/backend-msb/commands.d.ts +7 -5
- package/dist/backend-msb/commands.d.ts.map +1 -1
- package/dist/backend-msb/commands.js +37 -7
- package/dist/backend-msb/commands.js.map +1 -1
- package/dist/backend-msb/network-links.d.ts +86 -1
- package/dist/backend-msb/network-links.d.ts.map +1 -1
- package/dist/backend-msb/network-links.js +119 -4
- package/dist/backend-msb/network-links.js.map +1 -1
- package/dist/backend-msb/provisioner.d.ts +1 -1
- package/dist/backend-msb/provisioner.js +1 -1
- package/dist/core/backend.d.ts +15 -1
- package/dist/core/backend.d.ts.map +1 -1
- package/dist/core/checkpoint/registry.d.ts +12 -0
- package/dist/core/checkpoint/registry.d.ts.map +1 -1
- package/dist/core/checkpoint/registry.js +24 -2
- package/dist/core/checkpoint/registry.js.map +1 -1
- package/dist/core/free-ports.d.ts +18 -0
- package/dist/core/free-ports.d.ts.map +1 -1
- package/dist/core/free-ports.js +61 -0
- package/dist/core/free-ports.js.map +1 -1
- package/dist/core/generic-container.d.ts +43 -2
- package/dist/core/generic-container.d.ts.map +1 -1
- package/dist/core/generic-container.js +177 -44
- package/dist/core/generic-container.js.map +1 -1
- package/dist/core/model.d.ts +37 -1
- package/dist/core/model.d.ts.map +1 -1
- package/dist/core/network.d.ts +6 -2
- package/dist/core/network.d.ts.map +1 -1
- package/dist/core/network.js +4 -1
- package/dist/core/network.js.map +1 -1
- package/dist/core/reuse/hash.d.ts +12 -0
- package/dist/core/reuse/hash.d.ts.map +1 -1
- package/dist/core/reuse/hash.js +1 -0
- package/dist/core/reuse/hash.js.map +1 -1
- package/dist/core/reuse/registry.d.ts +10 -1
- package/dist/core/reuse/registry.d.ts.map +1 -1
- package/dist/core/reuse/registry.js +15 -1
- package/dist/core/reuse/registry.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/modules/cassandra.d.ts +12 -12
- package/dist/modules/cassandra.js +13 -13
- package/dist/modules/cassandra.js.map +1 -1
- package/dist/modules/minio.d.ts +8 -5
- package/dist/modules/minio.d.ts.map +1 -1
- package/dist/modules/minio.js +29 -17
- package/dist/modules/minio.js.map +1 -1
- package/dist/modules/postgres.d.ts +2 -2
- package/dist/modules/postgres.d.ts.map +1 -1
- package/dist/modules/postgres.js +11 -9
- package/dist/modules/postgres.js.map +1 -1
- package/package.json +1 -1
package/dist/core/model.d.ts
CHANGED
|
@@ -1,9 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The transport a published port speaks. `"tcp"` is the long-standing
|
|
3
|
+
* default — every producer of a `PortBinding` before this type existed
|
|
4
|
+
* always meant TCP, so a value here is never optional: every current
|
|
5
|
+
* producer (`GenericContainer.buildSpec`/`buildReuseSpec`,
|
|
6
|
+
* `fromCheckpointRegistryEntry`) tags it explicitly. A DESERIALIZED entry
|
|
7
|
+
* (the checkpoint registry) is the one place a missing tag can still show up
|
|
8
|
+
* — on-disk records written before this field existed — and that boundary
|
|
9
|
+
* normalizes a missing value to `"tcp"` rather than requiring it, so an old
|
|
10
|
+
* registry file keeps reading correctly.
|
|
11
|
+
*/
|
|
12
|
+
export type PortProtocol = "tcp" | "udp";
|
|
1
13
|
/** A published container port: a host port already chosen, mapped to the port the workload listens on inside the guest. */
|
|
2
14
|
export interface PortBinding {
|
|
3
|
-
/** The host-side port, pre-allocated by `FreePorts
|
|
15
|
+
/** The host-side port, pre-allocated by `FreePorts` (TCP) or its UDP counterpart. */
|
|
4
16
|
readonly hostPort: number;
|
|
5
17
|
/** The port the workload listens on inside the guest. */
|
|
6
18
|
readonly guestPort: number;
|
|
19
|
+
/**
|
|
20
|
+
* The transport this binding publishes over. A container may expose the
|
|
21
|
+
* SAME numeric `guestPort` on both protocols (DNS's 53, say) — each
|
|
22
|
+
* protocol gets its own independent host-port mapping, never a shared
|
|
23
|
+
* bare-int key, which is exactly why this field exists rather than
|
|
24
|
+
* inferring transport from the port number alone.
|
|
25
|
+
*/
|
|
26
|
+
readonly protocol: PortProtocol;
|
|
7
27
|
}
|
|
8
28
|
/** A host path mounted into the guest before boot. `readOnly` is `false` via the builder (`withCopyFileToContainer`). */
|
|
9
29
|
export interface FileMount {
|
|
@@ -110,6 +130,22 @@ export interface ContainerSpec {
|
|
|
110
130
|
* hash, the same as `memoryLimitMb`.
|
|
111
131
|
*/
|
|
112
132
|
readonly networkDisabled: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* The host loopback UDP ports this sandbox's network links need to reach —
|
|
135
|
+
* the distinct, ascending-sorted `targetHostPort`s of the UDP-protocol
|
|
136
|
+
* links `GenericContainer.start()` computes for this boot, filled in
|
|
137
|
+
* before `backend.create()` so a backend that routes links through the
|
|
138
|
+
* host (msb) can open exactly these ports in the SAME argv that boots the
|
|
139
|
+
* sandbox. `undefined`/absent means none — every current producer sets it
|
|
140
|
+
* explicitly, the same convention `mounts`/`aliases` follow with an empty
|
|
141
|
+
* array rather than leaving it out; absent only ever shows up on a
|
|
142
|
+
* hand-built spec that predates this field. docker ignores it — its
|
|
143
|
+
* native bridge network already carries UDP with no per-link declaration.
|
|
144
|
+
* Per-run wiring, never identity: never written to the named-checkpoint
|
|
145
|
+
* registry, never part of the reuse identity hash, never added to the
|
|
146
|
+
* pinned diagnostics report format.
|
|
147
|
+
*/
|
|
148
|
+
readonly hostUdpEgressPorts?: readonly number[];
|
|
113
149
|
}
|
|
114
150
|
/**
|
|
115
151
|
* The result of `GenericContainer.checkpoint()`: a ref to the committed
|
package/dist/core/model.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/core/model.ts"],"names":[],"mappings":"AAAA,2HAA2H;AAC3H,MAAM,WAAW,WAAW;IAC1B,
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/core/model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,KAAK,CAAC;AAEzC,2HAA2H;AAC3H,MAAM,WAAW,WAAW;IAC1B,qFAAqF;IACrF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,yDAAyD;IACzD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;CACjC;AAED,yHAAyH;AACzH,MAAM,WAAW,SAAS;IACxB,wCAAwC;IACxC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,yCAAyC;IACzC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED,kEAAkE;AAClE,MAAM,WAAW,UAAU;IACzB,uCAAuC;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,8CAA8C;IAC9C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,8CAA8C;IAC9C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,gDAAgD;IAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,sDAAsD;IACtD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,C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
@@ -10,10 +10,14 @@ export interface NetworkMember {
|
|
|
10
10
|
readonly aliases: ReadonlyArray<string>;
|
|
11
11
|
/** Whether this member is currently running (a stopped member is never linked to). */
|
|
12
12
|
readonly isRunning: boolean;
|
|
13
|
-
/** Guest ports this member has exposed. */
|
|
13
|
+
/** Guest ports this member has exposed over TCP. */
|
|
14
14
|
readonly exposedGuestPorts: ReadonlyArray<number>;
|
|
15
|
-
/** The host port bound to `guestPort`. */
|
|
15
|
+
/** The TCP host port bound to `guestPort`. */
|
|
16
16
|
mappedPort(guestPort: number): number;
|
|
17
|
+
/** Guest ports this member has exposed over UDP (`withExposedUdpPorts`) — a separate list from `exposedGuestPorts`, never merged with it. */
|
|
18
|
+
readonly exposedUdpGuestPorts: ReadonlyArray<number>;
|
|
19
|
+
/** The UDP host port bound to `guestPort`. */
|
|
20
|
+
mappedUdpPort(guestPort: number): number;
|
|
17
21
|
}
|
|
18
22
|
/**
|
|
19
23
|
* Alias-based connectivity between containers, on both backends. Docker
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/core/network.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhE;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,mDAAmD;IACnD,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACxC,sFAAsF;IACtF,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/core/network.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhE;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,mDAAmD;IACnD,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACxC,sFAAsF;IACtF,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,oDAAoD;IACpD,QAAQ,CAAC,iBAAiB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAClD,8CAA8C;IAC9C,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IACtC,6IAA6I;IAC7I,QAAQ,CAAC,oBAAoB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACrD,8CAA8C;IAC9C,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1C;AAMD;;;;;;;;;;GAUG;AACH,qBAAa,OAAQ,YAAW,eAAe;IAC7C,yDAAyD;IACzD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA0C;IACrE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAClD,OAAO,CAAC,WAAW,CAA6B;IAEhD,OAAO;IAIP,2HAA2H;IAC3H,MAAM,CAAC,UAAU,IAAI,OAAO;IAI5B,qGAAqG;IACrG,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM;IAQjD;;;;;OAKG;IACH,iBAAiB,IAAI,aAAa,CAAC,WAAW,CAAC;IAkB/C;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;IAe9F,oGAAoG;IAC9F,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAO5B,sFAAsF;IAChF,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7C"}
|
package/dist/core/network.js
CHANGED
|
@@ -46,7 +46,10 @@ export class Network {
|
|
|
46
46
|
}
|
|
47
47
|
for (const alias of member.aliases) {
|
|
48
48
|
for (const guestPort of member.exposedGuestPorts) {
|
|
49
|
-
links.push({ alias, guestPort, targetHostPort: member.mappedPort(guestPort) });
|
|
49
|
+
links.push({ alias, guestPort, targetHostPort: member.mappedPort(guestPort), protocol: "tcp" });
|
|
50
|
+
}
|
|
51
|
+
for (const guestPort of member.exposedUdpGuestPorts) {
|
|
52
|
+
links.push({ alias, guestPort, targetHostPort: member.mappedUdpPort(guestPort), protocol: "udp" });
|
|
50
53
|
}
|
|
51
54
|
}
|
|
52
55
|
}
|
package/dist/core/network.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.js","sourceRoot":"","sources":["../../src/core/network.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"network.js","sourceRoot":"","sources":["../../src/core/network.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA2BlD;;;;;;;;;;GAUG;AACH,MAAM,OAAO,OAAO;IAClB,yDAAyD;IAChD,EAAE,CAAS;IACH,UAAU,GAAG,IAAI,GAAG,EAA+B,CAAC;IACpD,OAAO,GAAuB,EAAE,CAAC;IAC1C,WAAW,CAA6B;IAEhD,YAAoB,EAAU;QAC5B,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;IAED,2HAA2H;IAC3H,MAAM,CAAC,UAAU;QACf,OAAO,IAAI,OAAO,CAAC,UAAU,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,qGAAqG;IACrG,OAAO,CAAC,KAAa,EAAE,SAAiB;QACtC,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACzC,IAAI,KAAK,KAAK,SAA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,OAAO,EAAE,CAAC;YAC5B,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACvC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACxB,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;gBAClB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YACpC,CAAC;YACD,KAAK,MAAM,SAAS,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;gBACjD,KAAK,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;YACrD,CAAC;QACH,CAAC;IACH,CAAC;IAED,oGAAoG;IACpG,KAAK,CAAC,KAAK;QACT,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YACnC,MAAM,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChD,CAAC;QACD,MAAM,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChC,CAAC;IAED,sFAAsF;IACtF,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;QACzB,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;CACF"}
|
|
@@ -15,6 +15,18 @@ export interface ReuseIdentitySpec {
|
|
|
15
15
|
readonly command: ReadonlyArray<string> | undefined;
|
|
16
16
|
/** Order does not affect the hash (canonicalized by sorting ascending). */
|
|
17
17
|
readonly exposedPorts: ReadonlyArray<number>;
|
|
18
|
+
/**
|
|
19
|
+
* UDP-exposed guest ports (`withExposedUdpPorts`) — a separate list from
|
|
20
|
+
* `exposedPorts`, never merged with it: a container exposing guest port 53
|
|
21
|
+
* on both protocols must hash differently from one exposing only 53/tcp or
|
|
22
|
+
* only 53/udp, so protocol is part of identity, not just the port number.
|
|
23
|
+
* Order does not affect the hash (canonicalized by sorting ascending); an
|
|
24
|
+
* empty array is omitted from the canonical form entirely, so a spec that
|
|
25
|
+
* never calls `withExposedUdpPorts` hashes exactly as it did before this
|
|
26
|
+
* field existed (see the pinned cross-language contract vector in
|
|
27
|
+
* `hash.test.ts`).
|
|
28
|
+
*/
|
|
29
|
+
readonly exposedUdpPorts: ReadonlyArray<number>;
|
|
18
30
|
readonly memoryLimitMb: number | undefined;
|
|
19
31
|
/** Order does not affect the hash (canonicalized by sorting on `guestPath`); content is hashed from `hostPath` at call time. */
|
|
20
32
|
readonly copies: ReadonlyArray<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../../src/core/reuse/hash.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,iIAAiI;IACjI,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACvD,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IACpD,2EAA2E;IAC3E,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7C,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,gIAAgI;IAChI,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;QAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC1F,+FAA+F;IAC/F,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,+FAA+F;IAC/F,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,gGAAgG;IAChG,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;CACnC;
|
|
1
|
+
{"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../../src/core/reuse/hash.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,iIAAiI;IACjI,QAAQ,CAAC,GAAG,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACvD,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IACpD,2EAA2E;IAC3E,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7C;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAChD,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,gIAAgI;IAChI,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;QAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC1F,+FAA+F;IAC/F,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,+FAA+F;IAC/F,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,gGAAgG;IAChG,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;CACnC;AAuED;;;;;GAKG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,CAGxE;AAED,gGAAgG;AAChG,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C"}
|
package/dist/core/reuse/hash.js
CHANGED
|
@@ -38,6 +38,7 @@ async function canonicalize(spec) {
|
|
|
38
38
|
...(spec.diskLimitMb !== undefined ? { diskLimitMb: spec.diskLimitMb } : {}),
|
|
39
39
|
...(spec.tmpfsRootMb !== undefined ? { tmpfsRootMb: spec.tmpfsRootMb } : {}),
|
|
40
40
|
...(spec.networkDisabled ? { networkDisabled: true } : {}),
|
|
41
|
+
...(spec.exposedUdpPorts.length > 0 ? { exposedUdpPorts: [...spec.exposedUdpPorts].sort((a, b) => a - b) } : {}),
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
44
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.js","sourceRoot":"","sources":["../../../src/core/reuse/hash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"hash.js","sourceRoot":"","sources":["../../../src/core/reuse/hash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;AA+DxC,SAAS,cAAc,CAAC,CAAS,EAAE,CAAS;IAC1C,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,KAAK,UAAU,eAAe,CAAC,QAAgB;IAC7C,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC7C,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC5D,CAAC;AAED;;;;;;;;;;GAUG;AACH,KAAK,UAAU,YAAY,CAAC,IAAuB;IACjD,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,KAAK,MAAM,CAAC,GAAG,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AAC,EAAE,CAAC;QAC5E,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,IAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnE,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACjH,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,IAAuB;IACrD,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;IAC3C,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,gGAAgG;AAChG,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,YAAY,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;AACzC,CAAC"}
|
|
@@ -9,11 +9,20 @@
|
|
|
9
9
|
export interface ReuseRegistryEntry {
|
|
10
10
|
readonly name: string;
|
|
11
11
|
readonly image: string;
|
|
12
|
-
/** `{"<guestPort>": <hostPort>, ...}` — JSON object keys are always strings, so the guest port is stringified. */
|
|
12
|
+
/** `{"<guestPort>": <hostPort>, ...}` — TCP ports only. JSON object keys are always strings, so the guest port is stringified. */
|
|
13
13
|
readonly ports: Record<string, number>;
|
|
14
14
|
readonly createdIso: string;
|
|
15
15
|
/** The backend name (e.g. `"microsandbox"`, `"docker"`) that created this sandbox — informational; adopt always re-verifies liveness through the CURRENTLY active backend regardless of this value. */
|
|
16
16
|
readonly backend: string;
|
|
17
|
+
/**
|
|
18
|
+
* The UDP counterpart of `ports` (`withExposedUdpPorts`), kept as a
|
|
19
|
+
* SEPARATE map so a bare-int guest port never has to serve as a key
|
|
20
|
+
* shared between protocols. ADDITIVE and OPTIONAL: absent on every entry
|
|
21
|
+
* written before UDP exposure existed — a reader treats a missing value
|
|
22
|
+
* as "no UDP ports were ever exposed" (normalizes to `{}`), never as
|
|
23
|
+
* corrupt.
|
|
24
|
+
*/
|
|
25
|
+
readonly udpPorts?: Record<string, number>;
|
|
17
26
|
}
|
|
18
27
|
/** `<cacheDir>/reuse` — the directory every reuse registry file lives under. */
|
|
19
28
|
export declare function reuseDir(cacheDir: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/core/reuse/registry.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/core/reuse/registry.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,kIAAkI;IAClI,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,uMAAuM;IACvM,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5C;AAED,gFAAgF;AAChF,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,2BAA2B;AAC3B,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhE;AAoCD,uPAAuP;AACvP,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAA;CAAE,CAAC;AAEnE;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAiB9F;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAOlH;AAED,sFAAsF;AACtF,wBAAsB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAElF"}
|
|
@@ -23,7 +23,21 @@ function isRegistryEntry(value) {
|
|
|
23
23
|
if (typeof ports !== "object" || ports === null || Array.isArray(ports)) {
|
|
24
24
|
return false;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
if (!Object.values(ports).every((v) => typeof v === "number")) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
// Additive and optional (see ReuseRegistryEntry's own doc): an entry
|
|
30
|
+
// written before UDP exposure existed simply omits the key.
|
|
31
|
+
const udpPorts = rec["udpPorts"];
|
|
32
|
+
if (udpPorts !== undefined) {
|
|
33
|
+
if (typeof udpPorts !== "object" || udpPorts === null || Array.isArray(udpPorts)) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
if (!Object.values(udpPorts).every((v) => typeof v === "number")) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return true;
|
|
27
41
|
}
|
|
28
42
|
/**
|
|
29
43
|
* Reads and parses `reuse/<hash>.json`. `"missing"` means the file does not
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/core/reuse/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/core/reuse/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AA6BlC,gFAAgF;AAChF,MAAM,UAAU,QAAQ,CAAC,QAAgB;IACvC,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACtC,CAAC;AAED,2BAA2B;AAC3B,MAAM,UAAU,SAAS,CAAC,QAAgB,EAAE,IAAY;IACtD,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,GAAG,IAAI,OAAO,CAAC,CAAC;AACvD,CAAC;AAED,SAAS,eAAe,CAAC,KAAc;IACrC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,GAAG,GAAG,KAAgC,CAAC;IAC7C,IACE,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,QAAQ;QAC/B,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,QAAQ;QAChC,OAAO,GAAG,CAAC,YAAY,CAAC,KAAK,QAAQ;QACrC,OAAO,GAAG,CAA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,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;AAC9D,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export { UnsupportedByBackendError, PortBindConflictError, ContainerLaunchError, BackendError, ProvisionError, ReuseWithNetworkError, IsolationRequiredError, CheckpointUnsupportedError, CheckpointBackendMismatchError, ReuseFromCheckpointError, CheckpointRestoreEnvOverrideError, RelativeContainerPathError, InvalidCheckpointNameError, CheckpointArtifactMissingError, MalformedCheckpointArchiveError, IncompatibleImageError, RootDiskConflictError, TmpfsRootExceedsMemoryError, NetworkDisabledConflictError, TmpfsRootCheckpointError, CheckpointWorkloadCommandMissingError, } from "./core/errors.js";
|
|
18
18
|
export { DockerImageName } from "./core/docker-image-name.js";
|
|
19
|
-
export type { PortBinding, FileMount, ExecResult, ContainerSpec, Checkpoint } from "./core/model.js";
|
|
19
|
+
export type { PortBinding, PortProtocol, FileMount, ExecResult, ContainerSpec, Checkpoint } from "./core/model.js";
|
|
20
20
|
export type { NetworkLink, SandboxHandle, FollowHandle, SandboxBackend, BackendProvider, ReaperKillCommand, BackendCapabilities, } from "./core/backend.js";
|
|
21
21
|
export { registerBackend, Backends } from "./core/backends.js";
|
|
22
22
|
export { FreePorts } from "./core/free-ports.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,qBAAqB,EACrB,sBAAsB,EACtB,0BAA0B,EAC1B,8BAA8B,EAC9B,wBAAwB,EACxB,iCAAiC,EACjC,0BAA0B,EAC1B,0BAA0B,EAC1B,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACtB,qBAAqB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,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACzE,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -6,16 +6,15 @@ import { DockerImageName } from "../core/docker-image-name.js";
|
|
|
6
6
|
* No-arg construction floats to `cassandra:latest`, so the version tracks
|
|
7
7
|
* upstream rather than this library's release cycle (verified against
|
|
8
8
|
* `cassandra:5.0.8`, including every fact below — the `GPG_KEYS` override
|
|
9
|
-
* stays unconditional regardless of which version ends up running
|
|
10
|
-
*
|
|
11
|
-
* against one that does).
|
|
9
|
+
* stays unconditional regardless of which version ends up running: a
|
|
10
|
+
* harmless no-op on the pinned msb either way).
|
|
12
11
|
*
|
|
13
|
-
* ### `GPG_KEYS`
|
|
12
|
+
* ### `GPG_KEYS` is cleared as a guard for older msb releases
|
|
14
13
|
*
|
|
15
14
|
* `cassandra:5.0.8`'s baked-in `GPG_KEYS` build arg contains a literal TAB
|
|
16
|
-
* character
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* character. On older msb releases (0.6.x) that character panicked the VM
|
|
16
|
+
* builder on any image whose baked env carried one, before the guest even
|
|
17
|
+
* booted:
|
|
19
18
|
*
|
|
20
19
|
* ```
|
|
21
20
|
* sandbox process exited (signal: 6 (SIGABRT)) before agent relay became available
|
|
@@ -27,11 +26,12 @@ import { DockerImageName } from "../core/docker-image-name.js";
|
|
|
27
26
|
* panicked at msb_krun_vmm-0.1.25/src/builder.rs:1154: ... Err value: InvalidAscii
|
|
28
27
|
* ```
|
|
29
28
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
29
|
+
* The pinned msb boots this image fine with no override at all. `GPG_KEYS`
|
|
30
|
+
* is consumed only at image-build time (verifying the signing keys baked
|
|
31
|
+
* into that layer) — it has no effect on the running container, so
|
|
32
|
+
* overriding it to an empty, tab-free string here is safe and kept
|
|
33
|
+
* unconditionally as a guard (for example, for anyone pointing `MSB_PATH`
|
|
34
|
+
* at an older msb).
|
|
35
35
|
*
|
|
36
36
|
* ### Heap sized down, memory ceiling measured
|
|
37
37
|
*
|
|
@@ -11,16 +11,15 @@ const DEFAULT_IMAGE = "cassandra:latest";
|
|
|
11
11
|
* No-arg construction floats to `cassandra:latest`, so the version tracks
|
|
12
12
|
* upstream rather than this library's release cycle (verified against
|
|
13
13
|
* `cassandra:5.0.8`, including every fact below — the `GPG_KEYS` override
|
|
14
|
-
* stays unconditional regardless of which version ends up running
|
|
15
|
-
*
|
|
16
|
-
* against one that does).
|
|
14
|
+
* stays unconditional regardless of which version ends up running: a
|
|
15
|
+
* harmless no-op on the pinned msb either way).
|
|
17
16
|
*
|
|
18
|
-
* ### `GPG_KEYS`
|
|
17
|
+
* ### `GPG_KEYS` is cleared as a guard for older msb releases
|
|
19
18
|
*
|
|
20
19
|
* `cassandra:5.0.8`'s baked-in `GPG_KEYS` build arg contains a literal TAB
|
|
21
|
-
* character
|
|
22
|
-
*
|
|
23
|
-
*
|
|
20
|
+
* character. On older msb releases (0.6.x) that character panicked the VM
|
|
21
|
+
* builder on any image whose baked env carried one, before the guest even
|
|
22
|
+
* booted:
|
|
24
23
|
*
|
|
25
24
|
* ```
|
|
26
25
|
* sandbox process exited (signal: 6 (SIGABRT)) before agent relay became available
|
|
@@ -32,11 +31,12 @@ const DEFAULT_IMAGE = "cassandra:latest";
|
|
|
32
31
|
* panicked at msb_krun_vmm-0.1.25/src/builder.rs:1154: ... Err value: InvalidAscii
|
|
33
32
|
* ```
|
|
34
33
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
34
|
+
* The pinned msb boots this image fine with no override at all. `GPG_KEYS`
|
|
35
|
+
* is consumed only at image-build time (verifying the signing keys baked
|
|
36
|
+
* into that layer) — it has no effect on the running container, so
|
|
37
|
+
* overriding it to an empty, tab-free string here is safe and kept
|
|
38
|
+
* unconditionally as a guard (for example, for anyone pointing `MSB_PATH`
|
|
39
|
+
* at an older msb).
|
|
40
40
|
*
|
|
41
41
|
* ### Heap sized down, memory ceiling measured
|
|
42
42
|
*
|
|
@@ -54,7 +54,7 @@ export class CassandraContainer extends GenericContainer {
|
|
|
54
54
|
constructor(image = DEFAULT_IMAGE) {
|
|
55
55
|
super(DockerImageName.requireCompatible(image, EXPECTED_REPOSITORY));
|
|
56
56
|
this.withExposedPorts(CQL_PORT)
|
|
57
|
-
//
|
|
57
|
+
// Guard for older msb releases — see the class doc for the exact panic this avoids.
|
|
58
58
|
.withEnv("GPG_KEYS", "")
|
|
59
59
|
.withEnv("MAX_HEAP_SIZE", "512M")
|
|
60
60
|
.withEnv("HEAP_NEWSIZE", "128M")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cassandra.js","sourceRoot":"","sources":["../../src/modules/cassandra.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,QAAQ,GAAG,IAAI,CAAC;AACtB,MAAM,kBAAkB,GAAG,OAAO,CAAC;AACnC,MAAM,mBAAmB,GAAG,WAAW,CAAC;AACxC,MAAM,aAAa,GAAG,kBAAkB,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAAC,MAAM,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAuB,CAAC;IAC7E,CAAC;IAED,uGAAuG;IACvG,IAAI,YAAY;QACd,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;IACxD,CAAC;IAED,4CAA4C;IAC5C,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IAED,uJAAuJ;IACvJ,IAAI,eAAe;QACjB,OAAO,aAAa,CAAC;IACvB,CAAC;CACF"}
|
package/dist/modules/minio.d.ts
CHANGED
|
@@ -17,11 +17,14 @@ import { DockerImageName } from "../core/docker-image-name.js";
|
|
|
17
17
|
* Readiness is a protocol-aware HTTP check against `/minio/health/live` on
|
|
18
18
|
* the API port — verified answering 200 on the very first poll after boot.
|
|
19
19
|
*
|
|
20
|
-
* No-arg construction floats to `
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
20
|
+
* No-arg construction floats to `pgsty/minio:latest` (see `DEFAULT_IMAGE`
|
|
21
|
+
* for why), so the version moves with that image's releases rather than
|
|
22
|
+
* this library's. `minio/minio` and `quay.io/minio/minio` images are still
|
|
23
|
+
* accepted. Verified against `minio/minio:RELEASE.2025-09-07T16-13-09Z`;
|
|
24
|
+
* readiness, auth enforcement, and the `mc` round-trip were verified again
|
|
25
|
+
* by this module's integration test against
|
|
26
|
+
* `pgsty/minio:RELEASE.2026-08-04T00-00-00Z` (what `latest` pointed at) on
|
|
27
|
+
* msb 0.7.3.
|
|
25
28
|
*/
|
|
26
29
|
export declare class MinIOContainer extends GenericContainer {
|
|
27
30
|
private rootUserState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minio.d.ts","sourceRoot":"","sources":["../../src/modules/minio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"minio.d.ts","sourceRoot":"","sources":["../../src/modules/minio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAyB/D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,cAAe,SAAQ,gBAAgB;IAClD,OAAO,CAAC,aAAa,CAAc;IACnC,OAAO,CAAC,iBAAiB,CAAkB;gBAE/B,KAAK,GAAE,MAAM,GAAG,eAA+B;WAcrC,KAAK,CAAC,KAAK,GAAE,MAAM,GAAG,eAA+B,GAAG,OAAO,CAAC,cAAc,CAAC;IAIrG,wDAAwD;IACxD,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAKhC,kHAAkH;IAClH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAKxC,qDAAqD;IACrD,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,6DAA6D;IAC7D,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,uDAAuD;IACvD,IAAI,WAAW,IAAI,MAAM,CAExB;CACF"}
|
package/dist/modules/minio.js
CHANGED
|
@@ -4,15 +4,24 @@ import { DockerImageName } from "../core/docker-image-name.js";
|
|
|
4
4
|
const API_PORT = 9000;
|
|
5
5
|
const CONSOLE_PORT = 9001;
|
|
6
6
|
const EXPECTED_REPOSITORY = "minio/minio";
|
|
7
|
-
// Docker Hub's `minio/minio`
|
|
8
|
-
//
|
|
9
|
-
// default
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
// MinIO no longer publishes public images: Docker Hub's `minio/minio` was
|
|
8
|
+
// removed, and as of September 2026 `quay.io/minio/minio`, this module's
|
|
9
|
+
// previous default, refuses anonymous pulls (HTTP 401). `pgsty/minio` is
|
|
10
|
+
// Pigsty's community build of MinIO from source, published on Docker Hub
|
|
11
|
+
// for linux/amd64 and linux/arm64 with upstream's image layout (the same
|
|
12
|
+
// entrypoint and env defaults, `mc` bundled).
|
|
13
|
+
const DEFAULT_IMAGE = "pgsty/minio:latest";
|
|
14
|
+
const PGSTY_REPOSITORY = "pgsty/minio";
|
|
15
|
+
/**
|
|
16
|
+
* `pgsty/minio` is this module's own default, so it counts as a substitute
|
|
17
|
+
* for `EXPECTED_REPOSITORY` without the caller declaring it. Every other
|
|
18
|
+
* image, including `minio/minio` and `quay.io/minio/minio`, passes through
|
|
19
|
+
* unchanged for `requireCompatible` to check as usual.
|
|
20
|
+
*/
|
|
21
|
+
function resolveCompatibleImage(image) {
|
|
22
|
+
const name = typeof image === "string" ? DockerImageName.parse(image) : image;
|
|
23
|
+
return name.repository === PGSTY_REPOSITORY ? name.asCompatibleSubstituteFor(EXPECTED_REPOSITORY) : image;
|
|
24
|
+
}
|
|
16
25
|
/**
|
|
17
26
|
* A single-node MinIO container — an S3-compatible object store. Requires
|
|
18
27
|
* an explicit command: the image's default ENTRYPOINT alone does not serve,
|
|
@@ -30,24 +39,27 @@ const DEFAULT_IMAGE = "quay.io/minio/minio:latest";
|
|
|
30
39
|
* Readiness is a protocol-aware HTTP check against `/minio/health/live` on
|
|
31
40
|
* the API port — verified answering 200 on the very first poll after boot.
|
|
32
41
|
*
|
|
33
|
-
* No-arg construction floats to `
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
42
|
+
* No-arg construction floats to `pgsty/minio:latest` (see `DEFAULT_IMAGE`
|
|
43
|
+
* for why), so the version moves with that image's releases rather than
|
|
44
|
+
* this library's. `minio/minio` and `quay.io/minio/minio` images are still
|
|
45
|
+
* accepted. Verified against `minio/minio:RELEASE.2025-09-07T16-13-09Z`;
|
|
46
|
+
* readiness, auth enforcement, and the `mc` round-trip were verified again
|
|
47
|
+
* by this module's integration test against
|
|
48
|
+
* `pgsty/minio:RELEASE.2026-08-04T00-00-00Z` (what `latest` pointed at) on
|
|
49
|
+
* msb 0.7.3.
|
|
38
50
|
*/
|
|
39
51
|
export class MinIOContainer extends GenericContainer {
|
|
40
52
|
rootUserState = "testuser";
|
|
41
53
|
rootPasswordState = "testpassword";
|
|
42
54
|
constructor(image = DEFAULT_IMAGE) {
|
|
43
|
-
super(DockerImageName.requireCompatible(image, EXPECTED_REPOSITORY));
|
|
55
|
+
super(DockerImageName.requireCompatible(resolveCompatibleImage(image), EXPECTED_REPOSITORY));
|
|
44
56
|
this.withExposedPorts(API_PORT, CONSOLE_PORT)
|
|
45
57
|
.withCommand("server", "/data", "--console-address", ":9001")
|
|
46
58
|
.withEnv("MINIO_ROOT_USER", this.rootUserState)
|
|
47
59
|
.withEnv("MINIO_ROOT_PASSWORD", this.rootPasswordState)
|
|
48
60
|
.waitingFor(Wait.forHttp("/minio/health/live").forPort(API_PORT));
|
|
49
|
-
// No withMemoryLimit override: the round-trip that verified
|
|
50
|
-
// ran at 1024 MB, but whether MinIO actually needs more than msb's
|
|
61
|
+
// No withMemoryLimit override: the `minio/minio` round-trip that verified
|
|
62
|
+
// this module ran at 1024 MB, but whether MinIO actually needs more than msb's
|
|
51
63
|
// default microVM sizing was never isolated in that pass — a floor
|
|
52
64
|
// belongs here once that's measured on its own, not assumed from a
|
|
53
65
|
// number that included the whole round-trip's overhead.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minio.js","sourceRoot":"","sources":["../../src/modules/minio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,QAAQ,GAAG,IAAI,CAAC;AACtB,MAAM,YAAY,GAAG,IAAI,C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* `postgres:18-alpine`, including the wait-strategy and `DOCKER_PG_LLVM_DEPS`
|
|
12
12
|
* facts below). `latest` is Debian-based rather than Alpine — functionally
|
|
13
13
|
* equivalent, larger to pull. The `DOCKER_PG_LLVM_DEPS` override stays in
|
|
14
|
-
* place regardless:
|
|
15
|
-
*
|
|
14
|
+
* place regardless: a harmless no-op on the pinned msb either way, and a
|
|
15
|
+
* guard for anyone running against an older msb.
|
|
16
16
|
*/
|
|
17
17
|
export declare class PostgresContainer extends GenericContainer {
|
|
18
18
|
private usernameState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../src/modules/postgres.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAM/D;;;;;;;;;;;;;GAaG;AACH,qBAAa,iBAAkB,SAAQ,gBAAgB;IACrD,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO,CAAC,aAAa,CAAU;gBAEnB,KAAK,GAAE,MAAM,GAAG,eAA+B;
|
|
1
|
+
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../src/modules/postgres.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAM/D;;;;;;;;;;;;;GAaG;AACH,qBAAa,iBAAkB,SAAQ,gBAAgB;IACrD,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO,CAAC,aAAa,CAAU;gBAEnB,KAAK,GAAE,MAAM,GAAG,eAA+B;WA2BrC,KAAK,CAAC,KAAK,GAAE,MAAM,GAAG,eAA+B,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIxG,kDAAkD;IAClD,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAKpC,sDAAsD;IACtD,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAKpC,gDAAgD;IAChD,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAKpC,qDAAqD;IACrD,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,yDAAyD;IACzD,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,qDAAqD;IACrD,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,oFAAoF;IACpF,IAAI,gBAAgB,IAAI,MAAM,CAE7B;CACF"}
|
package/dist/modules/postgres.js
CHANGED
|
@@ -15,8 +15,8 @@ const DEFAULT_IMAGE = "postgres:latest";
|
|
|
15
15
|
* `postgres:18-alpine`, including the wait-strategy and `DOCKER_PG_LLVM_DEPS`
|
|
16
16
|
* facts below). `latest` is Debian-based rather than Alpine — functionally
|
|
17
17
|
* equivalent, larger to pull. The `DOCKER_PG_LLVM_DEPS` override stays in
|
|
18
|
-
* place regardless:
|
|
19
|
-
*
|
|
18
|
+
* place regardless: a harmless no-op on the pinned msb either way, and a
|
|
19
|
+
* guard for anyone running against an older msb.
|
|
20
20
|
*/
|
|
21
21
|
export class PostgresContainer extends GenericContainer {
|
|
22
22
|
usernameState = "test";
|
|
@@ -30,13 +30,15 @@ export class PostgresContainer extends GenericContainer {
|
|
|
30
30
|
.withEnv("POSTGRES_DB", this.databaseState)
|
|
31
31
|
// The official postgres:*-alpine image bakes DOCKER_PG_LLVM_DEPS into
|
|
32
32
|
// its manifest with a literal tab character in the value (a
|
|
33
|
-
// package-list built with `\t\t` continuation). msb
|
|
34
|
-
//
|
|
35
|
-
// guest ever
|
|
36
|
-
// it's the image, not us)
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
//
|
|
33
|
+
// package-list built with `\t\t` continuation). On older msb releases
|
|
34
|
+
// (0.6.x) that boot-env value panicked the krun VMM builder with
|
|
35
|
+
// InvalidAscii before the guest ever started (reproduced with zero
|
|
36
|
+
// rightsize-set env vars — it's the image, not us); the pinned msb
|
|
37
|
+
// boots it fine with no override. Docker is unaffected either way.
|
|
38
|
+
// Overriding the var here wins over the image default in both
|
|
39
|
+
// backends' env-merge order and is a no-op for the build the image
|
|
40
|
+
// already baked, so it's a safe, backend-portable guard rather than an
|
|
41
|
+
// msb-only special case.
|
|
40
42
|
.withEnv("DOCKER_PG_LLVM_DEPS", "")
|
|
41
43
|
// The postgres entrypoint starts the server once to run initdb
|
|
42
44
|
// scripts against it, shuts it down, then starts it again for real —
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres.js","sourceRoot":"","sources":["../../src/modules/postgres.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,mBAAmB,GAAG,UAAU,CAAC;AACvC,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAExC;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,iBAAkB,SAAQ,gBAAgB;IAC7C,aAAa,GAAG,MAAM,CAAC;IACvB,aAAa,GAAG,MAAM,CAAC;IACvB,aAAa,GAAG,MAAM,CAAC;IAE/B,YAAY,QAAkC,aAAa;QACzD,KAAK,CAAC,eAAe,CAAC,iBAAiB,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC;QACrE,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC;aAC9B,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,aAAa,CAAC;aAC5C,OAAO,CAAC,mBAAmB,EAAE,IAAI,CAAC,aAAa,CAAC;aAChD,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC;YAC3C,sEAAsE;YACtE,4DAA4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