Skip to content

chore(amber): move test-only deps to dev-requirements.txt#5692

Open
Yicong-Huang wants to merge 2 commits into
apache:mainfrom
Yicong-Huang:chore/move-pytest-to-dev-requirements
Open

chore(amber): move test-only deps to dev-requirements.txt#5692
Yicong-Huang wants to merge 2 commits into
apache:mainfrom
Yicong-Huang:chore/move-pytest-to-dev-requirements

Conversation

@Yicong-Huang

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

amber/dev-requirements.txt already documents the contract: "Test- and dev-only Python dependencies. Installed in CI after the LICENSE-binary snapshot is taken, so packages here never appear in pip-licenses output and never need to be tracked in LICENSE-binary / NOTICE-binary. Not installed by packaging."

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.txtdev-requirements.txt
pytest-reraise==2.1.2 requirements.txtdev-requirements.txt
pytest-timeout==2.2.0 requirements.txtdev-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

Diff: 4 files changed, 6 insertions(+), 12 deletions(-).

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?

Closes #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])

pytest, pytest-reraise, pytest-timeout, and iniconfig were pinned in
amber/requirements.txt despite being test-only. Per the header comment
in amber/dev-requirements.txt, test deps belong there so they stay out
of the LICENSE-binary snapshot and the production CU Docker images
(which install requirements.txt + operator-requirements.txt only).

Move pytest, pytest-reraise, pytest-timeout to dev-requirements.txt.
Drop iniconfig entirely — it is pytest's transitive and gets pulled
in automatically.

Remove matching entries from amber/system-requirements-lock.txt (its
header says it tracks requirements + operator-requirements) and from
amber/LICENSE-binary-python.

Closes apache#5691
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file pyamber labels Jun 13, 2026
@codecov-commenter

codecov-commenter commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.79%. Comparing base (a044287) to head (67451db).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #5692   +/-   ##
=========================================
  Coverage     52.79%   52.79%           
  Complexity     2548     2548           
=========================================
  Files          1090     1090           
  Lines         42150    42150           
  Branches       4529     4529           
=========================================
  Hits          22253    22253           
  Misses        18575    18575           
  Partials       1322     1322           
Flag Coverage Δ *Carryforward flag
access-control-service 71.42% <ø> (ø) Carriedforward from a044287
agent-service 34.36% <ø> (ø) Carriedforward from a044287
amber 52.71% <ø> (ø) Carriedforward from a044287
computing-unit-managing-service 1.65% <ø> (ø) Carriedforward from a044287
config-service 56.71% <ø> (ø) Carriedforward from a044287
file-service 57.06% <ø> (ø) Carriedforward from a044287
frontend 47.93% <ø> (ø) Carriedforward from a044287
pyamber 90.72% <ø> (+0.04%) ⬆️
python 90.74% <ø> (ø) Carriedforward from a044287
workflow-compiling-service 58.69% <ø> (ø) Carriedforward from a044287

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

✅ No material benchmark regressions detected

🟢 0 better · 🔴 0 worse · ⚪ 15 noise (<±5%) · 0 without baseline

CI benchmark results are noisy; treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
bs=10 sw=10 sl=64 380 0.232 24,871/35,256/35,256 us ⚪ within ±5% / 🔴 -7.5%
bs=100 sw=10 sl=64 836 0.51 117,272/150,418/150,418 us ⚪ within ±5% / 🔴 +7.7%
bs=1000 sw=10 sl=64 928 0.566 1,077,608/1,124,396/1,124,396 us ⚪ within ±5% / 🔴 -11.2%
Baseline details

Latest main a044287 from 2026-06-13T22:20:02.070Z

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 380 tuples/sec 395.36 tuples/sec 410.7 tuples/sec -3.9% -7.5%
bs=10 sw=10 sl=64 MB/s 0.232 MB/s 0.241 MB/s 0.251 MB/s -3.9% -7.4%
bs=10 sw=10 sl=64 p50 24,871 us 24,519 us 23,798 us +1.4% +4.5%
bs=10 sw=10 sl=64 p95 35,256 us 34,935 us 35,169 us +0.9% +0.2%
bs=10 sw=10 sl=64 p99 35,256 us 34,935 us 35,169 us +0.9% +0.2%
bs=100 sw=10 sl=64 throughput 836 tuples/sec 833.83 tuples/sec 894.84 tuples/sec +0.3% -6.6%
bs=100 sw=10 sl=64 MB/s 0.51 MB/s 0.509 MB/s 0.546 MB/s +0.2% -6.6%
bs=100 sw=10 sl=64 p50 117,272 us 120,315 us 111,887 us -2.5% +4.8%
bs=100 sw=10 sl=64 p95 150,418 us 145,017 us 139,602 us +3.7% +7.7%
bs=100 sw=10 sl=64 p99 150,418 us 145,017 us 139,602 us +3.7% +7.7%
bs=1000 sw=10 sl=64 throughput 928 tuples/sec 953.24 tuples/sec 1,045 tuples/sec -2.6% -11.2%
bs=1000 sw=10 sl=64 MB/s 0.566 MB/s 0.582 MB/s 0.638 MB/s -2.7% -11.2%
bs=1000 sw=10 sl=64 p50 1,077,608 us 1,052,108 us 969,370 us +2.4% +11.2%
bs=1000 sw=10 sl=64 p95 1,124,396 us 1,094,010 us 1,019,271 us +2.8% +10.3%
bs=1000 sw=10 sl=64 p99 1,124,396 us 1,094,010 us 1,019,271 us +2.8% +10.3%
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,526.13,200,128000,380,0.232,24871.29,35255.68,35255.68
1,100,10,64,20,2391.98,2000,1280000,836,0.510,117271.68,150417.58,150417.58
2,1000,10,64,20,21556.66,20000,12800000,928,0.566,1077608.33,1124396.40,1124396.40

pluggy is a pytest transitive (not directly imported anywhere in the
repo); once pytest moves to dev-requirements.txt it is no longer
installed during the LICENSE-binary snapshot, so check_binary_deps.py
flags it as stale. Drop the matching lines.
@Yicong-Huang Yicong-Huang requested a review from kunwp1 June 14, 2026 01:15
@Yicong-Huang

Copy link
Copy Markdown
Contributor Author

cc @SarahAsad23 PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file pyamber

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move test-only Python deps out of amber/requirements.txt

2 participants