Skip to content

Comments

MP: rewrite iamclient#161

Open
MykolaSuperman wants to merge 5 commits intoaosedge:feature_unificationfrom
MykolaSuperman:rewrite_iamclient
Open

MP: rewrite iamclient#161
MykolaSuperman wants to merge 5 commits intoaosedge:feature_unificationfrom
MykolaSuperman:rewrite_iamclient

Conversation

@MykolaSuperman
Copy link

No description provided.

Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

❌ Patch coverage is 88.13559% with 14 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (feature_unification@fc4574f). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/mp/iamclient/iamclient.cpp 81.81% 14 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                   @@
##             feature_unification     #161   +/-   ##
======================================================
  Coverage                       ?   82.36%           
======================================================
  Files                          ?      325           
  Lines                          ?    30703           
  Branches                       ?     3198           
======================================================
  Hits                           ?    25287           
  Misses                         ?     5416           
  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.

@sonarqubecloud
Copy link


add_subdirectory(app)
add_subdirectory(cmclient)
add_subdirectory(communication)
Copy link
Collaborator

Choose a reason for hiding this comment

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

probably better leave removed.

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

@mykola-kobets-epam mykola-kobets-epam 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 Kobets <mykola_kobets@epam.com>


Error IAMClient::Start()
{
LOG_DBG() << "Start IAM client";
Copy link
Collaborator

Choose a reason for hiding this comment

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

lock guard?

Copy link
Author

Choose a reason for hiding this comment

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

Done


Error IAMClient::SendMessages(std::vector<uint8_t> messages)
{
LOG_DBG() << "Sending messages";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Send

Copy link
Author

Choose a reason for hiding this comment

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

Done


RetWithError<std::vector<uint8_t>> IAMClient::ReceiveMessages()
{
LOG_DBG() << "Receiving messages";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Receive

Copy link
Author

Choose a reason for hiding this comment

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

Done

{
std::vector<uint8_t> message(msg.ByteSizeLong());

LOG_DBG() << "Received message: msg=" << msg.DebugString().c_str();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Log::Field

Copy link
Author

Choose a reason for hiding this comment

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

Done

LOG_DBG() << "Received message: msg=" << msg.DebugString().c_str();

if (!msg.SerializeToArray(message.data(), message.size())) {
LOG_ERR() << "Failed to serialize message";
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can return error with message instead of displaying err log

Copy link
Author

Choose a reason for hiding this comment

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

Done

while (mStarted) {
auto [msg, err] = mOutgoingMsgChannel.Receive();
if (!err.IsNone()) {
LOG_ERR() << "Failed to receive message: error=" << err;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Log::Field

Copy link
Author

Choose a reason for hiding this comment

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

Done

LOG_DBG() << "Sending message: msg=" << outgoingMsg.DebugString().c_str();

if (auto sendErr = SendMessage(outgoingMsg); !sendErr.IsNone()) {
LOG_ERR() << "Failed to send message: error=" << sendErr;
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
Author

Choose a reason for hiding this comment

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

Done

Mykola Solianko added 4 commits February 17, 2026 12:38
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
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.

3 participants