Skip to content

Log to error logger all problems (bugfix)#1825

Merged
Hook25 merged 1 commit intomainfrom
log_problems
Mar 27, 2025
Merged

Log to error logger all problems (bugfix)#1825
Hook25 merged 1 commit intomainfrom
log_problems

Conversation

@Hook25
Copy link
Copy Markdown
Collaborator

@Hook25 Hook25 commented Mar 27, 2025

Description

Currently dependency problems found by the dependency solver are returned to the caller of update_desired_job_list. All callers of these function beside the ones in tests ignore this list, and this makes it so if you have a dependency issue in your testplan, you will never know. This PR fixes this issue (partially) by logging an error before returning the list. It is impossible to handle this in a different manner because most of the functions that call this function do not have access to the ui printer nor any facility to easily bubble up this list.

Resolved issues

Fixes: CHECKBOX-1818

Documentation

N/A

Tests

Before this patch: (Silently exits, no way to know what went wrong)

(venv)  checkbox (main) >  checkbox-cli --clear-old-sessions example.conf 
$PROVIDERPATH is defined, so following provider sources are ignored ['/usr/local/share/plainbox-providers-1', '/usr/share/plainbox-providers-1', '/home/h25/.local/share/plainbox-providers-1', '/var/tmp/checkbox-providers-develop'] 
Preparing...
==[ Bootstrap 2021.com.canonical.certification::powermode_ids_resource (1/1) ]==

After this patch: (Complains about the errors, the missing dependency is there in the first line)

(venv)  checkbox (main) >  checkbox-cli --clear-old-sessions example.conf 
$PROVIDERPATH is defined, so following provider sources are ignored ['/usr/local/share/plainbox-providers-1', '/usr/share/plainbox-providers-1', '/home/h25/.local/share/plainbox-providers-1', '/var/tmp/checkbox-providers-develop'] 
Preparing...
==[ Bootstrap 2021.com.canonical.certification::powermode_ids_resource (1/1) ]==
ERROR:plainbox.session.state:Dependency problem: missing dependency: '2021.com.canonical.certification::.' (ordering)
ERROR:plainbox.session.state:Dependency problem: missing dependency: '2021.com.canonical.certification::powermode/set_a' (direct)
ERROR:plainbox.session.state:Dependency problem: missing dependency: '2021.com.canonical.certification::powermode/reboot_a' (direct)
ERROR:plainbox.session.state:Dependency problem: missing dependency: '2021.com.canonical.certification::powermode/read_a' (ordering)
ERROR:plainbox.session.state:Dependency problem: missing dependency: '2021.com.canonical.certification::powermode/set_b' (direct)
ERROR:plainbox.session.state:Dependency problem: missing dependency: '2021.com.canonical.certification::powermode/reboot_b' (direct)
ERROR:plainbox.session.state:Dependency problem: missing dependency: '2021.com.canonical.certification::powermode/read_b' (ordering)
ERROR:plainbox.session.state:Dependency problem: missing dependency: '2021.com.canonical.certification::powermode/set_c' (direct)
ERROR:plainbox.session.state:Dependency problem: missing dependency: '2021.com.canonical.certification::powermode/reboot_c' (direct)

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.97%. Comparing base (eb41688) to head (9361c98).
Report is 106 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1825   +/-   ##
=======================================
  Coverage   49.96%   49.97%           
=======================================
  Files         378      378           
  Lines       40768    40770    +2     
  Branches     6859     6860    +1     
=======================================
+ Hits        20370    20373    +3     
+ Misses      19670    19669    -1     
  Partials      728      728           
Flag Coverage Δ
checkbox-ng 69.89% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

@Hook25 Hook25 merged commit 0d513d6 into main Mar 27, 2025
31 checks passed
@Hook25 Hook25 deleted the log_problems branch March 27, 2025 14:20
stanley31huang pushed a commit that referenced this pull request Mar 28, 2025
LiaoU3 pushed a commit that referenced this pull request Apr 14, 2025
Log to error logger all problems
mreed8855 pushed a commit that referenced this pull request Jul 30, 2025
mreed8855 pushed a commit that referenced this pull request Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants