Skip to content

CNTRLPLANE-3324: Enable gocyclo linter and reduce cyclomatic complexity - #8309

Merged
openshift-merge-bot[bot] merged 7 commits into
openshift:mainfrom
bryan-cox:cyclo-magic
May 11, 2026
Merged

openshift-merge-bot[bot] merged 7 commits into
openshift:mainfrom
bryan-cox:cyclo-magic

fix: reduce cyclomatic complexity in EnsureGlobalPullSecret

f2423d3
Select commit
Loading
Failed to load commit list.
Codecov / codecov/project succeeded May 11, 2026 in 1s

39.72% (+2.18%) compared to 37f46b9

View this Pull Request on Codecov

39.72% (+2.18%) compared to 37f46b9

Details

Codecov Report

❌ Patch coverage is 71.05344% with 937 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.72%. Comparing base (37f46b9) to head (f2423d3).
⚠️ Report is 41 commits behind head on main.

Files with missing lines Patch % Lines
...ostedcontrolplane/hostedcontrolplane_controller.go 62.91% 159 Missing and 42 partials ⚠️
...ollers/awsprivatelink/awsprivatelink_controller.go 33.72% 108 Missing and 4 partials ⚠️
cmd/infra/aws/create.go 0.00% 96 Missing ⚠️
cmd/cluster/core/create.go 60.36% 72 Missing and 16 partials ⚠️
...ator/controllers/hostedcluster/network_policies.go 60.73% 53 Missing and 22 partials ⚠️
cmd/fix/dr_oidc_iam.go 0.00% 70 Missing ⚠️
cmd/infra/azure/create.go 0.00% 53 Missing ⚠️
...perator/controllers/hostedcluster/etcd_recovery.go 39.70% 37 Missing and 4 partials ⚠️
...rconfigoperator/controllers/resources/resources.go 77.01% 31 Missing and 9 partials ⚠️
...hift-operator/controllers/etcdbackup/reconciler.go 56.57% 24 Missing and 9 partials ⚠️
... and 9 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8309      +/-   ##
==========================================
+ Coverage   37.53%   39.72%   +2.18%     
==========================================
  Files         751      751              
  Lines       92025    92461     +436     
==========================================
+ Hits        34543    36729    +2186     
+ Misses      54841    53076    -1765     
- Partials     2641     2656      +15     
Files with missing lines Coverage Δ
...trollers/hostedcluster/hostedcluster_controller.go 43.23% <ø> (ø)
...ollers/hostedcluster/internal/platform/platform.go 0.00% <ø> (ø)
hypershift-operator/controllers/nodepool/aws.go 69.41% <ø> (+14.36%) ⬆️
hypershift-operator/controllers/nodepool/capi.go 71.74% <ø> (+2.87%) ⬆️
...t-operator/controllers/nodepool/metrics/metrics.go 72.72% <ø> (+1.38%) ⬆️
...erator/controllers/nodepool/nodepool_controller.go 41.30% <ø> (ø)
...ft-operator/controllers/platform/aws/controller.go 41.06% <ø> (+2.55%) ⬆️
...t-operator/controllers/scheduler/aws/autoscaler.go 60.42% <ø> (+3.40%) ⬆️
...s/scheduler/aws/dedicated_request_serving_nodes.go 61.08% <ø> (+7.53%) ⬆️
hypershift-operator/main.go 0.00% <ø> (ø)
... and 20 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.