wrappers/internal: Add implicit graphical user daemons (#16326)#16687
Open
sergio-costas wants to merge 1 commit intocanonical:masterfrom
Open
wrappers/internal: Add implicit graphical user daemons (#16326)#16687sergio-costas wants to merge 1 commit intocanonical:masterfrom
sergio-costas wants to merge 1 commit intocanonical:masterfrom
Conversation
* daemon: Add implicit graphical user daemons This is an implicit implementation of graphical user daemons. Here, if an user-scoped daemon has the Wayland or the X11 plugs defined, it is presumed that it requires access to the desktop graphical environment, so it will depend on graphical-session.target instead of the default target. It implements the implicit way of SD-230. It also fixes all the problems with Gnome 50. This PR is an alternative to canonical#16091 * Add "s" (for seconds) in tests * Added test for desktop daemons * Fix typo * Added execute * Check that the test works * Update tests/lib/snaps/test-user-daemon-in-graphical-environment/task.yaml Co-authored-by: Oliver Calder <oliver@calder.dev> * Update wrappers/internal/service_unit_gen.go Co-authored-by: Marco Trevisan <mail@3v1n0.net> * Added test for dbus daemons * Moved test into tests/main * Requested changes * Test to see if this is being run * Remove error * Update tests/main/test-user-daemon-in-graphical-environment/test-implicit-graphical-user-daemon/meta/snap.yaml Co-authored-by: Oliver Calder <oliver@calder.dev> * Update tests/main/test-user-daemon-in-graphical-environment/test-implicit-graphical-user-daemon/meta/snap.yaml Co-authored-by: Oliver Calder <oliver@calder.dev> * Update tests/main/test-user-daemon-in-graphical-environment/test-implicit-graphical-user-daemon/meta/snap.yaml Co-authored-by: Oliver Calder <oliver@calder.dev> * Update tests/main/test-user-daemon-in-graphical-environment/test-implicit-graphical-user-daemon/meta/snap.yaml Co-authored-by: Oliver Calder <oliver@calder.dev> * Update tests/main/test-user-daemon-in-graphical-environment/task.yaml Co-authored-by: Oliver Calder <oliver@calder.dev> * Update tests/main/test-user-daemon-in-graphical-environment/task.yaml Co-authored-by: Oliver Calder <oliver@calder.dev> * Added systems * Moved the snap * Fix snaps-state * Fix paths in task.yaml * Set daemon experimental flag * Fixed test in dbus services * Update tests/main/test-user-daemon-in-graphical-environment/task.yaml Co-authored-by: Oliver Calder <oliver@calder.dev> * Update tests/main/test-user-daemon-in-graphical-environment/task.yaml Co-authored-by: Oliver Calder <oliver@calder.dev> * Update tests/main/test-user-daemon-in-graphical-environment/task.yaml Co-authored-by: Oliver Calder <oliver@calder.dev> * Extra required changes * Update tests/lib/snaps/test-implicit-graphical-user-daemon/meta/snap.yaml Co-authored-by: Oliver Calder <oliver@calder.dev> * Update tests/main/implicit-graphical-user-daemon/task.yaml Co-authored-by: Oliver Calder <oliver@calder.dev> --------- Co-authored-by: Oliver Calder <oliver@calder.dev> Co-authored-by: Marco Trevisan <mail@3v1n0.net> Always use PartOf instead of BindsTo Added extra tests The new Asserts allow to check that both scoped and unscoped plugs are detected.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #16687 +/- ##
==========================================
+ Coverage 77.52% 77.59% +0.07%
==========================================
Files 1359 1351 -8
Lines 187225 187188 -37
Branches 2446 2446
==========================================
+ Hits 145152 145255 +103
+ Misses 33298 33162 -136
+ Partials 8775 8771 -4
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:
|
|
Fri Feb 27 11:16:37 UTC 2026 Failures:Preparing:
Executing:
Restoring:
Skipped tests from snapd-testing-skip
|
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.
This is the third of three PRs to replace #16601 It requires #16685 and #16686
This is an implicit implementation of graphical user daemons. Here, if an user-scoped daemon has the Wayland or the X11 plugs defined, it is presumed that it requires access to the desktop graphical environment, so it will depend on graphical-session.target instead of the default target.
It implements the implicit way of SD-230.
It also fixes all the problems with Gnome 50.
This PR is an alternative to #16091
Add "s" (for seconds) in tests
Added test for desktop daemons
Fix typo
Added execute
Check that the test works
Update tests/lib/snaps/test-user-daemon-in-graphical-environment/task.yaml
Co-authored-by: Oliver Calder oliver@calder.dev
Co-authored-by: Marco Trevisan mail@3v1n0.net
Added test for dbus daemons
Moved test into tests/main
Requested changes
Test to see if this is being run
Remove error
Update tests/main/test-user-daemon-in-graphical-environment/test-implicit-graphical-user-daemon/meta/snap.yaml
Co-authored-by: Oliver Calder oliver@calder.dev
Co-authored-by: Oliver Calder oliver@calder.dev
Co-authored-by: Oliver Calder oliver@calder.dev
Co-authored-by: Oliver Calder oliver@calder.dev
Co-authored-by: Oliver Calder oliver@calder.dev
Co-authored-by: Oliver Calder oliver@calder.dev
Added systems
Moved the snap
Fix snaps-state
Fix paths in task.yaml
Set daemon experimental flag
Fixed test in dbus services
Update tests/main/test-user-daemon-in-graphical-environment/task.yaml
Co-authored-by: Oliver Calder oliver@calder.dev
Co-authored-by: Oliver Calder oliver@calder.dev
Co-authored-by: Oliver Calder oliver@calder.dev
Extra required changes
Update tests/lib/snaps/test-implicit-graphical-user-daemon/meta/snap.yaml
Co-authored-by: Oliver Calder oliver@calder.dev
Co-authored-by: Oliver Calder oliver@calder.dev
Co-authored-by: Oliver Calder oliver@calder.dev
Co-authored-by: Marco Trevisan mail@3v1n0.net
Always use PartOf instead of BindsTo
Added extra tests
The new Asserts allow to check that both scoped and unscoped plugs are detected.
Thanks for helping us make a better snapd!
Have you signed the license agreement and read the contribution guide?