-
Notifications
You must be signed in to change notification settings - Fork 2.9k
golangci-lint bump and deprecation cleanups #27473
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
Changes from all commits
a3fcf52
5d46171
3842f4d
f11392c
96aba07
f47f74c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -139,8 +139,6 @@ func CRImportCheckpoint(ctx context.Context, runtime *libpod.Runtime, restoreOpt | |
| opts.StaticMAC = nil | ||
| ctrConfig.Networks[net] = opts | ||
| } | ||
| ctrConfig.StaticIP = nil | ||
| ctrConfig.StaticMAC = nil | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there are old fields, I don't think they have been in use since sqlite so they also should be removed from the struct |
||
| } | ||
|
|
||
| if ctrConfig.PIDNsCtr != "" { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -338,19 +338,9 @@ func namespaceOptions(s *specgen.SpecGenerator, rt *libpod.Runtime, pod *libpod. | |
| } | ||
| // if no network was specified use add the default | ||
| if len(s.Networks) == 0 { | ||
| // backwards config still allow the old cni networks list and convert to new format | ||
| if len(s.CNINetworks) > 0 { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic wise it would be nice to do this and the other cni removal in the same commit instead of splitting the commits per file which doesn't seem to gain us anything here. This seems safe since we drop cni support but if we do this then also directly remove the CNINetworks field from the struct definition. IF we own the code no point in having unused fields. |
||
| logrus.Warn(`specgen "cni_networks" option is deprecated use the "networks" map instead`) | ||
| networks := make(map[string]types.PerNetworkOptions, len(s.CNINetworks)) | ||
| for _, net := range s.CNINetworks { | ||
| networks[net] = types.PerNetworkOptions{} | ||
| } | ||
| s.Networks = networks | ||
| } else { | ||
| // no networks given but bridge is set so use default network | ||
| s.Networks = map[string]types.PerNetworkOptions{ | ||
| rtConfig.Network.DefaultNetwork: {}, | ||
| } | ||
| // no networks given but bridge is set so use default network | ||
| s.Networks = map[string]types.PerNetworkOptions{ | ||
| rtConfig.Network.DefaultNetwork: {}, | ||
| } | ||
| } | ||
| // rename the "default" network to the correct default name | ||
|
|
||
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.
Isn’t this the last user? The function can be removed, then.