Skip to content

Comments

Integration fixes#515

Open
al1img wants to merge 9 commits intoaosedge:feature_unificationfrom
al1img:integration
Open

Integration fixes#515
al1img wants to merge 9 commits intoaosedge:feature_unificationfrom
al1img:integration

Conversation

@al1img
Copy link
Collaborator

@al1img al1img commented Feb 20, 2026

No description provided.

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>
Copilot AI review requested due to automatic review settings February 20, 2026 13:00
Copy link

Copilot AI left a 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 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 mType field to UpdateItemStatus, UnitInstancesStatuses, and ItemInfo structures to track the type of update items (service, component, layer, etc.)
  • Changed the parameter order of SetUserQuota() to place uid_t uid before size_t quota for 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 type parameter. The documentation should include a comment for the new type parameter between itemID and subjectID.
    /**
     * 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
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

❌ Patch coverage is 90.44118% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.25%. Comparing base (47fb596) to head (6329174).

Files with missing lines Patch % Lines
src/core/cm/unitconfig/unitconfig.cpp 44.44% 5 Missing ⚠️
src/core/cm/updatemanager/desiredstatushandler.cpp 0.00% 4 Missing ⚠️
src/core/cm/imagemanager/imagemanager.cpp 89.47% 2 Missing ⚠️
src/core/cm/updatemanager/unitstatushandler.cpp 85.71% 2 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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>
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant