Add origin information to Checkbox JSON submission (new)#1644
Merged
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. 🚀 New features to boost your workflow:
|
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.
Hook25
previously approved these changes
Dec 10, 2024
Collaborator
Hook25
left a comment
There was a problem hiding this comment.
LGTM but please answer below, if that is not the case, then we can land as is, else we need to add required fields
Hook25
previously approved these changes
Dec 10, 2024
Hook25
previously approved these changes
Dec 11, 2024
FileNotFoundError is raised when the dpkg command is not available, but otherwise subprocess.check_output will raise CalledProcessError, which is handled in this commit.
Hook25
approved these changes
Dec 11, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A few weeks ago, we added the Checkbox version into the submissions as a
checkbox_versionfield. 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_versionandclient_name) and introduces anoriginobject 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):
{ "title": "session title", "origin": {"name": "Checkbox", "version": "3.3.1.dev333+gbe9508960.d20240701", "packaging": {"type": "source", "version": "3.3.1.dev333+gbe9508960.d20240701"}}, "testplan_id": "com.canonical.certification::acpi-automated", "custom_joblist": false, "results": [ { ... }Resolved issues
https://warthogs.atlassian.net/browse/CHECKBOX-1659
Documentation
Tests