Repository navigation
Commit 5e38a2e
worker: route serve through run_server so --unix is honoured
vgi-fixture-worker (and the four sibling fixture entry points built on
the base Worker class) now participate in the AF_UNIX launcher contract:
when invoked as `worker --unix PATH --idle-timeout SEC` the worker binds
an AF_UNIX listener at PATH, prints UNIX:<abs_path>\n on stdout, and
self-shuts-down after the requested idle period. Without those flags
the workers default to the existing serve_stdio path, so subprocess
transport is unaffected.
Two integration points:
- MetaWorker.serve in vgi/meta_worker.py now calls
run_server(VgiProtocol, meta) instead of serve_stdio(server) — fixes
vgi-fixture-worker, the meta-catalog fixture used by most
integration tests
- Worker.main in vgi/worker.py adds --unix PATH and --idle-timeout SEC
to its typer command, plus a serve_unix branch with on_bound
discovery-line emit — fixes vgi-fixture-versioned-worker,
vgi-fixture-versioned-tables-worker, vgi-fixture-attach-options-worker,
vgi-fixture-simple-writable-worker
Both changes are back-compat: the default behaviour (stdio subprocess
transport) is unchanged. --http and --unix are mutually exclusive;
explicit error on misuse.
Together with the C++ AF_UNIX launcher in the vgi extension, this lets
ATTACH 'cat' AS x (TYPE vgi, LOCATION 'launch:uv run --project ...
vgi-fixture-worker') spawn one warm Python interpreter and share it
across every DuckDB process pointed at the same worker tuple. The
existing make test_subprocess suite passes through the launcher path as
make test_launcher in ~5x less wall-clock time (per-test profiling
in vgi/docs/launcher-protocol.md).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent c50e58c commit 5e38a2e
3 files changed
Lines changed: 58 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | | - | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
396 | 403 | | |
| 404 | + | |
397 | 405 | | |
398 | 406 | | |
399 | 407 | | |
400 | 408 | | |
401 | 409 | | |
402 | 410 | | |
403 | 411 | | |
404 | | - | |
405 | | - | |
| 412 | + | |
406 | 413 | | |
407 | 414 | | |
408 | 415 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
880 | 880 | | |
881 | 881 | | |
882 | 882 | | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
883 | 897 | | |
884 | 898 | | |
885 | 899 | | |
| |||
890 | 904 | | |
891 | 905 | | |
892 | 906 | | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
893 | 910 | | |
894 | 911 | | |
895 | 912 | | |
| |||
914 | 931 | | |
915 | 932 | | |
916 | 933 | | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
917 | 963 | | |
918 | 964 | | |
919 | 965 | | |
| |||
0 commit comments