-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add logic to rename aggregation to avoid name collision #1095
Add logic to rename aggregation to avoid name collision #1095
Conversation
...-core/src/main/java/com/yahoo/bard/webservice/data/config/metric/makers/ArithmeticMaker.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make sure to add a test where we hit the double rename problem. You can probably feed the same metric multiple times through the transformer manually.
...c/main/java/com/yahoo/bard/webservice/data/config/metric/makers/BaseProtocolMetricMaker.java
Show resolved
Hide resolved
...c/main/java/com/yahoo/bard/webservice/data/config/metric/makers/BaseProtocolMetricMaker.java
Outdated
Show resolved
Hide resolved
...c/main/java/com/yahoo/bard/webservice/data/config/metric/makers/BaseProtocolMetricMaker.java
Show resolved
Hide resolved
...c/main/java/com/yahoo/bard/webservice/data/config/metric/makers/AggregationAverageMaker.java
Outdated
Show resolved
Hide resolved
...c/main/java/com/yahoo/bard/webservice/data/config/metric/makers/BaseProtocolMetricMaker.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
I apologize for asking for a bigger change on a followup review.
Per the discussion I just shared, I'd prefer to move the responsibility for the generated-metric-info collision resolution up to ProtocolMetricImpl.apply rather than having it in the MetricMaker code.
My proposal is to lift up 'renameIfConflicting' and the rename to ProcolMetricImpl, rename based not on every agg and post agg but instead on the metric name, and use the protocol name as the prefix for the renaming.
...c/main/java/com/yahoo/bard/webservice/data/config/metric/makers/BaseProtocolMetricMaker.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add default implementation to base protocol maker
change changelog to reflect
unit test the rename behavior
Kudos, SonarCloud Quality Gate passed! 0 Bugs 84.6% Coverage The version of Java (1.8.0_141) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. |
I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.