Commit graph

234 commits

Author SHA1 Message Date
Matthieu MOREL
5b6c6bbfc7 fix: enable nolinlint linter
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-25 07:50:29 +01:00
George Jenkins
be7cdb69e5
Merge pull request #31806 from mmorel-35/errorlint-pkg-4-15f432a
fix(pkg): errorlint linter
2026-02-24 16:00:34 -08:00
George Jenkins
92b64e87ad
chore: fixes
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2026-02-23 16:46:35 -08:00
Evans Mungai
ee018608f6
fix: handle OCI digest algorithm prefix in chart downloader (#31601)
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: strip digest algorithm prefix before hex decoding

OCI references with tag+digest (e.g., chart:1.0@sha256:abc...) failed with "invalid byte" error because the sha256: prefix was passed to hex.DecodeString().

Signed-off-by: Evans Mungai <mbuevans@gmail.com>

* Add cmd test for OCI references with tag+digest

Signed-off-by: Evans Mungai <mbuevans@gmail.com>

* Move oci registry push result to a struct

Signed-off-by: Evans Mungai <mbuevans@gmail.com>

* Review comments from PR review

Signed-off-by: Evans Mungai <mbuevans@gmail.com>

* Fix failing test

Signed-off-by: Evans Mungai <mbuevans@gmail.com>

---------

Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2026-02-20 16:58:32 +00:00
Matt Farina
794372e317
Merge pull request #31816 from mmorel-35/errorlint-pkg-7-6d6a660
Some checks failed
build-test / build (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
golangci-lint / golangci-lint (push) Has been cancelled
govulncheck / govulncheck (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(pkg): errorlint linter
2026-02-18 21:46:10 +01:00
Joe Julian
947b429cdd
Merge pull request #31801 from mmorel-35/modernize-pkg-4-062b248
chore(pkg): fix modernize linter
2026-02-10 21:42:25 -08:00
Joe Julian
78f5af72be
Merge pull request #31802 from mmorel-35/modernize-pkg-5-a3c8fdb
chore(pkg): fix modernize linter
2026-02-10 21:41:08 -08:00
Joe Julian
7f9703fe22
Merge pull request #31811 from mmorel-35/errorlint-pkg-3-39f7a9f
fix(pkg): errorlint linter
2026-02-10 06:24:45 -08:00
Matthieu MOREL
259f76a849 fix(pkg): errorlint linter
errorlint linter in pkg/cmd

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-09 07:54:59 +01:00
Matthieu MOREL
6d1490ed1e fix(pkg): errorlint linter
#### Description

errorlint linter in pkg/cmd

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-09 07:45:41 +01:00
Matthieu MOREL
4d0ae7f33a fix(pkg): errorlint linter
#### Description

errorlint linter in pkg

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-09 07:45:34 +01:00
Matthieu MOREL
4330bdea04 fix(pkg): errorlint linter
#### Description

errorlint linter in pkg

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-09 07:45:25 +01:00
Matthieu MOREL
5cc2e55714 chore(pkg): fix modernize linter
#### Description

fix modernize linter in pkg/chart/v2/lint/rules

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-06 16:11:01 +01:00
Matthieu MOREL
ba38159313 chore(pkg): fix modernize linter
#### Description

fix modernize linter in pkg/strvals

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-06 16:10:54 +01:00
Matthieu MOREL
111d4e6e0e chore(pkg): fix modernize linter
#### Description

fix modernize linter in pkg/chart/common/util

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-06 16:10:41 +01:00
Evans Mungai
5b78ee8dff
Merge pull request #31644 from banjoh/em/fix-nil-values
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(values): preserve nil values when chart default is empty map
2026-01-31 13:03:55 +00:00
Evans Mungai
0298b2ffd0
Remove refactorring changes from coalesce_test.go
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2026-01-07 13:16:11 +00:00
Evans Mungai
b8937ad192
Fix import
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2026-01-07 12:58:21 +00:00
Evans Mungai
a333bbaf27
Update pkg/chart/common/util/coalesce_test.go
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2026-01-07 12:51:47 +00:00
Mads Jensen
2d6d9c09c4 Replace reflect.Ptr with reflect.Pointer
The reflect package has a go:fix annotation for Ptr = Pointer.

Signed-off-by: Mads Jensen <atombrella@users.noreply.github.com>
2025-12-31 10:05:43 +01:00
Branch Vincent
c6d9a5bdc2 build: set kube version via debug.BuildInfo
Signed-off-by: Branch Vincent <branchevincent@gmail.com>
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2025-12-19 21:13:47 -08:00
Mads Jensen
a490bb3c20 Use errors.Is to check for io.EOF and gzip.ErrHeader
In GoLang, using the == operator to check for a certain error will not
unwrap the error chain, and therefore may hide the problem.

Signed-off-by: Mads Jensen <atombrella@users.noreply.github.com>
2025-12-14 08:54:11 +01:00
Robert Sirchia
4cf7d8d025
Merge pull request #31641 from wangjingcun/main
chore: fix some comments to improve readability
2025-12-12 19:34:20 +01:00
Evans Mungai
3416dd5f21
Fix lint warning
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2025-12-12 17:09:18 +00:00
Evans Mungai
679f051980
Preserve nil values in chart already
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2025-12-12 17:00:18 +00:00
Evans Mungai
292fe70219
fix(values): preserve nil values when chart default is empty map
Only delete nil user values when overriding a non-nil chart default.
When chart has empty map or no default for a key, preserve user's nil.

| Scenario | Result |
|----------|--------|
| User sets `baz: ~`, chart has `baz: "value"` | Key deleted |
| User sets `baz: ~`, chart has empty map `{}` | Nil preserved |
| User sets `baz: ~`, chart has `baz: ~` | Nil preserved |

Fixes #31643

Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2025-12-12 16:32:32 +00:00
Terry Howe
d28853e206
Merge pull request #31624 from atombrella/feature/sloglint
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
Enable the `sloglint` linter
2025-12-12 08:04:45 -07:00
wangjingcun
858cf31583 chore: fix some comments to improve readability
Signed-off-by: wangjingcun <wangjingcun@aliyun.com>
2025-12-12 12:01:35 +08:00
Mads Jensen
a18e59e465 Enable the sloglint linter
Signed-off-by: Mads Jensen <atombrella@users.noreply.github.com>
2025-12-09 08:24:36 +01:00
George Jenkins
3165e5463a
Merge pull request #31528 from benoittgt/31423-git-version
fix: preserve vendor suffixes in KubeVersion.GitVersion
2025-12-08 08:35:56 -08:00
Matt Farina
ff35414bed
Merge pull request #31546 from benoittgt/31544-nil-pointer
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(lint): prevent segmentation violation on only comment yaml in multidoc
2025-12-01 09:15:14 -05:00
Mads Jensen
6cceead399 Use modernize to use newer Golang features.
The rangeint suggestion is faster.
The maps.Copy and slices.Contains are just syntatic sugar.

Signed-off-by: Mads Jensen <atombrella@users.noreply.github.com>
2025-11-22 18:52:40 +01:00
Benoit Tigeot
81d244ca21
fix: prevent segmentation violation on empty yaml in multidoc
Fixes: https://github.com/helm/helm/issues/31544

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-11-20 20:59:53 +01:00
Matt Farina
df6aafeeee
Merge pull request #31462 from mattfarina/load-archive
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
Adding a LoadArchive to common loader
2025-11-20 11:13:27 -05:00
Matt Farina
63858b383f
Merge pull request #31535 from mattfarina/bump-4.1
bump version to 4.1
2025-11-20 11:13:03 -05:00
Matt Farina
63e060fb05
bump version to 4.1
Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-11-19 12:49:49 -05:00
shuv0id
2dc5864f44 fix: add missing context to debug logs
Adds chart name to dependency logs, namespace to resource waiting logs,
and confirmation message when all resources are ready.

Addresses #31520

Signed-off-by: shuv0id <110290476+shuv0id@users.noreply.github.com>
2025-11-18 22:25:34 +05:30
Benoit Tigeot
ce273eea48
fix: preserve vendor suffixes in KubeVersion.GitVersion
Helm 3.19.0 introduced a regression where vendor-specific suffixes
(e.g., -gke.1245000, -eks-4096722, +) are stripped from
.Capabilities.KubeVersion.GitVersion, breaking charts that detect
managed Kubernetes platforms.

The root cause was using k8sversion.ParseGeneric().String() which
intentionally discards vendor suffixes. The fix stores both the full
version (with vendor suffix) and a normalized version. String() returns
the normalized version for constraint checking (e.g., ">= 1.21.0"),
while Version/GitVersion preserve the full string for template access.

Fixes #31423
Related to #31063, #31078

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-11-18 15:28:16 +01:00
Scott Rigby
b740071279
Merge pull request #31342 from TerryHowe/chore-remove-mitchellh-dependency-3
chore: replace github.com/mitchellh/copystructure
2025-11-14 15:26:10 -05:00
Matt Farina
0f5eda74c1
Adding a LoadArchive to common loader
LoadArchive is in the individual loaders for the chart versions.
It is used by SDK users to load a stream rather than a file on
the filesystem. Adding to support SDK users like Flux.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-11-06 09:08:30 -05:00
Benoit Tigeot
97b7a1c9ae
Merge branch 'main' into fix-31170-URN
Signed-off-by: Benoit Tigeot <benoittgt@users.noreply.github.com>
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-10-30 16:07:34 +01:00
Matt Farina
15300549f0
When time not available, using time.Now
Note, when time is not available, the builds are not reproducible.
This problem would only happen when an SDK user is using parts of
the API to build their own tooling. Helm will consistently inject
the dates through the higher level APIs.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-10-29 15:11:20 -04:00
Matt Farina
ca8eae9361
Reproducible chart archive builds
Building the same chart into an archive multiple times will have
the same sha256 hash.

Perviously, the time in the headers for a file was time.Now() which
changed each time. The time is now collected from the operating
system when the file is loaded and this time is used.

Fixes: #3612

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-10-29 11:49:22 -04:00
Matt Farina
1da2b0a6d4
Merge pull request #31204 from benoittgt/fix-31202
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
Avoid panic in helm.sh/helm/v3/pkg/chartutil.ValidateAgainstSchema
2025-10-22 15:47:14 -04:00
Matt Farina
37de51428c
Merge pull request #31376 from benoittgt/accept-yaml-yml
Do not ignore *.yml file on linting while accepting *.yaml
2025-10-21 15:23:40 -04:00
Benoit Tigeot
06188f9dfe
Add test for isYamlFileExtension functions
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-10-11 13:28:36 +02:00
Matt Farina
78cd44bd75
Merge pull request #30712 from gjenkins8/gjenkins/cleanup_lint_template
cleanup: Remove extra lint/rules.Template functions
2025-10-10 16:55:17 -04:00
Matt Farina
94bfe9ba12 Move action get metadata to chart interfaces
Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-10-10 11:49:08 -04:00
Benoit Tigeot
4a944230ea
Do not ignore *.yml file on linting while accepting *.yaml
From : https://github.com/helm/helm/pull/30712/files#r2417446037

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-10-09 22:52:52 +02:00
Terry Howe
ee322a9671
fix: flakey lint test on shuffle
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2025-10-01 10:24:42 -06:00