-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add info to rejected jobs list in submission.json
(new)
#1520
Conversation
The list of rejected jobs (jobs that have been de-selected prior to running a test plan) is modified, so that instead of storing a list of job ids, it stores a list of job representations (dictionaries holding not only the job id but also additional info such as its plugin, template_id, etc.)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1520 +/- ##
==========================================
+ Coverage 47.56% 47.59% +0.02%
==========================================
Files 369 369
Lines 39596 39596
Branches 6691 6691
==========================================
+ Hits 18833 18844 +11
+ Misses 20051 20040 -11
Partials 712 712
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Add the new fields for the rejected-jobs section in the submission schema. In addition, `Plugin` can take 2 additional values, as explained in the documentation[1], since there are attachment and resource jobs. [1]: https://canonical-checkbox.readthedocs-hosted.com/en/stable/reference/units/job.html
Just verified that C3 doesn't parse this list to any more details. I think this will be a useful addition to help us validate the testing coverage that wont break C3 compatibility. |
Turning this into draft again as I think there is a way to export effective category and effective certification status, which could be helpful. |
Turns out there is no need for a job representation for rejected jobs: since all the jobs are computed at runtime and made available in the session's job state map, it is possible to retrieve all the computed information, including effective cert status and category from just a job id.
…ts array The `rejected-jobs` array is constructed very similarly to how the `results` array is built, in order to keep as much information as possible.
Add certification_status, and the fact that template_id can be null.
Add `template_id` field and make it clear it can accept null values.
This PR is ready for review. |
The changes look good to me! Are we now also adding the |
The problem is we have a weird mapping between Checkbox and C3. In Checkbox,, a job can have the following
I think in C3, this is emulated by the Similarly, in C3, the status of a TestResult is narrowed down to But yes, we could start saving this info in C3 as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See if it makes sense, else you can land it as is
checkbox-ng/plainbox/impl/providers/exporters/data/checkbox.json
Outdated
Show resolved
Hide resolved
- Remove dictsort - Iterate on rejected_jobs list only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its true, I dont know why the others don't use this way of iteration (list -> dict but dict -> list). It is way more efficient and we should consider fixing them all
Description
Developments in Checkbox and C3 require more information being shared between the two.
C3 uses the
submission.json
file generated by Checkbox when creating the submission archive. This JSON file contains arejected-jobs
section that, until now, only contained thefull_id
of the jobs being de-selected.With this PR, the exported submission.json includes more information in the
rejected-jobs
array, similarly to whatresults
contain. This includes partial id and full id, plugin (which allows us to know what kind of job this is, including attachment, resource, etc.), and effective category and certification status (blocker or non-blocker).Resolved issues
https://warthogs.atlassian.net/browse/CHECKBOX-1597
Documentation
Tests
Ran the following test with the version in
main
and the version in this branch:checkbox-cli
D
)Compare the number of rejected jobs in both cases to make sure we have the same outcome:
Here is a sample submission JSON file from a run on my laptop: submission_after_effective.json
Note that, exactly like jobs that have been run (present in
results
section), the jobs inrejected-jobs
include the effective certification_status and category. For instance, thecamera/detect
job is marked as a cert-blocker:The rejected-jobs also include attachment and resource jobs: