Skip to content

Conversation

@iblancasa
Copy link
Contributor

@iblancasa iblancasa commented Oct 28, 2025

Continuation #13106

  • Added Profiles.MergeTo implementation that merges one profile message into another while reconciling their dictionaries and appending
    resource profiles.
    • Added comprehensive unit tests covering both the successful merge path and error propagation when dictionary switching fails.

@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.20%. Comparing base (d7cc444) to head (06635a2).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14091      +/-   ##
==========================================
+ Coverage   92.14%   92.20%   +0.06%     
==========================================
  Files         666      667       +1     
  Lines       41438    41451      +13     
==========================================
+ Hits        38181    38218      +37     
+ Misses       2217     2205      -12     
+ Partials     1040     1028      -12     

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

@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added Stale and removed Stale labels Nov 12, 2025
@dmathieu
Copy link
Member

This can be rebased against the main branch.

@iblancasa iblancasa changed the title Introduce merge to methods for profiles Introduce MergeTo method for profiles Nov 20, 2025
@iblancasa iblancasa marked this pull request as ready for review November 20, 2025 15:59
@iblancasa iblancasa requested review from a team, dmathieu and mx-psi as code owners November 20, 2025 15:59
tmp := NewProfiles()
ms.CopyTo(tmp)

tmpDstDict := NewProfilesDictionary()
Copy link
Member

Choose a reason for hiding this comment

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

Why the need to create a new dictionary? That adds an allocation we likely don't need.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't remember why I implemented on this way (long time ago). But you are totally right.
Thanks!

Samples().AppendEmpty()
sample.SetLinkIndex(1)

require.NoError(t, src.MergeTo(dest))
Copy link
Member

Choose a reason for hiding this comment

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

This test re-tests a lot of the switchDictionary code. Couldn't we simplify that?

Signed-off-by: Israel Blancas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants