fix(python): add async SimpleBox metrics#960
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds an async ChangesSimpleBox metrics support
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
📦 BoxLite review — looks good ·
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
sdks/python/tests/test_simplebox.py (1)
1-21: 📐 Maintainability & Code Quality | 🔴 Critical | ⚡ Quick winFix Python formatting failure.
The CI pipeline reports
fmt:check:pythonwould reformat this file. Run the formatter in write mode (e.g.,make fmt:pythonorblack --write) and commit the result before merging.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@sdks/python/tests/test_simplebox.py` around lines 1 - 21, Fix the Python formatting issue in the async SimpleBox integration test by running the project formatter in write mode and committing the resulting changes. The only affected content is the test module containing test_simplebox_metrics and the async with boxlite.SimpleBox block, so reformat that file to match the repository’s Python style without changing test behavior.Source: Pipeline failures
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@sdks/python/tests/test_simplebox.py`:
- Around line 1-21: Fix the Python formatting issue in the async SimpleBox
integration test by running the project formatter in write mode and committing
the resulting changes. The only affected content is the test module containing
test_simplebox_metrics and the async with boxlite.SimpleBox block, so reformat
that file to match the repository’s Python style without changing test behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: c0b78cf6-72a6-4356-8cad-5010ff21f876
📒 Files selected for processing (2)
sdks/python/boxlite/simplebox.pysdks/python/tests/test_simplebox.py
Add metrics() to async SimpleBox so it matches the synchronous convenience API.
Test plan:
Summary by CodeRabbit
metrics()capability toSimpleBoxto retrieve resource usage (CPU/memory) for a box that has been started.SimpleBoxactions.SimpleBox, runs a command, retrievesbox.metrics(), and verifies metrics are returned and include a non-zerocommands_executed_total.