overlord: integrate delayed effects into the bunch#16690
overlord: integrate delayed effects into the bunch#16690bboozzoo wants to merge 7 commits intocanonical:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request integrates delayed security backend side effects into snapd's snap installation and update workflows. The feature allows security backend setup operations to delay certain mount namespace side effects until snap operations complete successfully, improving efficiency when multiple snaps are affected by a single change (e.g., when a content provider snap is updated and has multiple connected consumers).
Changes:
- Adds a new
NoDelayedSideEffectsflag to control whether side effects should be delayed or applied immediately - Integrates delayed effects processing into install and update workflows by adding
ProcessDelayedSecurityBackendEffectstasks - Modifies test infrastructure to mock delayed effects processing and updates ~100 tests to accommodate the new task in their expectations
- Adds comprehensive spread test to verify delayed effects behavior with content provider/consumer snaps
Reviewed changes
Copilot reviewed 30 out of 33 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| overlord/snapstate/snapstate.go | Core integration adding setupDelayedSecurityBackendEffects() helper and updating install/update flows to create delayed effects tasks |
| overlord/snapstate/target.go | Updates InstallOne() and InstallWithGoal() to handle delayed effects tasksets, with special logic to merge tasksets for single-snap operations |
| overlord/snapstate/flags.go | Adds NoDelayedSideEffects flag to control behavior |
| overlord/snapstate/handlers.go | Exports ProcessDelayedSecurityBackendEffects hook for interface state integration |
| overlord/ifacestate/ifacestate.go | Implements ProcessDelayedSecurityBackendEffects() to create monitoring tasks |
| overlord/devicestate/*.go | Disables delayed effects for device state operations (firstboot, remodel) where they're not needed |
| overlord/snapstate/*_test.go | Updates ~100 unit tests to expect additional delayed effects tasks in tasksets |
| overlord/managers_test.go | Adds verification helpers and updates integration tests |
| overlord/hookstate/ctlcmd/*.go | Updates service control logic to not create dependencies on freestanding delayed effects tasks |
| tests/main/layout-content-delayed-effects/ | New spread test validating delayed effects with content connections |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #16690 +/- ##
==========================================
- Coverage 77.54% 77.54% -0.01%
==========================================
Files 1359 1359
Lines 187378 187381 +3
Branches 2446 2446
==========================================
- Hits 145301 145296 -5
- Misses 33295 33299 +4
- Partials 8782 8786 +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:
|
7b9dfd7 to
d05da61
Compare
|
Fri Feb 27 15:41:46 UTC 2026 Failures:Preparing:
Executing:
Restoring:
Skipped tests from snapd-testing-skip
|
Integrate delayed backend effects into snapstate. Update relevant tests. Related: SNAPDENG-35950 SNAPDENG-36410 Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
Fix dependencies of injected service commands. Make sure to avoid introducing unresolvable wait cycles with freestanding tasks. Related: SNAPDENG-35950 Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
d05da61 to
a5802b1
Compare
Integrated delayed security backend side effects into the rest of the code. The set of changes appears to be large, but the actual non-test change is ~100 lines or so.
Related: SNAPDENG-35950 SNAPDENG-36410