-
Notifications
You must be signed in to change notification settings - Fork 129
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
Map tgts to interfaces in Replay when loading config #910
Conversation
@ryanatball While this fixed the problem please ensure I'm doing things in the correct order / file as the system starts. |
# Map any targets without interfaces to the dummy replay interface. | ||
# Targets will only have an interface already mapped if the replay_routers | ||
# flag was passed to the server. | ||
def map_targets_to_interfaces |
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 should be named differently to show it is only replay mode. Also, an attempt needs to be made to remap targets to interfaces using Interface#target_names. Only after that fails should the target get mapped to @replay_interface.
Overall really nice clean fix for this though.
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.
@ryanatball I tried to address this but never saw any existing interfaces being mapped. Not sure if this is what you wanted.
if @interfaces | ||
@interfaces.all.each do |name, interface| | ||
interface.target_names.each do |target| | ||
System.targets[target] = interface |
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 overwriting the target with an interface. It should set the target's interface.
Codecov Report
@@ Coverage Diff @@
## master #910 +/- ##
==========================================
+ Coverage 74.29% 74.41% +0.11%
==========================================
Files 244 244
Lines 18954 19218 +264
==========================================
+ Hits 14082 14301 +219
- Misses 4872 4917 +45
Continue to review full report at Codecov.
|
closes #909