-
Notifications
You must be signed in to change notification settings - Fork 20
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
Added support to properly specify anti-affinity policies #73
Conversation
pkg/builder/group/policy_builder.go
Outdated
@@ -136,6 +137,11 @@ func (doNoPlace *DoNotPlaceTogetherPolicyBuilder) WithBuyers(buyers *BuyerPolicy | |||
return doNoPlace | |||
} | |||
|
|||
func (doNoPlace *DoNotPlaceTogetherPolicyBuilder) OnSellerType(sellerType proto.EntityDTO_EntityType) *DoNotPlaceTogetherPolicyBuilder { |
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.
nitpick, consider changing the method name to OnProvider(...).
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.
I have considered, but thought just "Provider" it doesn't reflect the fact that the expected argument is the "type" instead of the "provider" itself. So I think it's more appropriate to keep the word "Type" there.
Also, I chose "Seller" over "Provider" because the entire policy_builder uses "Seller" a lot. I thought it will be more consistent to use "Seller" throughout.
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.
Chatted with @pallavidn. We're good keeping "OnSellerType". While it's more preferred to switch to Provider/Consumer on user-facing API methods vs. Buyer/Seller which are rather internal, it will be a change throughout the policy/constraint builders. We will leave it as another task in the future.
Added support to properly specify anti-affinity policies
Currently I'm setting constraint id, name and display name all the same.