Skip to content

Commit 2b8b0b0

Browse files
dwhiteddsoftclaude
andcommitted
fix(ci): fix controller packaging bug and wire up gpu-offload pytest CI
Address PR review feedback that the 44 tests added under gpu-offload/{controller,runtime}/tests never run in CI. - gpu-offload/controller/pyproject.toml: drop the unused [build-system] (Hatchling) section and mark the project virtual (tool.uv.package = false). mutate.py is a flat script, never installed as a wheel or built as an editable install anywhere; Hatchling's wheel builder failed with "Unable to determine which files to ship" because there is no gpu_offload_controller/ package directory. Re-locked uv.lock accordingly (source: editable -> virtual). - .github/workflows/pytest-gpu-offload.yml: new reusable workflow, matrixed over controller and runtime, each synced from its own uv.lock in an isolated environment and run with pytest. - pr-validation.yml: path-gate the new job on gpu-offload/{controller,runtime}/ changes and add it to the validation summary. - main.yml: run the new job unconditionally and add it to the release gate. - CONTRIBUTING.md: document the new component suite and its local-run command. Coverage/Codecov integration is intentionally left out of scope; both subprojects currently test without coverage tooling. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 02a932a commit 2b8b0b0

6 files changed

Lines changed: 258 additions & 186 deletions

File tree

.github/workflows/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,13 @@ jobs:
144144
contents: read
145145
id-token: write
146146

147+
# Pytest: gpu-offload controller and runtime components
148+
pytest-gpu-offload:
149+
name: Pytest GPU Offload
150+
uses: ./.github/workflows/pytest-gpu-offload.yml
151+
permissions:
152+
contents: read
153+
147154
# Pytest: shared CI scripts component
148155
pytest-shared-ci:
149156
name: Pytest Shared CI
@@ -307,6 +314,7 @@ jobs:
307314
- pytest-dm-tools
308315
- pytest-data-pipeline
309316
- pytest-inference
317+
- pytest-gpu-offload
310318
- pytest-shared-ci
311319
- dataviewer-frontend-tests
312320
- dataviewer-backend-pytests

.github/workflows/pr-validation.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
dm_tools: ${{ steps.filter.outputs.dm_tools }}
3030
data_pipeline: ${{ steps.filter.outputs.data_pipeline }}
3131
inference: ${{ steps.filter.outputs.inference }}
32+
gpu_offload: ${{ steps.filter.outputs.gpu_offload }}
3233
shared_ci: ${{ steps.filter.outputs.shared_ci }}
3334
dv_backend: ${{ steps.filter.outputs.dv_backend }}
3435
dv_frontend: ${{ steps.filter.outputs.dv_frontend }}
@@ -69,6 +70,7 @@ jobs:
6970
echo "dm_tools=$(match '^data-management/tools/')"
7071
echo "data_pipeline=$(match '^data-pipeline/capture/')"
7172
echo "inference=$(match '^fleet-deployment/inference/')"
73+
echo "gpu_offload=$(match '^gpu-offload/(controller|runtime)/')"
7274
echo "shared_ci=$(match '^shared/ci/')"
7375
echo "dv_backend=$(match '^(data-management/viewer/backend/|data-management/viewer/docker-compose\.yml|shared/ci/smoke-docker\.sh|\.github/workflows/smoke-cpu\.yml)')"
7476
echo "dv_frontend=$(match '^data-management/viewer/frontend/')"
@@ -332,6 +334,15 @@ jobs:
332334
contents: read
333335
id-token: write
334336

337+
# Pytest: gpu-offload controller and runtime components
338+
pytest-gpu-offload:
339+
name: Pytest GPU Offload
340+
needs: changes
341+
if: needs.changes.outputs.gpu_offload == 'true'
342+
uses: ./.github/workflows/pytest-gpu-offload.yml
343+
permissions:
344+
contents: read
345+
335346
# Pytest: shared CI scripts component
336347
pytest-shared-ci:
337348
name: Pytest Shared CI
@@ -515,6 +526,7 @@ jobs:
515526
- pytest-dm-tools
516527
- pytest-data-pipeline
517528
- pytest-inference
529+
- pytest-gpu-offload
518530
- pytest-shared-ci
519531
- dataviewer-backend-pytests
520532
- evaluation-pytests
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: Pytest GPU Offload
3+
4+
'on':
5+
workflow_call:
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
pytest-gpu-offload:
12+
name: Pytest GPU Offload (${{ matrix.name }})
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- name: controller
18+
path: gpu-offload/controller
19+
- name: runtime
20+
path: gpu-offload/runtime
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
27+
with:
28+
persist-credentials: false
29+
30+
- name: Setup Python
31+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
32+
with:
33+
python-version: '3.12'
34+
35+
- name: Setup uv
36+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
37+
38+
- name: Install dependencies
39+
working-directory: ${{ matrix.path }}
40+
run: uv sync --locked --extra test
41+
42+
- name: Run pytest
43+
working-directory: ${{ matrix.path }}
44+
run: uv run pytest -o addopts="" tests -v

CONTRIBUTING.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,10 @@ Reviewers verify regression tests are included. Compliance is tracked over time
371371

372372
### Running Tests
373373

374-
Tests are split into eight pytest component suites that mirror the CI
375-
`pytest-*` flags (`pytest-training`, `pytest-dm-tools`,
376-
`pytest-data-pipeline`, `pytest-inference`, `pytest-shared-ci`,
377-
`pytest-dataviewer`, `pytest-evaluation`, `pytest-fuzz`). Run a single
374+
Tests are split into pytest component suites that mirror the CI `pytest-*`
375+
flags (`pytest-training`, `pytest-dm-tools`, `pytest-data-pipeline`,
376+
`pytest-inference`, `pytest-shared-ci`, `pytest-dataviewer`,
377+
`pytest-evaluation`, `pytest-fuzz`, `pytest-gpu-offload`). Run a single
378378
component locally:
379379

380380
```bash
@@ -399,6 +399,12 @@ cd data-management/viewer/backend && uv run pytest -v
399399
# Evaluation (evaluation/, run from that dir)
400400
cd evaluation && uv run pytest -v
401401

402+
# GPU offload controller (gpu-offload/controller, run from that dir; own uv.lock)
403+
cd gpu-offload/controller && uv sync --extra test && uv run pytest -o addopts="" tests -v
404+
405+
# GPU offload runtime (gpu-offload/runtime, run from that dir; own uv.lock)
406+
cd gpu-offload/runtime && uv sync --extra test && uv run pytest -o addopts="" tests -v
407+
402408
# Fuzz / regression (tests/, run from repo root)
403409
uv run pytest tests/ -v
404410
```
@@ -427,6 +433,9 @@ Substitute the component path and `--cov` target for the pytest component
427433
suite you are validating. Codecov tracks pytest uploads by flag, but only the
428434
named project statuses in `codecov.yml` are top-level project gates;
429435
`pytest-fuzz` is advisory and `terraform` uploads test results only.
436+
`pytest-gpu-offload` runs its two subprojects (`gpu-offload/controller`,
437+
`gpu-offload/runtime`) in their own locked environments and is not yet
438+
wired into Codecov.
430439

431440
### Test Organization
432441

gpu-offload/controller/pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[build-system]
2-
requires = ["hatchling==1.27.0"]
3-
build-backend = "hatchling.build"
4-
51
[project]
62
name = "gpu-offload-controller"
73
version = "0.0.0"
@@ -17,3 +13,6 @@ dependencies = [
1713
test = [
1814
"pytest==9.1.1",
1915
]
16+
17+
[tool.uv]
18+
package = false

0 commit comments

Comments
 (0)