Skip to content

podman.py: simplified version with abstract methods#6310

Open
abdhaleegit wants to merge 1 commit into
avocado-framework:masterfrom
abdhaleegit:podman-spyre-new
Open

podman.py: simplified version with abstract methods#6310
abdhaleegit wants to merge 1 commit into
avocado-framework:masterfrom
abdhaleegit:podman-spyre-new

Conversation

@abdhaleegit

Copy link
Copy Markdown
Contributor

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

@mr-avocado mr-avocado Bot moved this to Review Requested in Default project Jun 12, 2026
@abdhaleegit

Copy link
Copy Markdown
Contributor Author

test logs:

avocado run spyre_RAG_usecase_test.py  --mux-yaml spyre_RAG_usecase_test.py.data/spyre_RAG_usecase_Granite-3.3-8b-instr-uct.yaml --max-parallel-tasks=1
JOB ID     : eddf230094871850b16f4c9edae705381a4830ce
JOB LOG    : /home/OpTest/avocado-fvt-wrapper/results/job-2026-06-12T08.57-eddf230/job.log
 (1/1) spyre_RAG_usecase_test.py:RAGusecaseTest.test_rag_container;run-c943: STARTED
 (1/1) spyre_RAG_usecase_test.py:RAGusecaseTest.test_rag_container;run-c943: PASS (336.47 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /home/OpTest/avocado-fvt-wrapper/results/job-2026-06-12T08.57-eddf230/results.html
JOB TIME   : 364.98 s

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread avocado/utils/podman.py Outdated
Comment thread avocado/utils/podman.py Outdated
Comment thread avocado/utils/podman.py Outdated
Comment thread avocado/utils/podman.py
Comment thread avocado/utils/podman.py
Comment thread avocado/utils/podman.py Outdated
Comment thread avocado/utils/podman.py Outdated
Comment thread avocado/utils/podman.py Outdated
Comment thread avocado/utils/podman.py Outdated
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 13.66279% with 297 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.70%. Comparing base (844aae0) to head (9ffc6c1).

Files with missing lines Patch % Lines
avocado/utils/podman.py 13.66% 297 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@abdhaleegit abdhaleegit force-pushed the podman-spyre-new branch 2 times, most recently from 75434b6 to 8b81219 Compare June 12, 2026 10:47
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>
@abdhaleegit

Copy link
Copy Markdown
Contributor Author

root user

 avocado run spyre_RAG_usecase_test.py  --mux-yaml spyre_RAG_usecase_test.py.data/spyre_RAG_usecase_Granite-3.3-8b-instr-uct.yaml --max-parallel-tasks=1
JOB ID     : 425c187fa63afcd6be6f6ba7a2a56145b2d4bc56
JOB LOG    : /home/OpTest/avocado-fvt-wrapper/results/job-2026-06-12T10.24-425c187/job.log
 (1/1) spyre_RAG_usecase_test.py:RAGusecaseTest.test_rag_container;run-dee5: STARTED
 (1/1) spyre_RAG_usecase_test.py:RAGusecaseTest.test_rag_container;run-dee5: PASS (339.00 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /home/OpTest/avocado-fvt-wrapper/results/job-2026-06-12T10.24-425c187/results.html
JOB TIME   : 367.64 s

non root user

avocado run spyre_RAG_usecase_test.py  --mux-yaml spyre_RAG_usecase_test.py.data/spyre_RAG_usecase_Granite-3.3-8b-instr-uct.yaml --max-parallel-tasks=1
JOB ID     : ba1267d4bdaba7eeaead53e6676a8fa52cdf090d
JOB LOG    : /home/OpTest/avocado-fvt-wrapper/results/job-2026-06-12T10.30-ba1267d/job.log
 (1/1) spyre_RAG_usecase_test.py:RAGusecaseTest.test_rag_container;run-c943: STARTED
 (1/1) spyre_RAG_usecase_test.py:RAGusecaseTest.test_rag_container;run-c943: PASS (346.54 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /home/OpTest/avocado-fvt-wrapper/results/job-2026-06-12T10.30-ba1267d/results.html
JOB TIME   : 375.40 s

@PraveenPenguin PraveenPenguin self-assigned this Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Review Requested

Development

Successfully merging this pull request may close these issues.

2 participants