Skip to content

Conversation

@Hook25
Copy link
Collaborator

@Hook25 Hook25 commented Nov 17, 2025

Description

Sharing launchers is often useful to get less technical users to use the product correctly and to have a easier pre-baked input for projects. There was up until now a mechanism in checkbox to share these files so the two solutions that were employed were:

  1. Hack in the manage.py to put these files in local/bin + shebang
  2. Snap apps

The first solution doesn't work for snaps and the second solution doesn't work for debs. Both solution can't be used with checkbox remote. Additionally, both will not work with the new custom-frontend interface.

This introduces the concept of Launchers in the whole Checkbox ecosystem, from packaging to units, creating a new location where these provider-specific launchers live (provider/launchers), a standard way to use them (via their FQN, more below!), a standard way to list them (checkbox-cli list launcher) and a cleaner way (in name, mechanism is unchanged) to inherit from other configurations.

Resolved issues

Documentation

WIP

Tests

Unit tests + try the following

# from the checkbox repo
$ mkdir providers/base/launchers
$ cat <<EOF > providers/base/launchers/foo.conf
[test plan]
filter = *smoke*
[environment]
FOO=1
EOF
# now the foo launcher is part of the base provider and you can do the following
$ checkbox-cli list launcher
launcher 'com.canonical.certification::foo'
$ checkbox-cli config check com.canonical.certification::foo
[...] # you should see the filter + the environment variable + no problems hopefully :)
$ checkbox-cli com.canonical.certification::foo
[...] # you should see just the smoke test plan
# now start an agent and use the following
# ALLOW_CHECKBOX_AGENT_NONROOT=1 checkbox-cli run-agent
$ checkbox-cli control 127.0.0.1 com.canonical.certification::foo
[...] # you should see the same
# Now lets try to use this configuration as a part of another configuration
$ cat <<EOF > bar.conf
[config]
import_override = com.canonical.certification::foo
[test plan]
filter = *
[environment]
BAR=1
EOF
$ checkbox-cli config check bar.conf
[...] # here you will see the two got merged, filter of bar has overwritten the filter in c.c.c::foo
$ checkbox-cli control 127.0.0.1 bar.conf
[...] # here no filter will be applied

@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

❌ Patch coverage is 78.37838% with 40 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.45%. Comparing base (c2a2f1f) to head (b2d73aa).
⚠️ Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
checkbox-ng/plainbox/impl/unit/launcher.py 72.09% 11 Missing and 1 partial ⚠️
checkbox-ng/plainbox/impl/config.py 62.50% 9 Missing ⚠️
checkbox-ng/plainbox/impl/secure/providers/v1.py 75.00% 9 Missing ⚠️
...ckbox-ng/plainbox/impl/session/remote_assistant.py 66.66% 4 Missing ⚠️
checkbox-ng/plainbox/impl/highlevel.py 25.00% 3 Missing ⚠️
checkbox-ng/checkbox_ng/launcher/controller.py 50.00% 2 Missing ⚠️
checkbox-ng/checkbox_ng/launcher/subcommands.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2203      +/-   ##
==========================================
+ Coverage   53.34%   53.45%   +0.11%     
==========================================
  Files         399      400       +1     
  Lines       42907    43036     +129     
  Branches     7945     7277     -668     
==========================================
+ Hits        22887    23004     +117     
- Misses      19214    19232      +18     
+ Partials      806      800       -6     
Flag Coverage Δ
checkbox-ng 71.56% <78.37%> (+0.15%) ⬆️
provider-base 29.82% <ø> (ø)
provider-gpgpu 93.14% <ø> (ø)

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.

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