-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(routing): Contract based routing integration #6761
base: main
Are you sure you want to change the base?
Conversation
…r-router-integration
} | ||
} | ||
} else { | ||
self.label_info = Some(vec![new_label_info.clone()]); |
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.
is it ok to loose old entries in this vector as you are completely overriding it?
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.
This case would only arise when we don't have any existing entries in the vec
fn get_enabled_features(&mut self) -> &mut DynamicRoutingFeatures { | ||
&mut self.enabled_feature | ||
} |
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.
this method is supposed to be a get call right as per the name, but we are returning mutable reference. should we have separate method for get and set instead of returning mutable reference.
Can be taken in separate PR
if let Some(contract_based_routing) = new.contract_based_routing { | ||
self.contract_based_routing = Some(contract_based_routing) | ||
} |
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.
this update
method currently updates all the fields. its better to have separate update methods for each fields to improve visibility
Again can be taken up in separate PR
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.
This is updating the algorithm right?
…r-router-integration
Type of Change
Description
Additional Changes
Motivation and Context
How did you test it?
Response -
Metrics Population post payment -
Checklist
cargo +nightly fmt --all
cargo clippy