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

Report invalid units generated during test session (bugfix) #1560

Merged
merged 24 commits into from
Dec 11, 2024

Conversation

Hook25
Copy link
Collaborator

@Hook25 Hook25 commented Oct 23, 2024

Description

Currently if a template generates a unit that is invalid, a message is logged (error for some, debug for some others) and the unit is skipped. This message is visible using Checkbox local but it burried in the Agent log in remote. This is of course sub-optimal as we have no recollection of anything happening after the fact but this can lead to tests being... not executed, without an explanation or even a way for the user to notice.

This PR introduces a new unit, the InvalidJob unit, that allows us to report the invalidly generated units as failures, so that they are present all reports and on C3. This change is made along the new feature section, that allows us to toggle features like this on or off (to allow people to transition into big changes instead of having to update forcibly). The changes are both in this PR because the feature change is about 4 lines, and it makes sense to create and use it (else, I don't see how I could test it)

Resolved issues

Fixes: CHECKBOX-1677
Fixes: CHECKBOX-1676

Documentation

Pending implementation approval, I think this should be mentioned in both the extended tutorial and the normal tutorial

Tests

This implements a new metabox scenario and unit tests

@Hook25 Hook25 marked this pull request as draft October 24, 2024 16:06
@Hook25 Hook25 force-pushed the close_session_invalid branch from c7c4aae to 9e11b88 Compare December 3, 2024 14:40
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

Attention: Patch coverage is 97.61905% with 3 lines in your changes missing coverage. Please review.

Project coverage is 48.90%. Comparing base (d0c208e) to head (0c04dae).
Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
checkbox-ng/plainbox/impl/unit/job.py 96.22% 2 Missing ⚠️
checkbox-ng/plainbox/impl/execution.py 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1560      +/-   ##
==========================================
+ Coverage   48.80%   48.90%   +0.09%     
==========================================
  Files         369      369              
  Lines       40192    40258      +66     
  Branches     6783     6799      +16     
==========================================
+ Hits        19616    19687      +71     
+ Misses      19857    19852       -5     
  Partials      719      719              
Flag Coverage Δ
checkbox-ng 69.38% <97.61%> (+0.17%) ⬆️

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.

@Hook25 Hook25 marked this pull request as ready for review December 10, 2024 10:41
Copy link
Collaborator

@pieqq pieqq left a comment

Choose a reason for hiding this comment

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

Great stuff!

A few typos and other small comments, but otherwise good to land I think!

checkbox-ng/plainbox/impl/config.py Outdated Show resolved Hide resolved
checkbox-ng/plainbox/impl/config.py Outdated Show resolved Hide resolved
checkbox-ng/plainbox/impl/unit/test_unit.py Outdated Show resolved Hide resolved
Hook25 and others added 2 commits December 11, 2024 15:44
Co-authored-by: Pierre Equoy <[email protected]>
Copy link
Collaborator

@pieqq pieqq left a comment

Choose a reason for hiding this comment

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

Much clearer, thanks!

@pieqq pieqq merged commit 610b1ff into main Dec 11, 2024
52 checks passed
@pieqq pieqq deleted the close_session_invalid branch December 11, 2024 15:45
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