-
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 origin information to Checkbox JSON submission (new) #1644
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1644 +/- ##
==========================================
+ Coverage 48.85% 48.87% +0.01%
==========================================
Files 370 370
Lines 40234 40248 +14
Branches 6794 6796 +2
==========================================
+ Hits 19657 19671 +14
Misses 19857 19857
Partials 720 720
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This version is more up-to-date and allows to use conditions (if..then)
By setting the origin at init, it is more readable and easier to write unit tests.
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.
LGTM but please answer below, if that is not the case, then we can land as is, else we need to add required fields
FileNotFoundError is raised when the dpkg command is not available, but otherwise subprocess.check_output will raise CalledProcessError, which is handled in this commit.
Description
A few weeks ago, we added the Checkbox version into the submissions as a
checkbox_version
field. This submission file is consumed by C3, our Certification database. Up to recently, only Checkbox could submit data to C3, but more tools are on their way to be able to do the same. As a result, we are working on homogenizing the submission fields.This PR removes the Checkbox-specific things (
checkbox_version
andclient_name
) and introduces anorigin
object that, in addition to version number, also contains information about the packaging type. It will then be possible to know if a submission was generated using the Snap or the Debian version of Checkbox, or if it was created using a development version (running in a Python virtual environment).A submission created using the patch in this PR will look like this now (in this example, the information is coming from a run in a virtual environment):
Resolved issues
https://warthogs.atlassian.net/browse/CHECKBOX-1659
Documentation
Tests