Conversation
Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Static analysis doesn't require build and could be performed first to fail as soon as any issue detected. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces integration fixes related to adding type information to update items and instances throughout the codebase. The changes primarily involve adding an UpdateItemType field (mType) to key data structures and adjusting API signatures for consistency.
Changes:
- Added
mTypefield toUpdateItemStatus,UnitInstancesStatuses, andItemInfostructures to track the type of update items (service, component, layer, etc.) - Changed the parameter order of
SetUserQuota()to placeuid_t uidbeforesize_t quotafor better API consistency - Enhanced logging to include type information and added filtering to exclude removed items from unit status
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/core/common/types/unitstatus.hpp | Added mType field to UpdateItemStatus and UnitInstancesStatuses; updated equality operators and constructor |
| src/core/common/tools/fs.hpp | Reordered SetUserQuota parameters (uid before quota) |
| src/core/common/tests/mocks/fsmock.hpp | Updated mock to match SetUserQuota signature change |
| src/core/cm/updatemanager/unitstatushandler.hpp | Increased allocator size to accommodate UpdateItemStatusArray |
| src/core/cm/updatemanager/unitstatushandler.cpp | Added mType field usage, filtering of removed items, and enhanced logging |
| src/core/cm/updatemanager/desiredstatushandler.cpp | Added type field to error logging |
| src/core/cm/storagestate/tests/storagestate.cpp | Updated all SetUserQuota mock calls to match new parameter order |
| src/core/cm/storagestate/storagestate.cpp | Updated all SetUserQuota calls to match new parameter order |
| src/core/cm/launcher/launcher.cpp | Added enhanced error logging for failed instance activation |
| src/core/cm/imagemanager/tests/imagemanager.cpp | Added mType field initialization to all test data |
| src/core/cm/imagemanager/itf/storage.hpp | Added mType field to ItemInfo structure |
| src/core/cm/imagemanager/imagemanager.hpp | Added type parameter to NotifyItemStatusChanged method |
| src/core/cm/imagemanager/imagemanager.cpp | Propagated mType field throughout all status creation and notification calls |
| src/core/cm/updatemanager/tests/updatemanager.cpp | Added mType field to all test helper functions and test data |
| .github/workflows/build-test.yaml | Moved static analysis step earlier in the pipeline for fail-fast behavior |
Comments suppressed due to low confidence (2)
src/core/common/types/unitstatus.hpp:136
- The constructor documentation is missing the
typeparameter. The documentation should include a comment for the newtypeparameter betweenitemIDandsubjectID.
/**
* Creates instances statuses.
*
* @param itemID update item ID.
* @param subjectID subject ID.
* @param version update item version.
* @param preinstalled preinstalled flag.
*/
src/core/cm/imagemanager/tests/imagemanager.cpp:939
- The storedItem is missing the mType field initialization. Since ItemInfo now includes mType as a member field (added in storage.hpp), it should be initialized here to match the UpdateItemInfo's type. Add
storedItem.mType = UpdateItemTypeEnum::eService;after line 943.
UpdateItemInfo item;
item.mItemID = "service1";
item.mType = UpdateItemTypeEnum::eService;
item.mVersion = "1.0.0";
item.mIndexDigest = "sha256:1111";
itemsInfo.PushBack(item);
💡 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 #515 +/- ##
=======================================================
+ Coverage 85.23% 85.25% +0.02%
=======================================================
Files 309 309
Lines 27435 27514 +79
Branches 3704 3708 +4
=======================================================
+ Hits 23384 23458 +74
- Misses 4051 4056 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Fix triggering delta unit status OnInstancesStatusesChanged. We should not trigger delta unit status if not connected to cloud OR if status array is empty. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Unit config can contain config for specific node type. We should pass node type to FindNodeConfig function. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
|



No description provided.