boot/makebootable.go: do not take install observers as parameters#17035
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #17035 +/- ##
==========================================
+ Coverage 79.10% 79.15% +0.05%
==========================================
Files 1384 1378 -6
Lines 192855 192885 +30
Branches 2466 2466
==========================================
+ Hits 152549 152679 +130
+ Misses 31138 31032 -106
- Partials 9168 9174 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Tue Jun 9 10:52:12 UTC 2026 Failures:Preparing:
Executing:
Skipped tests from snapd-testing-skipIf you wish to have any of the below tests run in your PR, in your PR description, add 'unskip:' followed by a copy-and-pasted list (without variants) of the below tests you wish to run (unskip plus test list must be valid yaml)
|
f86e959 to
c566b29
Compare
pedronis
left a comment
There was a problem hiding this comment.
some initial comments about the new arguments
| return o.trackedRecoveryAssets | ||
| } | ||
|
|
||
| func NewEncryptionParams( |
There was a problem hiding this comment.
this needs a doc comment and to be closer to the struct definition
|
|
||
| // TrustedAssets represents the assets trusted that may be accepted in | ||
| // boot chains. | ||
| type TrustedAssets struct { |
There was a problem hiding this comment.
can we make this carry Update the method for the boot entry?
There was a problem hiding this comment.
maybe this should be BootAssets?
Also
for name := range o.trackedRecoveryAssets {
maybe we need a different bootloader abstraction
There was a problem hiding this comment.
I have added a FIXME.
| // It contains reference to the encrypted containers where | ||
| // to registers keys, and alls the information (other than the | ||
| // boot chains) to calculate PCR profiles. | ||
| type EncryptionParameters struct { |
There was a problem hiding this comment.
maybe this should be EncryptionSetup ?
pedronis
left a comment
There was a problem hiding this comment.
thanks for the changes, minor re-review comments
| GetBootAssets() BootAssets | ||
| // GetEncryptionParams extracts the encryption parmeters | ||
| GetEncryptionParams() *EncryptionSetup |
There was a problem hiding this comment.
can we avoid the Get in these names or are there clashes? also Params/vs Setup in the latter
| GetEncryptionParams() *EncryptionSetup | ||
| } | ||
|
|
||
| // EncryptionSetup represents the parameters for encryption. |
There was a problem hiding this comment.
this probably needs a bit of rephrasing now that the name has change.
Maybe: contains the information about the ongoing disk encryption setup.
| checkResult *secboot.PreinstallCheckResult | ||
| } | ||
|
|
||
| // BootAssets represents the assets trusted that may be accepted in |
ZeyadYasser
left a comment
There was a problem hiding this comment.
Looks good, small comments
| Observe(op gadget.ContentOperation, partRole, root, relativeTarget string, data *gadget.ContentChange) (gadget.ContentChangeAction, error) | ||
|
|
||
| // BootAssets exposes the trusted assets as well | ||
| // as aw to update the boot entry. |
| // BootAssets exposes the trusted assets as well | ||
| // as aw to update the boot entry. | ||
| BootAssets() BootAssets | ||
| // EncryptionSetup extracts the encryption parmeters |
There was a problem hiding this comment.
| // EncryptionSetup extracts the encryption parmeters | |
| // EncryptionSetup extracts the encryption parmeters. |
| // BootAssets carries the assets trusted that may be accepted in | ||
| // boot chains and the method to update the boot entry. | ||
| type BootAssets interface { | ||
| // TrackedRecoveryAssets returns the boot assets for the run boot chains |
There was a problem hiding this comment.
| // TrackedRecoveryAssets returns the boot assets for the run boot chains | |
| // TrackedAssets returns the boot assets for the run boot chains. |
| type BootAssets interface { | ||
| // TrackedRecoveryAssets returns the boot assets for the run boot chains | ||
| TrackedAssets() bootAssetsMap | ||
| // TrackedRecoveryAssets returns the boot assets for the recovery boot chains |
There was a problem hiding this comment.
| // TrackedRecoveryAssets returns the boot assets for the recovery boot chains | |
| // TrackedRecoveryAssets returns the boot assets for the recovery boot chains. |
| TrackedAssets() bootAssetsMap | ||
| // TrackedRecoveryAssets returns the boot assets for the recovery boot chains | ||
| TrackedRecoveryAssets() bootAssetsMap | ||
| // UpdateBootEntry update the boot entry to boot the current asset chains |
There was a problem hiding this comment.
| // UpdateBootEntry update the boot entry to boot the current asset chains | |
| // UpdateBootEntry update the boot entry to boot the current asset chains. |
| checkResult *secboot.PreinstallCheckResult | ||
| } | ||
|
|
||
| // BootAssets carries the assets trusted that may be accepted in |
There was a problem hiding this comment.
| // BootAssets carries the assets trusted that may be accepted in | |
| // BootAssets carries the trusted assets that may be accepted in |
pedronis
left a comment
There was a problem hiding this comment.
thanks, some doc comment comments
| // BootAssets exposes the trusted assets and the method | ||
| // to update the boot entry. | ||
| BootAssets() BootAssets | ||
| // EncryptionSetup extracts the encryption parmeters. |
There was a problem hiding this comment.
Encryption setup returns the in-progress setup for disk encryption.
| EncryptionSetup() *EncryptionSetup | ||
| } | ||
|
|
||
| // EncryptionSetup contains the setup for encryption. |
There was a problem hiding this comment.
... for in-progress disk encryption.
| checkResult *secboot.PreinstallCheckResult | ||
| } | ||
|
|
||
| // BootAssets carries the trusted assets that may be accepted in |
There was a problem hiding this comment.
sorry, thinking further. s/carries/identifies/
Install observers are not good abstraction for MakeSystemBootable when used for reprovisioning. So instead we make 2 separate abstractions: * The boot assets, that can be used to calculate the boot chains and update the boot entry. * The encryption parameters
8e8e69d to
2bcbd35
Compare
Install observers are not good abstraction for MakeSystemBootable when used for reprovisioning. So instead we make 2 separate abstractions:
* The boot assets, that can be used to calculate the boot chains and update the boot entry.
* The encryption parameters