You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: prevent putDimensions from storing duplicate dimensions (#104)
* fix: prevent putDimensions from storing duplicate dimensions
Conditions previously checked for any dimension set which did not match
before adding the input dimension set.
This would allow different-sized dimension sets from being mistaken
as non-duplicate and being added (see unit test for example).
New conditions check for any dimension set which does match
before skipping adding the input dimension set to the collection.
[TESTING]
Unit test updated to address edge case;
multiple dimension sets of variable size are added and checked.
* fix: change putDimensions to update/sort existing dimension sets when duplicate
This change ensures new dimension key-values are used for the EMF root node
by removing duplicate dimension sets and adding input dimension set to the
end of the collection.
Example:
```
[
{ "keyA": "value1" },
{ "keyA": "value2" },
]
// expected EMF target member: { "keyA": "value2 }
```
[TESTING]
Updated unit tests to check for this chase wherein putDimensions
may be triggered using various dimension set lengths, values, and order.
Co-authored-by: Aaron Michael Lamb <[email protected]>
Co-authored-by: Mark Kuhn <[email protected]>
0 commit comments