Repository navigation
refactor(ci): remove no-op clear_zccache_stats() and its caller (#3129 A8) - #3195
Conversation
The function's body was a pass with a docstring citing zccache 1.0.3. The current floor is 1.12.7, which has no global "zero-stats" command — zccache --help shows no such flag. So the docstring is stale AND the function does nothing useful even on the current floor. Per-build zccache metrics are already provided by the session mechanism in ci/meson/runner_helpers.py::_start_zccache_session (which sets ZCCACHE_SESSION_ID), then surfaced by show_zccache_stats() at teardown. That is the correct mechanism for "stats from just this build" today. This change: - Deletes the no-op clear_zccache_stats() from ci/util/zccache_config.py - Removes the call in ci/util/test_runner.py and replaces it with a comment pointing at the session mechanism. Net: 13 deletions, 4 insertions. Part of #3129 (Section A8). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughRemoves the no-op ChangesRemove clear_zccache_stats stub and call site
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
The
clear_zccache_stats()function inci/util/zccache_config.pywas a no-op with a docstring citing zccache 1.0.3:```python
def clear_zccache_stats() -> None:
"""Clear zccache statistics (no-op).
```
The current floor is 1.12.7, which still has no global "zero-stats" command — verified against `zccache --help` (only `--clear` (artifact cache), `status`, `session-start`, `session-end`, `session-stats`).
Why this is the right fix
Per-build metrics ARE accurate today via the session mechanism:
ci/meson/runner_helpers.py::_start_zccache_sessioncallszccache session-start --stats --log <path>and setsZCCACHE_SESSION_IDinos.environshow_zccache_stats()at teardown queriessession-stats $ZCCACHE_SESSION_IDand ends the sessionSo the no-op function and its no-op call site are both dead weight. The right replacement is a comment pointing at the actual mechanism.
What changes
ci/util/zccache_config.pyclear_zccache_stats()(no-op)ci/util/test_runner.py2 files changed, 4 insertions(+), 13 deletions(-) — net 9-line code reduction.
Part of #3129 (Section A8).
🤖 Generated with Claude Code
Summary by CodeRabbit