-
Notifications
You must be signed in to change notification settings - Fork 5
Image manager #120
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: feature_unification
Are you sure you want to change the base?
Image manager #120
Conversation
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.
Pull request overview
This PR introduces a new image manager component for handling OCI (Open Container Initiative) image layers within the SM (Service Manager) module. The implementation provides functionality for unpacking layer archives, calculating directory digests, and determining unpacked layer sizes.
Key Changes:
- Added ImageHandler class with methods for layer unpacking, size calculation, and digest computation
- Refactored common utilities: renamed
HashDirtoCalculateDirDigestfor better clarity and extractedChangeOwnerinto a reusable utility function - Extended OCI spec support to handle rootfs configuration in image configs
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| src/sm/imagemanager/imagehandler.hpp | Defines ImageHandler interface with Init, UnpackLayer, GetUnpackedLayerSize, and GetUnpackedLayerDigest methods |
| src/sm/imagemanager/imagehandler.cpp | Implements image layer handling including OCI whiteout conversion to overlayfs format |
| src/sm/imagemanager/tests/imagemanager.cpp | Adds test for layer unpacking, size calculation, and digest verification |
| src/sm/imagemanager/tests/CMakeLists.txt | Build configuration for image manager tests |
| src/sm/imagemanager/CMakeLists.txt | Build configuration for image manager module |
| src/sm/app/CMakeLists.txt | Integrates image manager library into SM application |
| src/sm/CMakeLists.txt | Adds image manager subdirectory to SM build |
| src/common/utils/image.hpp | Renames HashDir to CalculateDirDigest and updates ParseDigest signature |
| src/common/utils/image.cpp | Updates digest calculation to include relative file paths and standardizes error message casing |
| src/common/utils/filesystem.hpp | Adds ChangeOwner utility function declaration |
| src/common/utils/filesystem.cpp | Implements ChangeOwner to recursively change file/directory ownership |
| src/common/utils/fsplatform.cpp | Refactors ChangeOwner to use new filesystem utility function |
| src/common/utils/tests/image.cpp | Updates test name from HashDirTest to CalculateDirDigest |
| src/common/ocispec/imageconfig.cpp | Adds rootfs parsing and serialization support for OCI image configs |
| src/common/ocispec/tests/ocispec.cpp | Adds rootfs test data to image config test fixture |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Oleksandr Grytsov <[email protected]>
5c95de7 to
8db8493
Compare
Move ChangeOwner to filesystem in order to use it without FS platform instance. Signed-off-by: Oleksandr Grytsov <[email protected]>
Rename HashDir to CalculateDirDigest and uses Digest type name. Signed-off-by: Oleksandr Grytsov <[email protected]>
8db8493 to
83e8c13
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.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feature_unification #120 +/- ##
======================================================
Coverage ? 82.20%
======================================================
Files ? 266
Lines ? 25209
Branches ? 2620
======================================================
Hits ? 20724
Misses ? 4485
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Implement image handler interface for SM image manger. Most parts are taken from previous image module. Signed-off-by: Oleksandr Grytsov <[email protected]>
83e8c13 to
e2f36a6
Compare
|


No description provided.