Repository navigation
Description
Description
The session-scoped initialized_workspace fixture in tests/conftest.py times
out during the syncing_deps → completed transition, causing an ERROR at setup that cascades to every test depending on it (TestDevContainerStructure,
etc.).
The init pipeline reaches Syncing dependencies... (emitted by
assets/init-workspace.sh:398), which runs just sync →
uv sync --all-extras --all-groups (assets/workspace/justfile.project:59-60).
The test-project's optional dependencies are heavy scientific packages
(numpy==2.5.0, scipy==1.18.0, pandas==3.0.3, matplotlib==3.11.0,
jupyter==1.1.1/jupyterlab), totalling tens of MB. The image ships no warm
uv cache, so on a cold/slow network the download is still in flight when the
30s timeout for "Workspace initialized successfully" fires
(tests/conftest.py:350).
The captured before buffer shows the failure mid-download:
⠹ Preparing packages... (114/119)
pandas ------ 10.22 MiB/10.41 MiB
matplotlib ------ 10.08 MiB/10.61 MiB
numpy ------ 10.32 MiB/15.88 MiB
jupyterlab ------ 10.09 MiB/16.35 MiB
scipy ------ 10.34 MiB/33.65 MiB
Current stage: syncing_deps
Time in stage: 30.0s (timeout: 30s)
✗ completed: not reached
This is a flaky-by-network failure: it passes when PyPI is fast or the uv cache
is warm, and fails on a cold/slow run. It is infrastructure flakiness, not a
product defect in the init script itself.
Steps to Reproduce
- Cold
uvcache (fresh image / no prior sync), unthrottled-but-realistic network. - Run the testinfra suite, e.g.
just test/pytest tests/against
ghcr.io/vig-os/devcontainer:dev. - The
initialized_workspacefixture setup runs the interactive init. - Observe
ERROR at setup of ...withpexpect.exceptions.TIMEOUTat the
"Workspace initialized successfully"wait.
Expected Behavior
The init fixture completes deterministically regardless of how long
uv sync spends downloading the test-project's heavy extras, and dependent
tests run.
Actual Behavior
The 30s completed timeout fires while uv sync is still downloading
numpy/scipy/pandas/matplotlib/jupyterlab, the session fixture errors, and all
dependent tests are reported as ERROR at setup.
Environment
- OS: Linux
- Container Runtime: Podman 5.8.2 (Nix store path)
- Image Version/Tag:
ghcr.io/vig-os/devcontainer:dev - Architecture: AMD64
- Python: CPython 3.14
Additional Context
- Relevant code:
tests/conftest.py:346-351—stage_patterns_after_copy,completedtimeout = 30stests/conftest.py:442-474— the timeout/pytest.failpathassets/init-workspace.sh:398-402—Syncing dependencies...→just syncassets/workspace/justfile.project:59-60—uv sync --all-extras --all-groupsassets/workspace/pyproject.toml— heavy optional deps
- Because
initialized_workspaceis session-scoped, one slow sync errors the
whole suite, matching the "many tests fail like this" symptom. - Closely related to T2.2 — Make the testinfra suite portable (TEST ADAPTATION) #635 (make the testinfra suite portable / TEST ADAPTATION).
Possible Solution
One or more of:
- Raise / make configurable the
completed(andsyncing_deps) timeout in
tests/conftest.pyto cover a cold-cache download (e.g. env-overridable, with
a generous default like 180–300s). Lowest-effort fix. - Warm the
uvcache in the image build (prefetch the test-project extras
intoUV_CACHE_DIR) souv syncis offline-fast and deterministic — aligns
with the Nix-built-image work. - Trim the test-project's
--all-extrasfor the init smoke path, or sync
--no-install-project/offline, so the structure tests don't pay for the full
scientific stack.
Prefer (1) for an immediate unblock; (2) for the durable fix under the Nix image.
Changelog Category
No changelog needed (test infrastructure).
Activity
fix(setup): unblock testinfra init fixture (dep-sync timeout + NixOS …
c-vigo commentedon Jun 30, 2026
Resolved by #694 (23a3bf2) on the Nix-migration branch (epic #625, PR #670). Closing as part of post-merge backlog hygiene (#677).