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

Remove unused metrics.ServiceIdx #4454

Merged
merged 2 commits into from
Jun 9, 2023
Merged

Remove unused metrics.ServiceIdx #4454

merged 2 commits into from
Jun 9, 2023

Conversation

MichaelSnowden
Copy link
Contributor

What changed?
This change removes the metrics.ServiceIdx type and related functions. It also substitutes usages of it for primitives.ServiceName, which were substituted eventually anyway.

Why?
This type is only used to immediately translate to a primitives.ServiceName. It isn't stored on the wire anywhere. It's just confusing to keep around.

How did you test it?
The only parameter or variable with this type is the serviceMetricsIndex parameter in NewTest, and all it does is immediately translate that value to a primitives.ServiceName type, so the only behavioral change is to short-circuit that logic.

In addition, this was only used in test code any way.

Potential risks

Is hotfix candidate?

@MichaelSnowden MichaelSnowden requested a review from a team as a code owner June 7, 2023 21:33
Copy link
Member

@dnr dnr left a comment

Choose a reason for hiding this comment

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

remove the type also?

@MichaelSnowden
Copy link
Contributor Author

remove the type also?

Oops, done

@MichaelSnowden MichaelSnowden enabled auto-merge (squash) June 9, 2023 04:15
@MichaelSnowden MichaelSnowden merged commit d8f70e1 into master Jun 9, 2023
7 checks passed
@MichaelSnowden MichaelSnowden deleted the snowden/dead-code branch June 9, 2023 05:12
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.

None yet

2 participants