Skip to content

CM Database adaptation to launcher::StorageItf refactoring #182

Merged
al1img merged 3 commits intoaosedge:developfrom
mykola-kobets-epam:cm-launcher-0-comp-instances
Mar 25, 2026
Merged

CM Database adaptation to launcher::StorageItf refactoring #182
al1img merged 3 commits intoaosedge:developfrom
mykola-kobets-epam:cm-launcher-0-comp-instances

Conversation

@mykola-kobets-epam
Copy link
Collaborator

No description provided.

launcher::InstanceStateEnum state = launcher::InstanceStateEnum::eCached, bool isUnitSubject = false,
const char* version = "1.0.0", const char* ownerID = "owner1", SubjectTypeEnum subjectType = SubjectTypeEnum::eUser,
size_t priority = 0, std::vector<const char*> labels = {})
size_t priority = 0, std::vector<const char*> labels = {}, bool isSticky = false)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We renamed it to rebalancing disabled

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

eLabels,
ePriority
ePriority,
eIsSticky
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link

@MykolaSuperman MykolaSuperman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-by: Mykola Solianko <mykola_solianko@epam.com>

request.mLabels.Clear();

for (const char* label : labels) {
AOS_ERROR_CHECK_AND_THROW(request.mLabels.EmplaceBack(label), "can't add label");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest using EmplaceBack + Back().Assign
Cause we can properly track if it's no mem in an Array or String capasity issue

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Member

@mlohvynenko mlohvynenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>

@mykola-kobets-epam mykola-kobets-epam force-pushed the cm-launcher-0-comp-instances branch from 7193259 to 1c4e216 Compare March 25, 2026 10:54
@codecov
Copy link

codecov bot commented Mar 25, 2026

Codecov Report

❌ Patch coverage is 98.26087% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@995ff45). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/cm/database/database.cpp 96.77% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #182   +/-   ##
==========================================
  Coverage           ?   82.42%           
==========================================
  Files              ?      325           
  Lines              ?    31130           
  Branches           ?     3214           
==========================================
  Hits               ?    25659           
  Misses             ?     5471           
  Partials           ?        0           

☔ 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.

Copy link
Collaborator

@al1img al1img left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>

launcher::InstanceStateEnum state = launcher::InstanceStateEnum::eCached, bool isUnitSubject = false,
const char* version = "1.0.0", const char* ownerID = "owner1", SubjectTypeEnum subjectType = SubjectTypeEnum::eUser,
size_t priority = 0, std::vector<const char*> labels = {})
size_t priority = 0, std::vector<const char*> labels = {}, bool disableRebalancing = false)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update commit message

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Signed-off-by: Mykola Kobets <mykola_kobets@epam.com>
Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Reviewed-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com>
Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Reviewed-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com>
Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Reviewed-by: Mykola Solianko <mykola_solianko@epam.com>
@mykola-kobets-epam mykola-kobets-epam force-pushed the cm-launcher-0-comp-instances branch from 1c4e216 to 2560644 Compare March 25, 2026 12:22
@mykola-kobets-epam mykola-kobets-epam changed the title [WIP] CM Database adaptation to launcher::StorageItf refactoring CM Database adaptation to launcher::StorageItf refactoring Mar 25, 2026
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
51.9% Coverage on New Code (required ≥ 80%)
6.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@al1img al1img merged commit e8cb676 into aosedge:develop Mar 25, 2026
9 of 10 checks passed
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.

4 participants