You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
chore(amber): move test-only deps to dev-requirements.txt (apache#5692)
### What changes were proposed in this PR?
Four test-only pins were sitting in the wrong file
(`amber/requirements.txt`), which leaked them into the production Docker
image and the LICENSE-binary snapshot. This PR moves them.
| Pin | Move |
| --- | --- |
| `pytest==7.4.0` | `requirements.txt` → `dev-requirements.txt` |
| `pytest-reraise==2.1.2` | `requirements.txt` → `dev-requirements.txt`
|
| `pytest-timeout==2.2.0` | `requirements.txt` → `dev-requirements.txt`
|
| `iniconfig==1.1.1` | `requirements.txt` → dropped entirely (pytest
transitive, auto-installed) |
Side effects:
| File | Change |
| --- | --- |
| `amber/system-requirements-lock.txt` | drop the same 4 lines (header:
*"This file must be updated whenever requirements.txt or
operator-requirements.txt changes"*) |
| `amber/LICENSE-binary-python` | drop the same 4 entries from the BSD
2-Clause / MIT blocks |
### Why this is safe
| Consumer | Before | After |
| --- | --- | --- |
| CI `pyamber` / `amber-integration` stacks | install `requirements.txt`
+ `operator-requirements.txt` + `dev-requirements.txt` — get pytest
twice | install all three — get pytest once (from dev-requirements) |
| `bin/computing-unit-master.dockerfile` (prod) | installs
`requirements.txt` + `operator-requirements.txt` — gets pytest, doesn't
need it | installs same two — no longer pulls pytest |
| `bin/computing-unit-worker.dockerfile` (prod) | same as master | same
as master |
| `PveManager.createNewPve` (per-user PVEs) | installs
`requirements.txt` only — gets pytest, doesn't need it | installs same —
no longer pulls pytest |
| `check_binary_deps.py` (LICENSE drift gate) | requires LICENSE-binary
entries because requirements.txt declares them | no longer requires
them; entries removed in lockstep |
The 1 non-test pytest import I found
(`amber/src/main/scala/.../aiassistant/test_type_annotation_visitor.py`)
is a pytest test that's accidentally placed under `src/main` by filename
convention (`test_*`); it's not invoked by the production runtime.
### Any related issues, documentation, discussions?
Closesapache#5691
### How was this PR tested?
- `git diff upstream/main --stat` — confirms only the four files above
are touched, with the expected `+6/-12` shape
- `grep -ciE "^(pytest|iniconfig| - pytest| - iniconfig)"
amber/requirements.txt amber/system-requirements-lock.txt
amber/LICENSE-binary-python` — all three return 0 after the change
- Repo-wide `grep -rIE "^(from|import)[[:space:]]+pytest"` shows 48
usages in `amber/src/test/python` (CI installs dev-requirements.txt, so
they keep working) and the 1 non-runtime file noted above
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.7 [1M context])
---------
Co-authored-by: Yicong Huang <yiconghuang@cs.umass.edu>
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments