gdkbox 0.1.20 → 0.1.21
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.
- checksums.yaml +4 -4
- data/lib/gdkbox/version.rb +1 -1
- data/skills/gdkbox-fleet/SKILL.md +27 -8
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ed8db8e33eb456eab81c33ec420fccbb86294d1569373da95d4eab9aebf1ee79
|
|
4
|
+
data.tar.gz: 23812d9d52938ddbdbd5613f412bdb5e35ed588ec177c5f1ad8acfbfa76fe214
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 588e9c4a5beaa9f7ddcfd0cdfe3c897de80b230646a24b1c580bdb1cf008ec9aa86531d5f5a03d2234bf128918dd821f02dba7b41a79470b172d5607b2abd8c2
|
|
7
|
+
data.tar.gz: d1369eb4dadb712a8e2cacef481c55475e4239f447daad5ef952bdb956d5651ca13ac7fe80a29e8390ac609228514ed3bbcac3cf659f1c050bcc22ce8d679ca5
|
data/lib/gdkbox/version.rb
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gdkbox-fleet
|
|
3
|
+
version: 1.0.0
|
|
3
4
|
description: >-
|
|
4
5
|
Orchestrate a fleet of GDK-in-a-box environments with the `gdkbox` CLI:
|
|
5
6
|
provision a reusable pool of GitLab Development Kit boxes, then dispatch
|
|
@@ -190,8 +191,10 @@ can parse per task.
|
|
|
190
191
|
```
|
|
191
192
|
|
|
192
193
|
When a dispatch returns, that box is idle again — assign it the next task
|
|
193
|
-
from the queue
|
|
194
|
-
|
|
194
|
+
from the queue, or **stop it immediately if nothing is queued for it**
|
|
195
|
+
(`gdkbox stop <box>`; see the "never leave a box running idle" guardrail).
|
|
196
|
+
Never run two dispatches against the same box at once, and never dispatch
|
|
197
|
+
into a box whose `claimed_by` is not your owner id.
|
|
195
198
|
|
|
196
199
|
**Delegating to subagents:** the renewal in `run_task` above is for when
|
|
197
200
|
*you* run the loop. If you hand a task to a subagent instead, do the
|
|
@@ -214,14 +217,20 @@ can parse per task.
|
|
|
214
217
|
and summarize per task: success/failure (exit status), what the agent did,
|
|
215
218
|
and any follow-ups. Surface failures explicitly.
|
|
216
219
|
|
|
217
|
-
6. **
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
6. **Stop idle boxes as you go; release everything at wind-down.** A box with
|
|
221
|
+
no task running right now must not be left running — `gdkbox stop <box>`
|
|
222
|
+
it the moment it goes idle (stopping keeps the claim, license and seeded
|
|
223
|
+
data; `gdkbox start <box>` brings it straight back). Do this throughout the
|
|
224
|
+
batch, not only at the end — especially whenever you pause to wait on the
|
|
225
|
+
user, on a review, or on another box. See the guardrail below.
|
|
226
|
+
|
|
227
|
+
When the **whole batch is done**, stop every box, then release **all** of
|
|
228
|
+
them so the pool is usable by others (a lease would expire eventually, but
|
|
229
|
+
do not rely on it for normal completion), or `gdkbox rm --force` to discard:
|
|
222
230
|
|
|
223
231
|
```sh
|
|
224
232
|
for b in $(gdkbox ls --json | jq -r ".[] | select(.claimed_by==\"$OWNER\") | .name"); do
|
|
233
|
+
gdkbox stop "$b" # no box left running once its work is done
|
|
225
234
|
gdkbox release "$b" --owner "$OWNER"
|
|
226
235
|
done
|
|
227
236
|
```
|
|
@@ -245,7 +254,8 @@ for i in 1 2 3; do
|
|
|
245
254
|
gdkbox dispatch "pool-$i" --task-file "tasks/$i.md" --json > "out/$i.json" 2>&1 &
|
|
246
255
|
done
|
|
247
256
|
wait
|
|
248
|
-
|
|
257
|
+
# batch done: stop each box so none is left running, then release the pool
|
|
258
|
+
for i in 1 2 3; do gdkbox stop "pool-$i"; gdkbox release "pool-$i" --owner "$OWNER"; done
|
|
249
259
|
```
|
|
250
260
|
|
|
251
261
|
Adopt one more existing free box when the queue outgrows the pool (each call
|
|
@@ -303,6 +313,15 @@ rest of the pool accordingly, and give the claim a generous `--ttl`.
|
|
|
303
313
|
heavy. Prefer reusing the pool over creating more boxes.
|
|
304
314
|
- **One dispatch per box at a time.** Serialize tasks on a box; parallelize
|
|
305
315
|
*across* boxes.
|
|
316
|
+
- **Never leave a box running idle.** A box is expensive (a full GDK
|
|
317
|
+
container); it must be running *only* while a dispatch is actually using it.
|
|
318
|
+
The moment a box has no task queued for it — including whenever the
|
|
319
|
+
orchestration pauses to wait on the user, on a review, or on another box —
|
|
320
|
+
`gdkbox stop <box>` it. Stopping frees the host's memory and CPU but **keeps
|
|
321
|
+
the claim, license and seeded data**, so `gdkbox start <box>` resumes it in
|
|
322
|
+
seconds. Keep the claim while the box is yours and only *release* at session
|
|
323
|
+
wind-down; stopping is for idleness, releasing is for "done with it". If you
|
|
324
|
+
stopped boxes mid-session, `gdkbox start` them again before dispatching.
|
|
306
325
|
- **Own every box you touch, for the whole batch.** Provision with
|
|
307
326
|
`up --owner`, adopt with `claim`, and hold the claims until wind-down —
|
|
308
327
|
then release them all. Claims are advisory: `dispatch` will not stop you
|