Skip to content
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

Merged
merged 12 commits into from
Oct 13, 2020

Conversation

bharatmotwani
Copy link
Contributor

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.

Copy link
Contributor

@michael-mclawhorn michael-mclawhorn left a 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.

Copy link
Contributor

@michael-mclawhorn michael-mclawhorn left a 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.

Copy link
Contributor

@michael-mclawhorn michael-mclawhorn left a 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

@sonarcloud
Copy link

sonarcloud bot commented Oct 13, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 2 Code Smells

84.6% 84.6% Coverage
0.0% 0.0% Duplication

warning 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.
Read more here

@michael-mclawhorn michael-mclawhorn merged commit 7c022c7 into master Oct 13, 2020
@bharatmotwani bharatmotwani deleted the rename-aggregation-if-exist-with-same-name branch October 19, 2020 22:20
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