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

Don't call cmp in non-testing file #5359

Closed
wants to merge 2 commits into from
Closed

Conversation

zasweq
Copy link
Contributor

@zasweq zasweq commented May 16, 2022

Fixes issue #5353.

The config's Equal method is called by CDS to check the equality of discovery mechanisms. However, due to the fact that the Child Policy will not be prepared by the CDS Balancer, but will be prepared by the Cluster Resolver balancer, getting rid of the check is a logical no-op.

The config's Equal method is also called by the cmp package for testing purposes. However, to not have it call cmp.Equal to compare the child policy, I will switch my PR out (#5304) to manually compare the child policies in tests.

RELEASE NOTES: None

return false
}
return cmp.Equal(lbc.ChildPolicy, lbc2.ChildPolicy)
return lbc.FailurePercentageEjection.Equal(lbc2.FailurePercentageEjection)
Copy link
Contributor

Choose a reason for hiding this comment

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

You shouldn't just ignore the child policy field.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the problem is, you shouldn't use *outlierdetection.LBConfig as the field in DiscoveryMechanism. It should be a config message without the child policy, because the child policy is specified by another field. Then you won't need an Equal method for this LBConfig type

This is I believe a missing piece in the outlier detection gRFC.
It needs to also specify what the new ClusterResolver balancer's config should look like.

@menghanl
Copy link
Contributor

Replaced by #5370

@menghanl menghanl closed this May 20, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants