The GitHub Actions job "sandbox-lint" on 
airflow-steward.git/refactor-uv-workspace-dry has failed.
Run started by GitHub user potiuk (triggered by potiuk).

Head commit for run:
dc0130ad9b0c36de6e3c0ccfc00b60468c1cb695 / Jarek Potiuk <[email protected]>
refactor(uv-workspace): DRY pre-commit hooks + CI matrix via single source of 
truth

Adding a new tool used to require editing five surfaces with the
same per-project shape:

- 4 hook blocks in `.pre-commit-config.yaml`
  (ruff-check, ruff-format, mypy, pytest)
- 1 matrix entry in `.github/workflows/tests.yml`
- A standalone `uv.lock` in the tool dir
- A duplicated `[dependency-groups] dev = [ruff, mypy, pytest, ...]`
- Drift between pre-commit and tests.yml (3 tools had pre-commit
  coverage but no matrix entry; 0 tools had matrix entries with no
  pre-commit coverage; the privacy-llm renames made matching by
  name brittle)

This refactors all of it to a single source of truth: the
`[tool.uv.workspace] members` list in the root pyproject.toml.

What changes:

1. **uv workspace.** Root pyproject.toml declares every Python
   project under `tools/` as a workspace member. The shared dev
   toolchain (`ruff`, `mypy`, `pytest`) moves to root
   `[dependency-groups] dev`; member pyproject's `dev` blocks are
   dropped. The 16 per-member `uv.lock` files collapse to one
   root `uv.lock`. Dependency resolution is now workspace-wide,
   which catches drift between tools' pins at sync time.

2. **Driver script.** `tools/dev/run-workspace-check.sh` lists
   workspace members from the root pyproject and runs the
   requested check in each via `uv run --directory`. Each member
   self-declares which checks apply via its own pyproject:

   - `[tool.ruff]` present → ruff and ruff-format run
   - `[tool.mypy]` present → mypy runs
   - `[tool.pytest.ini_options]` present → pytest runs

   Members can opt-out explicitly via
   `[tool.steward.checks] skip = [...]`.

3. **Pre-commit shrinks.** The ~340 lines of per-project hooks
   collapse to four workspace-level hooks calling the driver:
   `workspace-ruff-check`, `workspace-ruff-format`,
   `workspace-mypy`, `workspace-pytest`. Adding a tool requires
   ZERO `.pre-commit-config.yaml` edits.

4. **tests.yml matrix is dynamic.** A new `members` job emits
   the workspace members list as JSON (filtered to members with
   pytest); the `pytest` matrix consumes it via
   `fromJSON(needs.members.outputs.members)`. Adding a tool
   requires ZERO `.github/workflows/tests.yml` edits.

5. **One fix-along.** `tools/skill-evals/runner.py` had a B905
   lint error (`zip()` without `strict=`) that wasn't enforced
   because no pre-commit ruff hook existed. The auto-discovery
   driver picks it up now; added `strict=False`.

6. **Format pass.** ruff format on `tools/skill-evals/` and
   `tools/spec-validator/` — they have `[tool.ruff]` configs but
   weren't enforced by the old hand-rolled pre-commit list.

Net effect: `.pre-commit-config.yaml` 492 → 151 lines.
`tests.yml` gains a discovery job and a `fromJSON` matrix, drops
the 9-entry hand-list. Adding a workspace member is a one-line
edit to the root pyproject.

Coverage delta:

- pytest: was 9 matrix entries; now 16 (every member with a
  `[tool.pytest.ini_options]` section runs in CI matrix). New:
  github-body-field, permission-audit, preflight-audit,
  pr-management-stats, skill-evals, spec-status-index,
  spec-validator.
- ruff: was 11 per-project hooks; now 13 members (every with
  `[tool.ruff]`). New: skill-evals, spec-validator.
- mypy: was 11; now 12. New: spec-status-index.

The branch-protection contract is unchanged — `.asf.yaml` still
requires only the `tests-ok` umbrella check, which `needs:` every
matrix entry regardless of count or name.

Report URL: https://github.com/apache/airflow-steward/actions/runs/26716811204

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to