Add snap packages to metadata collected in JSON report (new)#2396
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2396 +/- ##
==========================================
+ Coverage 57.76% 58.10% +0.33%
==========================================
Files 467 474 +7
Lines 47299 47739 +440
Branches 8419 8486 +67
==========================================
+ Hits 27321 27737 +416
- Misses 19092 19116 +24
Partials 886 886
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This is required so that scripts that make use of `checkbox_support.snap_utils` can still call it, and are served the modules they expect.
checkbox22 has "python3-requests-unixsocket" as a stage-package in checkbox-support. checkbox24 removed "python3-requests-unixsocket" from checkbox-support stage-packages. When checkbox-ng is built, it needs "requests" library (specified in pyproject.toml). pip tries to upgrade/install requests which depends on urllib3, but urllib3 2.0.7 comes from the Debian package system (not from pip). Without the requests-unixsocket package in stage, pip cannot find the necessary dependencies and tries to uninstall the system-provided urllib3 2.0.7. Adding PIP_IGNORE_INSTALLED should prevent pip from tripping over an already installed system package.
The python3-requests-unixsocket requirement has moved from checkbox-support to checkbox-ng
In Snapcraft documentation about the python plugin[1], it is told that "If the source contains a setup.py or pyproject.toml file, those files are used to install the dependencies specified by the package itself." Because of this, the request_unixsocket2 package is being pulled, and it requires urllib3 2.4 or highed. However, the Debian stage package python3-requests-oauthlib also pulls urllib3, but it's the version from the Debian archives, which is 2.0.7. Because of this, pip tries to uninstall the old version and fails (because it's a Debian install). Replacing the python3-requests-oauthlib stage package with requests-oauthlib python package fixes the build issue. [1]: https://documentation.ubuntu.com/snapcraft/latest/reference/plugins/python_plugin/#how-it-works
71d51cd to
e939572
Compare
Hook25
approved these changes
Mar 19, 2026
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
Add snap packages to metadata collected by
system_information.This required to move the
snap_utilssupport modules fromcheckbox_supporttocheckbox_ng.support, with the usual dance:checkbox_support.snap_utilsthat redirect to the ones incheckbox_ng.support.snap_utilsThe
device_infoscript is updated with a newsnapssubcommand.system_informationCollector added to make use of the newdevice_infosubcommand. The Collector version was bumped to4.Note: the gathered metadata is more complete, since every information about each snap (as returned by the Snapd internals) is kept. In contrast, the previous data only included a subset of the data.
Resolved issues
https://warthogs.atlassian.net/browse/CHECKBOX-2191
Documentation
Tests
Virtual env testing
A sample Checkbox run was done. The associated submission.json includes a new
snapssubsection in thesystem_informationsection that looks like:`system_information` section from the `submission.json` report
Debian package testing
I built the Debian packages in a LXC container, then installed them and ran
checkbox-cliwith theusb-automatedtest plan.The LXC container has the following snaps installed:
It generated the following
submission.jsonreport:submission_debian_packages.zip
Snap testing
Following the latest commits (9fb88b2 and e939572), I built a checkbox24 snap locally and tested it using @Hook25 spread suite on a UC24 VM.
It generated the following submission.json:
submission.json
As you can see, the new
snapssection is included and working.