Skip to content

Add origin information to Checkbox JSON submission (new)#1644

Merged
Hook25 merged 10 commits intomainfrom
1659-submission-origin
Dec 11, 2024
Merged

Add origin information to Checkbox JSON submission (new)#1644
Hook25 merged 10 commits intomainfrom
1659-submission-origin

Conversation

@pieqq
Copy link
Copy Markdown
Collaborator

@pieqq pieqq commented Dec 9, 2024

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 and client_name) and introduces an origin 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):

{
    "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

@pieqq pieqq marked this pull request as draft December 9, 2024 15:37
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.87%. Comparing base (e2b812d) to head (77efcdc).
Report is 96 commits behind head on main.

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              
Flag Coverage Δ
checkbox-ng 69.24% <100.00%> (+0.02%) ⬆️

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.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This version is more up-to-date and allows to use conditions (if..then)
@pieqq pieqq marked this pull request as ready for review December 10, 2024 09:42
Hook25
Hook25 previously approved these changes Dec 10, 2024
Copy link
Copy Markdown
Collaborator

@Hook25 Hook25 left a 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

Hook25
Hook25 previously approved these changes Dec 10, 2024
@pieqq pieqq changed the title Add origina information to Checkbox JSON submission (new) Add origin information to Checkbox JSON submission (new) Dec 11, 2024
Hook25
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 Hook25 merged commit 2504b78 into main Dec 11, 2024
@Hook25 Hook25 deleted the 1659-submission-origin branch December 11, 2024 14:02
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