Skip to content

Commit 6925f65

Browse files
rustyconoverclaude
andcommitted
fix(windows+ci): non-POSIX shlex.split for worker commands; LocalStack env rework
- Client/CatalogClientMixin split self.server_path with POSIX shlex, which eats the backslashes in Windows interpreter paths (WinError 2). Split with posix=False on win32, matching vgi-rpc's CLI. - LocalStack job: use the project env (uv sync --all-extras) overlaid with the local vgi-rpc checkout + boto3, and pass --no-sync to uv run so the overlay survives; the previous hand-built venv was invisible to uv run (boto3 ModuleNotFoundError). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 9e2e0e0 commit 6925f65

3 files changed

Lines changed: 12 additions & 26 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -88,36 +88,20 @@ jobs:
8888

8989
- name: Install test dependencies
9090
run: |
91-
# Pin the venv interpreter — an unpinned `uv venv` picks the newest
92-
# available CPython, which sdist-only deps may not support yet.
93-
uv venv --python 3.13
94-
uv pip install \
95-
click \
96-
pyarrow \
97-
typer \
98-
platformdirs \
99-
numpy \
100-
pytest \
101-
pytest-mypy \
102-
pytest-ruff \
103-
mypy \
104-
ruff \
105-
httpx \
106-
backports.zstd \
107-
zstandard \
108-
boto3 \
109-
waitress \
110-
aiohttp \
111-
tenacity
112-
uv pip install -e './vgi-rpc[http,s3,external]'
91+
# Project env first (vgi + fixtures + dev tools), then overlay the
92+
# local vgi-rpc checkout with the s3/external extras plus boto3.
93+
# Subsequent uv run calls must pass --no-sync or uv re-syncs the
94+
# env to the lockfile and drops the overlay.
95+
uv sync --all-extras --python 3.13
96+
uv pip install './vgi-rpc[http,s3,external]' boto3
11397
11498
- name: Create test bucket in LocalStack
11599
env:
116100
AWS_ACCESS_KEY_ID: test
117101
AWS_SECRET_ACCESS_KEY: test
118102
AWS_DEFAULT_REGION: us-east-1
119103
run: |
120-
uv run python - <<'PY'
104+
uv run --no-sync python - <<'PY'
121105
import time
122106
import boto3
123107
from botocore.exceptions import EndpointConnectionError
@@ -152,4 +136,4 @@ jobs:
152136
VGI_HTTP_S3_BUCKET: rusty-vgi-test
153137
VGI_HTTP_S3_ENDPOINT_URL: http://127.0.0.1:4566
154138
PYTHONPATH: ${{ github.workspace }}
155-
run: uv run pytest tests/test_http_s3_offload_output.py tests/test_http_s3_offload_input.py -q
139+
run: uv run --no-sync pytest tests/test_http_s3_offload_output.py tests/test_http_s3_offload_input.py -q

‎vgi/client/catalog_mixin.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class CatalogEnabledClient(CatalogClientMixin, Client):
3939
from __future__ import annotations
4040

4141
import shlex
42+
import sys
4243
from collections.abc import Iterator, Sequence
4344
from contextlib import contextmanager
4445
from typing import Any, Literal, overload
@@ -135,7 +136,7 @@ def _catalog_connect(self) -> Iterator[VgiProtocol]:
135136
) as proxy:
136137
yield proxy
137138
else:
138-
cmd = shlex.split(self.server_path)
139+
cmd = shlex.split(self.server_path, posix=sys.platform != "win32")
139140
with _catalog_pool.connect(VgiProtocol, cmd) as proxy: # type: ignore[type-abstract]
140141
yield proxy
141142
except RpcError as e:

‎vgi/client/client.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
import logging
7272
import os
7373
import shlex
74+
import sys
7475
import subprocess
7576
import threading
7677
from collections.abc import Callable, Generator, Iterator
@@ -631,7 +632,7 @@ def _spawn_subprocess_connection(self, worker_index: int) -> WorkerConnection:
631632
"""
632633
if self._pool is not None:
633634
_logger.debug("borrowing_worker worker_index=%s", worker_index)
634-
cmd = shlex.split(self.server_path)
635+
cmd = shlex.split(self.server_path, posix=sys.platform != "win32")
635636
ctx = self._pool.connect(
636637
VgiProtocol, # type: ignore[type-abstract]
637638
cmd,

0 commit comments

Comments
 (0)