refactor(cli): decouple EnvSettings from pkg/kube to avoid import cycles by isumitsolanki · Pull Request #31970 · helm/helm

@isumitsolanki

Move the retrying round tripper used by EnvSettings into pkg/cli so
pkg/cli no longer imports pkg/kube. This preserves retry behavior while
breaking the import edge that triggers cycles for Helm library consumers
(such as the kustomize integration described in helm#31965).

Signed-off-by: Sumit Solanki <sumit.solanki@ibm.com>

AI review requested due to automatic review settings

March 26, 2026 15:20

@isumitsolanki

Move the retrying HTTP round-tripper used by EnvSettings into pkg/cli so
pkg/cli no longer imports pkg/kube, avoiding import cycles for Helm
library consumers while preserving retry behavior for transient API
server errors.

Add pkg/cli/roundtripper_test.go with parity coverage for the moved logic.

Signed-off-by: Sumit Solanki <sumit.solanki@ibm.com>
Made-with: Cursor

@pull-request-size pull-request-size bot added size/L

Denotes a PR that changes 100-499 lines, ignoring generated files.

and removed size/M

Denotes a PR that changes 30-99 lines, ignoring generated files.

labels

Mar 27, 2026