Skip to content

feat: Migration stateless cni #8566

feat: Migration stateless cni

feat: Migration stateless cni #8566

Triggered via pull request January 5, 2024 06:54
Status Failure
Total duration 3m 2s
Artifacts

golangci.yaml

on: pull_request
Matrix: Lint
Fit to window
Zoom out
Zoom in

Annotations

19 errors and 2 warnings
Lint (1.21.x, ubuntu-latest): cns/service/main.go#L1175
cyclomatic complexity 42 of func `InitializeCRDState` is high (> 30) (gocyclo)
Lint (1.21.x, ubuntu-latest): cns/service/main.go#L1238
shadow: declaration of "err" shadows declaration at line 1191 (govet)
Lint (1.21.x, ubuntu-latest): cns/cnireconciler/podinfoprovider.go#L44
importShadow: shadow of imported from 'k8s.io/utils/exec' package 'exec' (gocritic)
Lint (1.21.x, ubuntu-latest): cns/cnireconciler/podinfoprovider.go#L114
rangeValCopy: each iteration copies 136 bytes (consider pointers or indexing) (gocritic)
Lint (1.21.x, ubuntu-latest): cns/cnireconciler/podinfoprovider.go#L115
line is 232 characters (lll)
Lint (1.21.x, ubuntu-latest): cns/cnireconciler/podinfoprovider.go#L111
cniStateToCnsEndpointState - result 1 (error) is always nil (unparam)
Lint (1.21.x, ubuntu-latest): cns/cnireconciler/podinfoprovider.go#L50
ineffectual assignment to err (ineffassign)
Lint (1.21.x, ubuntu-latest)
issues found
Lint (1.21.x, windows-latest): cns/service/main.go#L1175
cyclomatic complexity 42 of func `InitializeCRDState` is high (> 30) (gocyclo)
Lint (1.21.x, windows-latest): cns/service/main.go#L1238
shadow: declaration of "err" shadows declaration at line 1191 (govet)
Lint (1.21.x, windows-latest): network/endpoint_windows.go#L511
rangeValCopy: each iteration copies 392 bytes (consider pointers or indexing) (gocritic)
Lint (1.21.x, windows-latest): network/endpoint_windows.go#L522
err113: do not define dynamic errors, use wrapped static errors instead: "errors.New(\"No HNSEndpointID matches the IPAddress: \" + ipAddresses[0].IP.String())" (goerr113)
Lint (1.21.x, windows-latest): network/endpoint_windows.go#L505
error returned from interface method should be wrapped: sig: func (github.com/Azure/azure-container-networking/network/hnswrapper.HnsV2WrapperInterface).GetNetworkByName(networkName string) (*github.com/Microsoft/hcsshim/hcn.HostComputeNetwork, error) (wrapcheck)
Lint (1.21.x, windows-latest): network/endpoint_windows.go#L509
error returned from interface method should be wrapped: sig: func (github.com/Azure/azure-container-networking/network/hnswrapper.HnsV2WrapperInterface).ListEndpointsOfNetwork(networkId string) ([]github.com/Microsoft/hcsshim/hcn.HostComputeEndpoint, error) (wrapcheck)
Lint (1.21.x, windows-latest): cns/cnireconciler/podinfoprovider.go#L44
importShadow: shadow of imported from 'k8s.io/utils/exec' package 'exec' (gocritic)
Lint (1.21.x, windows-latest): cns/cnireconciler/podinfoprovider.go#L114
rangeValCopy: each iteration copies 136 bytes (consider pointers or indexing) (gocritic)
Lint (1.21.x, ubuntu-latest)
Restore cache failed: Dependencies file is not found in /home/runner/work/azure-container-networking/azure-container-networking. Supported file pattern: go.sum
Lint (1.21.x, windows-latest)
Restore cache failed: Dependencies file is not found in D:\a\azure-container-networking\azure-container-networking. Supported file pattern: go.sum