podman.py: simplified version with abstract methods#6310
Conversation
|
test logs: |
There was a problem hiding this comment.
Code Review
This pull request updates avocado/utils/podman.py by adding helper functions for user/group setup, port mapping, log saving, and model validation, while refactoring Podman and AsyncPodman to support executing commands as specific system users and simplifying container execution with a generic run method. The code review highlights several critical issues, including high-severity command injection vulnerabilities from using shell=True with string formatting, functional bugs where the Hugging Face CLI is incorrectly called as hf instead of huggingface-cli, and potential command parsing failures due to unsafe string joining instead of using shlex.join. Additionally, the feedback points out inefficiencies in temporary file usage for log retrieval and the incorrect treatment of .gitattributes as a checksum file.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6310 +/- ##
==========================================
- Coverage 72.05% 71.70% -0.36%
==========================================
Files 206 206
Lines 23349 23478 +129
==========================================
+ Hits 16825 16834 +9
- Misses 6524 6644 +120 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
75434b6 to
8b81219
Compare
This is updated version of podman.py with much of complex parameter management moved out of the utililty, now container creation is simplified as most of the args are handled by user and utility has abstract dict of args:values Also removed redundant utils like multiple container creation this can be handled at test level by calling run in for loop also added support for creating and managing containers via root and non root users Signed-off-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
8b81219 to
9ffc6c1
Compare
|
root user non root user |
This is updated version of podman.py with much of complex parameter management moved out of the utililty, now container creation is simplified as most of the args are handled by user and utility has abstract dict of args:values
Also removed redundant utils like multiple container creation this can be handled at test level by calling run in for loop
also added support for creating and managing containers via root and non root users