Commit graph

3818 commits

Author SHA1 Message Date
Terry Howe
fcdf3854b0
Merge pull request #32113 from isumitsolanki/issue_32100
Some checks failed
build-test / build (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
golangci-lint / golangci-lint (push) Has been cancelled
release / release (push) Has been cancelled
release / canary-release (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
fix(downloader): order DiskCache.Get checks for overlayfs empty dirs
2026-05-19 13:45:43 -06:00
Robert Sirchia
6c3f397d2c
Merge pull request #32122 from quyentonndbs/chore/lint-deprecations-comment-typo
docs: fix typo in deprecated API godoc
2026-05-19 15:11:17 -04:00
Sebastien Tardif
ea2343ebea fix(repo): use structured slog args in index.go
slog.Error on line 157 passes printf-style positional args (%q, %s)
instead of key-value pairs. The slog API treats these as unkeyed
attributes, producing garbled log output.

Two nearby slog.Warn calls wrap fmt.Sprintf unnecessarily. Convert
all three calls to use proper structured key-value arguments.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Assisted-by: Grok/grok-4
2026-05-15 07:16:39 -07:00
Terry Howe
b2786f15f2
Merge pull request #32118 from box4wangjing/main
Some checks failed
build-test / build (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
golangci-lint / golangci-lint (push) Has been cancelled
release / release (push) Has been cancelled
release / canary-release (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
refactor: use slices.Backward to simplify the code
2026-05-14 09:51:13 -06:00
George Jenkins
39b2edca71
Merge pull request #32091 from ogulcanaydogan/chore/remove-pre-go120-transport-cloner
Some checks are pending
build-test / build (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
golangci-lint / golangci-lint (push) Waiting to run
release / release (push) Waiting to run
release / canary-release (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
fix(registry): remove pre-Go-1.20 transport cloner fallback
2026-05-13 17:27:50 -07:00
Kai Tanaka
2032ec5cba docs: fix 'than'->'that' typo in deprecatedAPIError godoc
Signed-off-by: Kai Tanaka <275430420+quyentonndbs@users.noreply.github.com>
2026-05-12 14:12:03 +00:00
box4wangjing
432fc8a217 refactor: use slices.Backward to simplify the code
Signed-off-by: box4wangjing <box4wangjing@outlook.com>
2026-05-12 01:22:24 +08:00
Terry Howe
0f09636c79
Merge pull request #32099 from SebTardif/fix/helm-test-logs-multi-container
Some checks failed
build-test / build (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
golangci-lint / golangci-lint (push) Has been cancelled
release / release (push) Has been cancelled
release / canary-release (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
fix: fetch logs from all containers in test pods
2026-05-11 06:52:14 -06:00
Terry Howe
d9a18b59a8
Merge pull request #31695 from aeroyorch/add-duration-functions
Some checks failed
build-test / build (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
golangci-lint / golangci-lint (push) Waiting to run
release / release (push) Waiting to run
release / canary-release (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
govulncheck / govulncheck (push) Has been cancelled
Add duration functions
2026-05-10 10:55:19 -06:00
Sumit Solanki
53d5f13f46
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Sumit Solanki <sumit.solanki@ibm.com>
2026-05-09 12:28:41 +05:30
Sumit Solanki
6620fec5d1 fix(downloader): order DiskCache.Get checks for overlayfs empty dirs
Signed-off-by: Sumit Solanki <sumit.solanki@ibm.com>
2026-05-09 12:17:40 +05:30
George Jenkins
19b3656306
Bump to version v4.2 (#32102)
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2026-05-06 13:35:57 -04:00
Sebastien Tardif
922558fc1a fix: address review feedback
- Close log stream after reading (prevents connection/fd leak)
- Strengthen tests to assert on output headers rather than error paths
- Remove unused import

Signed-off-by: Sebastien Tardif <SebTardif@ncf.ca>
2026-05-04 14:04:25 -07:00
Sebastien Tardif
854f7f6b72 fix: fetch logs from all containers in test pods
When a test pod contains multiple containers (e.g. Istio/Consul/Vault
sidecars), 'helm test --logs' failed with 'a container name must be
specified'. This happened because GetPodLogs called the Kubernetes log
API without specifying a container name.

The fix fetches the pod spec first, then iterates over all containers
(init containers + regular containers) and requests logs for each one
explicitly. Errors from individual containers are collected and returned
together via errors.Join rather than aborting on the first failure.

Also fixes a typo: hooksByWight -> hooksByWeight.

Closes #6902

Signed-off-by: Sebastien Tardif <SebTardif@ncf.ca>
2026-05-04 13:57:52 -07:00
Terry Howe
b3a458fde9
Merge pull request #31970 from isumitsolanki/fix/31965-decouple-cli-from-kube
refactor(cli): decouple EnvSettings from pkg/kube to avoid import cycles
2026-05-03 05:59:17 -06:00
Ogulcan Aydogan
73f71bceae
fix(registry): remove pre-Go-1.20 transport cloner fallback
Helm now requires Go 1.26 (#32078); the cloner[T] type-assertion fallback
in transport.go was a defensive shim for Go versions before
http.Transport.Clone() existed. The fallback path is unreachable on
supported Go versions.

Refs: #31386
Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@hotmail.com>
2026-04-30 14:35:16 +01:00
Terry Howe
38f3704983
Merge pull request #32034 from cairon-ab/fix/pull-debug-output
fix: add debug logging to HTTP getter for helm pull
2026-04-29 07:04:03 -06:00
Terry Howe
fbc2791886
Merge pull request #32078 from matheuscscp/go-1.26-k8s-1.36-cli-utils-1.1
Upgrade Go to 1.26, Kubernetes to 1.36, kstatus to 1.1
2026-04-26 08:19:50 -06:00
Terry Howe
2fb101a20b
Merge pull request #31755 from scottrigby/template-cmd-deprecate-notes-flags
fix(template): deprecate unused --hide-notes and --render-subchart-notes flags
2026-04-26 05:43:22 -06:00
Matheus Pimenta
a4a9cc7a31
Upgrade Go to 1.26, Kubernetes to 1.36, kstatus to 1.1
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2026-04-25 17:06:10 +01:00
George Jenkins
4bd9e90aa0
Merge pull request #30811 from mmorel-35/testifylint
Some checks failed
build-test / build (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
golangci-lint / golangci-lint (push) Has been cancelled
release / release (push) Has been cancelled
release / canary-release (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
chore: fix bool-compare issues from testifylint
2026-04-24 21:35:35 -07:00
Matheus Pimenta
8f56f24d63
fix(templating): hooks conflicting with templates in post-renderers (#32049)
Some checks failed
build-test / build (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
golangci-lint / golangci-lint (push) Has been cancelled
release / release (push) Has been cancelled
release / canary-release (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
* fix(templating): hooks conflicting with templates in post-renderers

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>

* fix(templating): allow disabling hooks from postrenderers entirely

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>

---------

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2026-04-21 19:11:38 +01:00
Terry Howe
29d309e56b
Merge pull request #31981 from abhay1999/fix/ssa-error-context
Some checks failed
build-test / build (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
golangci-lint / golangci-lint (push) Waiting to run
release / release (push) Waiting to run
release / canary-release (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
govulncheck / govulncheck (push) Has been cancelled
fix(kube): clarify server-side apply patch errors
2026-04-20 06:04:11 -06:00
George Jenkins
66e5049405
Merge pull request #32008 from rhysmcneill/bugfix/helm-upgrade-err-variable-defect
fix(action): return correct error variable in prepareUpgrade
2026-04-19 21:27:17 -07:00
Terry Howe
83a4611908
Merge pull request #12932 from AndiDog/error-message
Make error message instructional for the case of lock file being out of date
2026-04-16 17:00:46 -06:00
Matheus Pimenta
265c5eb530
fix(templating): SplitManifests must preserve line endings for downstream YAML parsers (#31952)
Some checks are pending
build-test / build (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
golangci-lint / golangci-lint (push) Waiting to run
release / release (push) Waiting to run
release / canary-release (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
* fix(templating): SplitManifests must preserve line endings for downstream YAML parsers

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>

* Address copilot comment about skipping empty docs

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>

* Port fix to release v2

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>

* Address copilot comments

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>

---------

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2026-04-15 14:33:27 +01:00
Evans Mungai
a8e249714f Update pkg/chart/common/util/coalesce.go
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2026-04-13 20:09:47 +02:00
Johannes Lohmer
52fc971da3 test(values): Add test for nil cleanup in partially overridden subchart maps
Signed-off-by: Johannes Lohmer <jojo.dev@lohmer.com>
2026-04-13 20:09:47 +02:00
Johannes Lohmer
00638773d1 fix(values): do not copy chart-default nils into coalesced values
Only user-supplied nils should survive coalescing. Chart-default nils
defaults, not just user overrides. This caused:
- %!s(<nil>) in templates using Bitnami common.secrets.key (#31919)
- pluck fallbacks returning nil instead of falling through to globals
  (#31971)

Fixes #31919
Fixes #31971

Signed-off-by: Johannes Lohmer <jojo.dev@lohmer.com>
2026-04-13 20:09:47 +02:00
Johannes Lohmer
6eb4ebf0e1 test(values): add test for subchart nil producing %!s(<nil>)
Regression test for the Bitnami common.secrets.key issue.

Signed-off-by: Johannes Lohmer <jojo.dev@lohmer.com>
2026-04-13 20:09:47 +02:00
Johannes Lohmer
5cb4e7d992 test(values): add tests for subchart nil value regressions
Three test cases that cover the regression scenarios introduced
by the #31644 nil preservation fix:

- subchart default nils should be cleaned up
when parent doesn't set those keys (#31919)
- user-supplied null should erase subchart defaults (#31919)
- subchart default nil should not shadow global values via pluck (#31971)

Tests are expected to fail until the regression is fixed.

Signed-off-by: Johannes Lohmer <jojo.dev@lohmer.com>
2026-04-13 20:09:47 +02:00
Jorge Rocamora
722dd3e3a8 Add duration functions
Signed-off-by: Jorge Rocamora <33847633+aeroyorch@users.noreply.github.com>
2026-04-11 21:03:12 +02:00
George Jenkins
bd061e0cd7
Merge pull request #32016 from TerryHowe/fix/flaky-waitfordelete-timeout
Some checks failed
build-test / build (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
golangci-lint / golangci-lint (push) Has been cancelled
release / release (push) Has been cancelled
release / canary-release (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
test(kube): fix flaky WaitForDelete timing in status wait tests
2026-04-10 21:32:53 -07:00
Matheus Pimenta
a27f1add79
fix(templating): fix wrong YAML separator parsing for post-renderers (#31941)
Some checks are pending
build-test / build (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
golangci-lint / golangci-lint (push) Waiting to run
release / release (push) Waiting to run
release / canary-release (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2026-04-10 18:44:27 +01:00
Cairon
c26be60d81 fix: add debug logging to HTTP getter for helm pull
When running 'helm pull --debug', no debug output was printed because
the HTTP getter did not emit any slog.Debug messages. This adds
slog.Debug calls to log the URL being fetched and the response status
when debug-level logging is enabled.

Fixes helm/helm#31098

Signed-off-by: Cairon <cairon-ab@users.noreply.github.com>
2026-04-10 11:11:38 -04:00
Sumit Solanki
213c869a98 refactor(cli): share RetryingRoundTripper via pkg/kubeenv
Move implementation to pkg/kubeenv per review; kube.RetryingRoundTripper
remains a type alias for API compatibility. pkg/cli uses kubeenv only.

Signed-off-by: Sumit Solanki <sumit.solanki@ibm.com>
2026-04-09 22:46:41 +05:30
George Jenkins
586eb57338
fix: Plugin missing provenance bypass
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2026-04-08 21:31:08 -07:00
George Jenkins
f7c4d75574
Merge commit from fork
fix: Chart dot-name path bug
2026-04-08 21:23:52 -07:00
George Jenkins
f8afb35f4e
Merge commit from fork
fix: Plugin version path traversal
2026-04-08 21:22:47 -07:00
Terry Howe
a7f84439aa
test(kube): fix flaky WaitForDelete test by avoiding informer sync race
The previous fix (increasing timeout / reducing deletion delay) did not
work because the flakiness is not a timing problem at all.

Root cause: fluxcd/cli-utils HasSynced() returns true after the initial
list item is *popped* from DeltaFIFO, which is before AddFunc delivers
the ResourceUpdateEvent to the collector. This creates a race where the
SyncEvent can arrive at the statusObserver *before* the pod's Current
status is recorded. When that happens:
  - statusObserver sees pod as Unknown
  - Unknown is skipped for WaitForDelete (by design, to handle resources
    that were already deleted before watching started)
  - AggregateStatus([], NotFoundStatus) == NotFoundStatus → cancel()
  - The watch context is cancelled before DeleteFunc can fire
  - Final check: pod still Current → error

The test intent is to verify that waitForDeleteCtx (not the cancelled
generalCtx) is selected. A non-existent resource satisfies this:
  - With waitForDeleteCtx=Background(): informer syncs with empty list
    → Unknown → cancel → success ✓
  - With generalCtx (cancelled, wrong): context immediately done
    → ctx.Err() appended → error returned ✓

Remove the goroutine-based deletion and the pod creation to eliminate
the race while preserving the context-selection assertion.

Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2026-04-07 08:23:39 -06:00
Terry Howe
4c0d21f53f
test(kube): fix flaky WaitForDelete timing in status wait tests
TestMethodContextOverridesGeneralContext/WaitForDelete used a 1s
timeout with a 500ms deletion delay, leaving only ~500ms for the
fake watcher to propagate the delete event. On loaded CI runners
this window is too tight and causes intermittent failures.

Increase the timeout to 5s and reduce the deletion delay to 100ms
so there is ample headroom. Apply the same deletion-delay reduction
to TestStatusWaitForDelete which shares the same pattern.

Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2026-04-07 04:26:12 -06:00
Anmol Virdi
de58531ca7 Minor nit: fix import instructions to comply with canonical import paths
Signed-off-by: Anmol Virdi <anmolvirdi2000@gmail.com>
2026-04-07 01:23:50 +05:30
Rhys McNeill
8ef2d45934 fix(action): return correct error variable in prepareUpgrade
When Deployed() succeeds but releaserToV1Release() fails, prepareUpgrade
returned err (nil) instead of cerr (the conversion error), causing a
silent nil return that could lead to nil pointer dereferences downstream.

Closes #32007

Signed-off-by: Rhys McNeill <rhysmcneill7@hotmail.co.uk>
2026-04-05 15:55:56 +01:00
abhay1999
f257c95c78 fix(kube): clarify server-side apply patch errors
Signed-off-by: abhay1999 <abhaychaurasiya19@gmail.com>
2026-03-30 19:20:40 +05:30
Sumit Solanki
64f1d0af5b refactor(cli): decouple EnvSettings from pkg/kube
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
2026-03-27 11:56:33 +05:30
Debasish Mohanty
85bf56ea82
docs(registry): fix incorrect and improve clarity of comments in client.go
- Fixed incorrect comment in ClientOptPlainHTTP
- Improved clarity of LoginOptPlainText comment
- Enhanced Login function documentation
- Improved wording for ClientOptHTTPClient

No functional changes.

Signed-off-by: Debasish Mohanty <139056705+Debasish-87@users.noreply.github.com>
2026-03-27 11:54:38 +05:30
Sumit Solanki
154993723a refactor(cli): decouple EnvSettings from pkg/kube to avoid import cycles
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 #31965).

Signed-off-by: Sumit Solanki <sumit.solanki@ibm.com>
2026-03-26 20:42:56 +05:30
Terry Howe
8e44f8e3fe
Merge pull request #31957 from Mentigen/add-mustToToml
Some checks are pending
build-test / build (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
golangci-lint / golangci-lint (push) Waiting to run
govulncheck / govulncheck (push) Waiting to run
release / release (push) Waiting to run
release / canary-release (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
feat(engine): add mustToToml template function
2026-03-24 06:16:46 +01:00
Ilya Kiselev
c1a5a6e260 docs(engine): fix misleading toTOML doc comment
The toTOML doc comment said "returns empty string on marshal error"
but the implementation actually returns err.Error(). Fix the comment
to match the real behavior. Also mention mustToToml as the strict
alternative.

Signed-off-by: Ilya Kiselev <kis-ilya-a@yandex.ru>
2026-03-23 18:38:57 +03:00
Ilya Kiselev
b075f7a35d feat(engine): add mustToToml template function
Add `mustToToml` that panics on marshal error, consistent with
`mustToYaml` and `mustToJson`. This makes it possible for chart authors
to get a hard failure when TOML serialization fails, rather than having
to inspect the output manually.

`toToml` behavior is unchanged in this commit.

Closes #31430

Signed-off-by: Ilya Kiselev <kis-ilya-a@yandex.ru>
2026-03-23 18:20:54 +03:00