runcloud 0.2.209 → 0.2.211
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 +1 -0
- package/dist/commands/sandbox.js +20 -0
- package/dist/commands/sandboxOutput.js +4 -1
- package/dist/commands/xcode.js +8 -0
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/runcloud-0.2.211.tgz +0 -0
- package/skills/run-cloud-sandboxes/SKILL.md +1 -0
- package/runcloud-0.2.209.tgz +0 -0
package/README.md
CHANGED
|
@@ -176,6 +176,7 @@ runcloud asset delete <id>
|
|
|
176
176
|
```bash
|
|
177
177
|
runcloud sandbox create # start a sandbox (default image: runcloud/agent-base)
|
|
178
178
|
runcloud sandbox create --cpu 0.5 --memory 1024 # allocate CPU cores and memory in MiB
|
|
179
|
+
runcloud sandbox create --memory 512 --memory-limit 2048 # may use up to 2048 MiB when the host has room; billed as used
|
|
179
180
|
runcloud sandbox create --disk 80 # request an 80 GiB root filesystem
|
|
180
181
|
runcloud sandbox exec <id> npm run build # run a command inside it
|
|
181
182
|
runcloud sandbox shell <id> # interactive shell, streamed over the API
|
package/dist/commands/sandbox.js
CHANGED
|
@@ -150,6 +150,18 @@ function parseMemoryMb(value) {
|
|
|
150
150
|
}
|
|
151
151
|
return n;
|
|
152
152
|
}
|
|
153
|
+
function parseMemoryLimitMb(value) {
|
|
154
|
+
const n = Number(value);
|
|
155
|
+
if (!Number.isInteger(n) || n <= 0) {
|
|
156
|
+
throw new InvalidArgumentError('--memory-limit must be a positive integer of MiB, e.g. 2048');
|
|
157
|
+
}
|
|
158
|
+
return n;
|
|
159
|
+
}
|
|
160
|
+
function assertMemoryLimit(memoryLimit, memory) {
|
|
161
|
+
if (memoryLimit !== undefined && memory !== undefined && memoryLimit < memory) {
|
|
162
|
+
throw new Error(`--memory-limit (${memoryLimit} MiB) must not be below --memory (${memory} MiB)`);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
153
165
|
function parseDiskGb(value) {
|
|
154
166
|
const n = Number(value);
|
|
155
167
|
if (!Number.isSafeInteger(n) || n <= 0 || n > MAX_SANDBOX_DISK_GIB) {
|
|
@@ -354,6 +366,7 @@ export function registerSandbox(program) {
|
|
|
354
366
|
.option('--org <id>', 'billing and ownership organization')
|
|
355
367
|
.option('--cpu <cores>', 'fractional vCPU allocation, e.g. 0.5', parseCpuCores)
|
|
356
368
|
.option('--memory <mb>', 'memory allocation in MiB', parseMemoryMb)
|
|
369
|
+
.option('--memory-limit <mb>', 'memory the sandbox may use above --memory when its host has room, in MiB; memory above --memory is billed as used', parseMemoryLimitMb)
|
|
357
370
|
.option('--disk <gb>', 'root disk capacity in GiB', parseDiskGb)
|
|
358
371
|
.option('--idle-pause <seconds>', 'pause after inactivity; 0 keeps it running', parseIdlePauseSeconds)
|
|
359
372
|
.option('--timeout <seconds>', 'maximum sandbox lifetime; defaults to 300, or 0 for persistent sandboxes', parseTimeoutSeconds)
|
|
@@ -390,6 +403,9 @@ export function registerSandbox(program) {
|
|
|
390
403
|
body.cpu = cpu;
|
|
391
404
|
if (memory !== undefined)
|
|
392
405
|
body.memory = memory;
|
|
406
|
+
assertMemoryLimit(opts.memoryLimit, memory);
|
|
407
|
+
if (opts.memoryLimit !== undefined)
|
|
408
|
+
body.memoryLimit = opts.memoryLimit;
|
|
393
409
|
if (opts.disk !== undefined)
|
|
394
410
|
body.disk = opts.disk;
|
|
395
411
|
const persistent = exposed || opts.persistent || opts.idlePause === 0;
|
|
@@ -801,6 +817,7 @@ export function registerSandbox(program) {
|
|
|
801
817
|
.option('--size <size>', 'size preset for the restored sandbox')
|
|
802
818
|
.option('--cpu <cores>', 'CPU cores, including fractional values', parseCpuCores)
|
|
803
819
|
.option('--memory <mb>', 'memory in MiB', parseMemoryMb)
|
|
820
|
+
.option('--memory-limit <mb>', 'memory the fork may use above its memory when its host has room, in MiB; memory above it is billed as used', parseMemoryLimitMb)
|
|
804
821
|
.option('--disk <gb>', 'root disk capacity in GiB (may only grow)', parseDiskGb)
|
|
805
822
|
.option('--region <region>', 'placement region')
|
|
806
823
|
.option('--secret-group <group>', 'attach a secret group to the fork; a fork inherits NONE by default (secrets live in memory, so a snapshot cannot carry them)', collectRepeatable, [])
|
|
@@ -816,6 +833,9 @@ export function registerSandbox(program) {
|
|
|
816
833
|
body.cpu = opts.cpu;
|
|
817
834
|
if (opts.memory !== undefined)
|
|
818
835
|
body.memory = opts.memory;
|
|
836
|
+
assertMemoryLimit(opts.memoryLimit, opts.memory);
|
|
837
|
+
if (opts.memoryLimit !== undefined)
|
|
838
|
+
body.memoryLimit = opts.memoryLimit;
|
|
819
839
|
if (opts.disk !== undefined)
|
|
820
840
|
body.disk = opts.disk;
|
|
821
841
|
if (opts.region)
|
|
@@ -22,9 +22,12 @@ export function renderHeldSecrets(id, held) {
|
|
|
22
22
|
function resources(record) {
|
|
23
23
|
const memory = formatMib(record.mem_mb);
|
|
24
24
|
const disk = formatMib(record.disk_mb);
|
|
25
|
+
const ceiling = record.mem_limit_mb !== undefined && record.mem_mb !== undefined && record.mem_limit_mb > record.mem_mb
|
|
26
|
+
? formatMib(record.mem_limit_mb)
|
|
27
|
+
: undefined;
|
|
25
28
|
return [
|
|
26
29
|
formatCpu(record.milli_cpu),
|
|
27
|
-
memory ? `${memory} memory` : undefined,
|
|
30
|
+
memory ? `${memory} memory${ceiling ? ` (bursts to ${ceiling})` : ''}` : undefined,
|
|
28
31
|
disk ? `${disk} disk` : undefined,
|
|
29
32
|
]
|
|
30
33
|
.filter(Boolean)
|
package/dist/commands/xcode.js
CHANGED
|
@@ -329,6 +329,14 @@ export function registerXcode(program) {
|
|
|
329
329
|
xcode
|
|
330
330
|
.command('build')
|
|
331
331
|
.description('Upload a local source tree, stream xcodebuild logs, and download its artifact')
|
|
332
|
+
.addHelpText('after', `
|
|
333
|
+
Examples:
|
|
334
|
+
Build an iOS app for the simulator:
|
|
335
|
+
$ runcloud xcode build . --scheme App --sdk iphonesimulator
|
|
336
|
+
Build a standalone watchOS app for the watch simulator:
|
|
337
|
+
$ runcloud xcode build . --scheme WatchApp --sdk watchsimulator
|
|
338
|
+
Build an iOS app that embeds a watch app (the watch app is built with it):
|
|
339
|
+
$ runcloud xcode build . --scheme App --sdk iphonesimulator`)
|
|
332
340
|
.argument('[path]', 'local source directory', '.')
|
|
333
341
|
.option('--scheme <name>', 'Xcode scheme')
|
|
334
342
|
.option('--workspace <path>', 'relative .xcworkspace path')
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = '0.2.
|
|
1
|
+
export const CLI_VERSION = '0.2.211';
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -415,6 +415,7 @@ warm-parked and resumable is the most expensive mistake available here.
|
|
|
415
415
|
| `api` `api-force` | destroyed | a caller destroyed it. `api-force` bypassed a wedged guest |
|
|
416
416
|
| `health-sweep` | interrupted | the platform judged it unhealthy |
|
|
417
417
|
| `host-state-reconcile` | paused | the host had already parked it and the control plane caught up. The pause happened earlier than this event says |
|
|
418
|
+
| `host-memory-pressure` | paused | the host ran short of memory and parked the sandbox that held the most above its memory reservation. Only a sandbox with a memory burst ceiling can get this. Nothing is lost, and a resume brings it back |
|
|
418
419
|
| `host-reconcile` `reap-sweep` | destroyed | the platform reclaimed it |
|
|
419
420
|
| `boot-failure` `placement-timeout` `request-timeout` `scheduler` | never ran | capacity or image, not the workload |
|
|
420
421
|
| `orphaned-placement` | never ran | the control plane restarted while placing it (stuck in pending/starting); create it again |
|
package/runcloud-0.2.209.tgz
DELETED
|
Binary file
|