Skip to content

Conversation

@Hook25
Copy link
Collaborator

@Hook25 Hook25 commented Oct 10, 2025

Description

This introduces a new experimental systemd-based runner. This new runner adresses in the short term the rfkill permission denied situation but the objective is to make it, in the long run, the default runner for checkbox strict frontends.

For now this new runner is disabled by default and clearly marked as experimental when enabled.

Resolved issues

Fixes: #1211
Fixes: https://warthogs.atlassian.net/browse/CHECKBOX-2003

Documentation

New runner clearly documented in the docstring

Tests

New function is unit tested.

Tested on RPI4 on core24, This can be tested in any environment that has plz-run installed. Currently, only snap packaging is supported.

To test this use the following launcher:

#!/usr/bin/env checkbox-cli
[launcher]
stock_reports = text
[test plan]
unit = com.canonical.certification::smoke
forced=True
[test selection]
forced=True
[features]
systemd_based_job_runner=True

The result must be unchanged, the runner should be completely transparent to the user.

Snap builds:

@codecov
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

❌ Patch coverage is 84.21053% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.88%. Comparing base (79c7c03) to head (16d4fb6).

Files with missing lines Patch % Lines
checkbox-ng/plainbox/impl/execution.py 85.18% 4 Missing ⚠️
checkbox-ng/checkbox_ng/launcher/subcommands.py 83.33% 1 Missing ⚠️
checkbox-ng/plainbox/impl/session/assistant.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2155      +/-   ##
==========================================
+ Coverage   52.81%   52.88%   +0.06%     
==========================================
  Files         395      395              
  Lines       42603    42628      +25     
  Branches     7893     7898       +5     
==========================================
+ Hits        22501    22544      +43     
+ Misses      19301    19283      -18     
  Partials      801      801              
Flag Coverage Δ
checkbox-ng 71.36% <84.21%> (+0.16%) ⬆️

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.

Copy link
Collaborator

@pieqq pieqq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff! I left a few inline suggestions, mainly on naming stuff.

This PR includes plz-run for the snap version, but not for the Debian packages. Do we need to package plz-run in our PPA and pull it when installing Checkbox?

)
)
if not native:
systemd_unit = (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was a bit confused, thinking this was taking a systemd unit name or something, until I realized it was a boolean. Consider using a different name, such as:

Suggested change
systemd_unit = (
as_systemd_unit = (

job_state,
self._config.environment,
ui,
systemd_unit=systemd_unit,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

job, environ, session_id, nest_dir, target_user, extra_env=None
):
"""
Generates a command that if executed runs a Checkbox command section
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This docstring header is exactly the same as the one for get_execution_command_subshell. Maybe

Suggested change
Generates a command that if executed runs a Checkbox command section
Generates a command that if executed runs a Checkbox command section as a systemd unit

or something like that (not sure how to keep it under 79 chars while differentiating it from the other one though)

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.

RTC operation not permitted causes suspend/suspend_advanced_auto failed sometime

2 participants