Bug 1937452 - cluster-network-operator CI linting fails in master branch
Summary: cluster-network-operator CI linting fails in master branch
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.8
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.8.0
Assignee: Ben Bennett
QA Contact: zhaozhanqi
Depends On:
TreeView+ depends on / blocked
Reported: 2021-03-10 16:54 UTC by Daniel Mellado
Modified: 2021-07-27 22:53 UTC (History)
0 users

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Last Closed: 2021-07-27 22:52:37 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift cluster-network-operator pull 1013 0 None open Bug 1937452: Fix golangci-lint violations 2021-03-10 16:58:01 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 22:53:05 UTC

Description Daniel Mellado 2021-03-10 16:54:48 UTC
Description of problem:

CI fails because of a violation in golangci-lint../hack/verify-style fails on master branch of cluster-network-operator

How reproducible:

[dsal@bkr-hv02 cluster-network-operator(master)]$ ./hack/verify-style.sh
golangci-lint run --verbose --print-resources-usage --modules-download-mode=vendor --timeout=5m0s
INFO [config_reader] Config search paths: [./ /home/dsal/cluster-network-operator /home/dsal /home /]
INFO [lintersdb] Active 10 linters: [deadcode errcheck gosimple govet ineffassign staticcheck structcheck typecheck unused varcheck]
INFO [loader] Go packages loading at mode 575 (types_sizes|compiled_files|files|imports|deps|exports_file|name) took 1.765886515s
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 12.296396ms
INFO [linters context/goanalysis] analyzers took 6.687552348s with top 10 stages: buildir: 4.22754524s, S1038: 206.139302ms, S1039: 76.146211ms, SA1012: 66.33837ms, S1024: 59.503786ms, printf: 56.609094ms, S1028: 53.537139ms, nilness: 50.478902ms, varcheck: 48.189615ms, ctrlflow: 47.866381ms
INFO [linters context/goanalysis] analyzers took 3.967287598s with top 10 stages: buildir: 3.748853921s, unused: 134.408995ms, directives: 75.249754ms, isgenerated: 8.774928ms
INFO [runner] Issues before processing: 12, after processing: 1
INFO [runner] Processors filtering stat (out/in): path_shortener: 1/1, severity-rules: 1/1, path_prettifier: 12/12, skip_files: 12/12, autogenerated_exclude: 12/12, exclude: 12/12, nolint: 1/7, max_per_file_from_linter: 1/1, skip_dirs: 12/12, identifier_marker: 12/12, source_code: 1/1, path_prefixer: 1/1, max_same_issues: 1/1, sort_results: 1/1, cgo: 12/12, filename_unadjuster: 12/12, exclude-rules: 7/12, uniq_by_line: 1/1, diff: 1/1, max_from_linter: 1/1
INFO [runner] processing took 9.494809ms with stages: nolint: 8.201721ms, exclude-rules: 364.352µs, identifier_marker: 292.479µs, autogenerated_exclude: 253.418µs, path_prettifier: 135.627µs, skip_dirs: 126.243µs, source_code: 99.046µs, cgo: 9.833µs, uniq_by_line: 2.44µs, max_same_issues: 2.326µs, path_shortener: 1.692µs, filename_unadjuster: 1.634µs, max_from_linter: 1.483µs, max_per_file_from_linter: 673ns, diff: 404ns, severity-rules: 342ns, exclude: 314ns, sort_results: 286ns, skip_files: 272ns, path_prefixer: 224ns
INFO [runner] linters took 2.775946475s with stages: goanalysis_metalinter: 1.643594316s, unused: 1.122714986s
pkg/controller/statusmanager/status_manager_test.go:26:2: SA1019: package sigs.k8s.io/controller-runtime/pkg/client/fake is deprecated: please use pkg/envtest for testing. This package will be dropped before the v1.0.0 release. (staticcheck)
INFO File cache stats: 1 entries of total size 45.7KiB
INFO Memory: 47 samples, avg is 308.8MB, max is 549.7MB
INFO Execution took 4.562030332s
make: *** [Makefile:18: golangci-lint] Error 1

Comment 2 zhaozhanqi 2021-03-16 10:14:44 UTC
Verified this bug 

INFO [lintersdb] Active 10 linters: [deadcode errcheck gosimple govet ineffassign staticcheck structcheck typecheck unused varcheck] 
INFO [loader] Go packages loading at mode 575 (exports_file|files|name|compiled_files|deps|imports|types_sizes) took 45.404453173s 
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 106.13484ms 
INFO [linters context/goanalysis] analyzers took 2m14.018558036s with top 10 stages: buildir: 1m54.227215506s, nilness: 5.524961791s, typedness: 2.789410964s, inspect: 2.490614372s, ctrlflow: 1.492483131s, fact_purity: 1.309026528s, printf: 1.287289745s, fact_deprecated: 1.177971632s, SA5012: 1.007328275s, S1038: 221.146963ms 
INFO [linters context/goanalysis] analyzers took 4.41524137s with top 10 stages: buildir: 4.055550702s, unused: 151.63114ms, directives: 143.2459ms, isgenerated: 64.813628ms 
INFO [runner] Issues before processing: 12, after processing: 0 
INFO [runner] Processors filtering stat (out/in): cgo: 12/12, path_prettifier: 12/12, skip_dirs: 12/12, autogenerated_exclude: 12/12, filename_unadjuster: 12/12, skip_files: 12/12, exclude: 12/12, nolint: 0/7, exclude-rules: 7/12, identifier_marker: 12/12 
INFO [runner] processing took 14.957352ms with stages: nolint: 12.859869ms, exclude-rules: 664.774µs, identifier_marker: 533.888µs, path_prettifier: 399.045µs, autogenerated_exclude: 296.275µs, skip_dirs: 183.305µs, cgo: 7.413µs, filename_unadjuster: 2.842µs, max_same_issues: 1.719µs, skip_files: 1.178µs, path_shortener: 1.09µs, diff: 834ns, max_from_linter: 800ns, source_code: 739ns, uniq_by_line: 733ns, severity-rules: 724ns, exclude: 642ns, sort_results: 543ns, max_per_file_from_linter: 477ns, path_prefixer: 462ns 
INFO [runner] linters took 37.491192326s with stages: goanalysis_metalinter: 35.167755175s, unused: 2.308298821s 
INFO File cache stats: 0 entries of total size 0B 
INFO Memory: 815 samples, avg is 486.5MB, max is 1694.9MB 
INFO Execution took 1m23.007682133s

Comment 7 errata-xmlrpc 2021-07-27 22:52:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.