Move some modules from checkbox_support to checkbox_ng (BugFix)#2312
Move some modules from checkbox_support to checkbox_ng (BugFix)#2312
Conversation
In order to include device information in every Checkbox submission
without relying on external jobs being present in the test plan run, a
bunch of parsers and helpers initially available in checkbox_support
need to be migrated to checkbox_ng (since we don't want to import stuff
from checkbox_support in checkbox_ng, but the other way around is OK).
In addition to these, the following code is also migrated because it is
required by the parsers:
- checkbox_support.lib modules
- checkbox_support.monitor_config module
- checkbox_support.helpers release_info and slugify modules
In order not to break any providers (internal or third party), all the
modules in checkbox_support remain, but they point to the code in
checkbox_ng.support.
The meminfo module was modified when it was migrated from checkbox_support to checkbox_ng.support to decouple the parsed data from the information required by the resource job. In this commit, the resource script is adjusted to match the new code in the parser.
Some python classes copied over from checkbox_support do not need to be tested even though their class name starts with "Test".
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (78.36%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #2312 +/- ##
==========================================
+ Coverage 54.92% 56.92% +1.99%
==========================================
Files 412 460 +48
Lines 44304 46616 +2312
Branches 8165 8325 +160
==========================================
+ Hits 24335 26536 +2201
- Misses 19140 19215 +75
- Partials 829 865 +36
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
checkbox-ng is now a dependency of checkbox_support, so it needs to be installed before running the tests.
pyparsing is used by some modules that have migrated from checkbox_support to checkbox_ng. Therefore, dependencies need updating.
Move pyparsing requirements from checkbox-support to checkbox-ng
|
Regarding the failure of the I've tried the following:
So it seems to work? |
|
One way of not having the CI fail would be to land a first PR with only duplicated code in What do you think @Hook25 @fernando79513 ? |
Description
This PR is the first of a series of PR to allow Checkbox to include information about the test run without relying on specific jobs in a test plan.
It does not add anything new, but should not break anything either.
This PR focuses on moving modules from the
checkbox_supportpackage to a new module in thecheckbox_ngpackage (checkbox_ng.support), namely the parsers modules originally incheckbox_support/parsers, along with the following modules that are required by said parsers:The old modules in checkbox_support are not deleted, but instead modified to point to the new ones. This is done to be backward compatible not only with the jobs in our own providers, but also potentially with jobs in third party providers that we might not be aware of.
Resolved issues
https://warthogs.atlassian.net/browse/CHECKBOX-2132
Documentation
Please check each commit description for more information.
Tests
./manage.py test -u)