Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avocado Jobs Keys #6076

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

harvey0100
Copy link
Contributor

Fix: Handle missing job data in 'avocado jobs list' command

  • Updated 'handle_list_command' to use job.get() for safely accessing job data.
  • If a key is missing, it now defaults to 'N/A' instead of causing a crash.

Reference: #6067

Copy link

codecov bot commented Dec 2, 2024

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.

Project coverage is 68.63%. Comparing base (b80f298) to head (f0d92c0).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
avocado/plugins/jobs.py 0.00% 12 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #6076       +/-   ##
===========================================
+ Coverage   54.32%   68.63%   +14.31%     
===========================================
  Files         202      202               
  Lines       21892    21903       +11     
===========================================
+ Hits        11892    15033     +3141     
+ Misses      10000     6870     -3130     

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

Copy link
Contributor

@richtja richtja left a comment

Choose a reason for hiding this comment

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

Hi @harvey0100, thank you for investigating this and finding a solution. I have a few small comments, please take a look. Also, I would like to ask you to add tests which will catch the issues from #6067 in the future. Thank you.

avocado/plugins/jobs.py Outdated Show resolved Hide resolved
avocado/plugins/jobs.py Outdated Show resolved Hide resolved
avocado/plugins/jobs.py Outdated Show resolved Hide resolved
Fix: Handle missing job data in 'avocado jobs list' command
- Updated 'handle_list_command' to use `job.get()` for safely accessing job data.
- If a key is missing, it now defaults to 'N/A' instead of causing a crash.

Reference:      avocado-framework#6067
Signed-off-by: Harvey Lynden <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Review Requested
Development

Successfully merging this pull request may close these issues.

2 participants