-
Notifications
You must be signed in to change notification settings - Fork 190
Fixed error causing due to top level network key #467
Conversation
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.
Thanks 👼
I would have fixed it a little differently :
if net, ok := p.NetworkConfigs[network.Name]; ok {
if ret != nil & net.External.External {
// […]
}
}
This above should suffice to fix it, and remove duplication handling the name 😉
project/project.go
Outdated
@@ -288,7 +288,8 @@ func (p *Project) handleNetworkConfig() { | |||
// Consolidate the name of the network | |||
// FIXME(vdemeester) probably shouldn't be there, maybe move that to interface/factory | |||
for _, network := range serviceConfig.Networks.Networks { | |||
if net, ok := p.NetworkConfigs[network.Name]; ok { | |||
net, ok := p.NetworkConfigs[network.Name] | |||
if ok == true && net != nil { |
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.
if ok && net != nil
👼
project/project.go
Outdated
network.RealName = p.Name + "_" + network.Name | ||
|
||
p.NetworkConfigs[network.Name] = &config.NetworkConfig{ | ||
Driver: "bridge", |
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 don't think this is required (the default driver is handled later on)
@vdemeester , it gives panic error for |
Resolves docker#456 Signed-off-by: Suraj Narwade <surajnarwade353@gmail.com>
@vdemeester updated with new changes |
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.
LGTM 🦁
Resolves #456