-
Notifications
You must be signed in to change notification settings - Fork 67
Systemd-unit based runner (new) #2155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Minor: remove pointless imports
Minor: mark systemd based runner as experimental
eb56348 to
03b5dcb
Compare
Codecov Report❌ Patch coverage is 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
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:
|
db96314 to
16d4fb6
Compare
There was a problem hiding this 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 = ( |
There was a problem hiding this comment.
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:
| systemd_unit = ( | |
| as_systemd_unit = ( |
| job_state, | ||
| self._config.environment, | ||
| ui, | ||
| systemd_unit=systemd_unit, |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
| 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)
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:
The result must be unchanged, the runner should be completely transparent to the user.
Snap builds: