Commit graph

380 commits

Author SHA1 Message Date
Matthieu MOREL
9409226e15 chore(internal): enable perfsprint linter
#### Description

enable perfsprint linter in internal/plugin/installer

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-26 18:55:55 +01:00
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
bc43812115
Merge pull request #31807 from mmorel-35/errorlint-internal-3-48c7a5a
fix(internal): errorlint linter
2026-02-24 16:01:26 -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
4a91f3ad5c
feat(release): add internal/release/v2 package for chart v3 support (#31709)
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
Introduce release/v2 that mirrors pkg/release/v1 but uses *v3.Chart
from internal/chart/v3. The code is structurally identical to v1 with
only import paths changed to reference internal/chart/v3 instead of
pkg/chart/v2.

- Add internal/release/v2 with Release, Info, Hook types
- Add internal/release/v2/util with filter, sorter, manifest utilities
- Update pkg/release/common.go with v2Accessor and v2HookAccessor
- Copy all test files from pkg/release/v1 and add a v2 test in common_test.go

Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2026-02-13 19:10:56 +00:00
Joe Julian
14e0b8f970
Merge pull request #31128 from orgads/win-parallel
fix(downloader): prevent concurrent file access errors on Windows
2026-02-10 21:38:34 -08:00
Matthieu MOREL
025418291a fix(internal): errorlint linter
errorlint linter in internal/third_party/dep/fs

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-09 07:51:29 +01:00
Matthieu MOREL
abecafa0f5 fix(internal): errorlint linter
#### Description

errorlint linter in internal

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-09 07:45:31 +01:00
Terry Howe
9b22aa4e05
Merge pull request #31795 from mmorel-35/modernize-internal-1-bbfa1fe
chore(internal): fix modernize linter
2026-02-07 15:30:05 -07:00
Joe Julian
c040f470ac
Merge pull request #31799 from mmorel-35/modernize-internal-2-d850a43
chore(internal): fix modernize linter
2026-02-07 11:58:46 -08:00
Orgad Shaneh
76eb37c01a fix(downloader): safely handle concurrent file writes on Windows
When multiple processes try to download the same chart version
concurrently (e.g., via Terraform), they can race to write the
destination file. On Windows, this results in 'Access Denied'
errors because the file cannot be renamed while another process
has a handle to the destination.

This commit introduces 'PlatformAtomicWriteFile' to the fileutil
package. On Unix-like systems, it simply delegates to AtomicWriteFile,
maintaining existing behavior. On Windows, it coordinates writes using
a lock file (.lock). It acquires the lock, then performs the atomic
write.

Crucially, this implementation ensures that existing files are
overwritten (rather than skipped). This ensures that if a chart is
republished with the same version, the local cache is correctly updated,
preventing stale data issues.

Fixes #31633

Signed-off-by: Orgad Shaneh <orgad.shaneh@audiocodes.com>
2026-02-07 19:26:59 +02:00
Evans Mungai
5aac32077f
feat(create): add --chart-api-version flag (when HELM_EXPERIMENTAL_CHART_V3 env var is set) (#31592)
* feat(create): add hidden --chart-api-version flag

Add --chart-api-version flag to helm create command to allow selecting
chart API version (v2 or v3) when creating a new chart.

- Default is v2 (existing behavior unchanged)
- v3 uses internal/chart/v3 scaffold generator
- Invalid versions return clear error message
- Works with --starter flag

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

* Add HELM_EXPERIMENTAL_CHART_V3 feature gate to create command

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

* make chartv3 private and use loader to load the chart

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

* Hide chart-api-version flag until chart v3 is officially released

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

* Conditionally hide the --chart-api-version flag if chart v3 is not enabled

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

* Add internal gates package for internal feature gates

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

* Add doc for internal/gates package

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

---------

Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2026-02-06 18:29:59 +00:00
Matthieu MOREL
859292e31b chore(internal): fix modernize linter
#### Description

fix modernize linter in internal/chart/v3

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

fix modernize linter in internal/chart/v3/lint/rules

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-02-06 16:10:51 +01:00
Philipp Born
e3829ebbbb
fix(copystructure): handle nil elements in slice copying
When copying slices containing nil interface{} elements, the copyValue
function would panic with 'reflect: call of reflect.Value.Set on zero
Value'. This occurred because reflect.ValueOf(nil) returns a zero Value
that cannot be set.

This issue was introduced in v4.1.0 when replacing mitchellh/copystructure
with an internal implementation. The fix mirrors the existing nil handling
logic used for map values.

Fixes helm template panic when processing charts with YAML like:
  extraArgs:
    -

Added test case to verify slice elements with nil values are properly
handled during deep copy operations.

Signed-off-by: Philipp Born <git@pborn.eu>
2026-01-22 18:28:05 +01:00
Terry Howe
429ce93848
Merge pull request #31613 from aslafy-z/feat/getter-env
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(getter): pass settings environment variables
2026-01-07 07:41:31 -07:00
Gergely Brautigam
138f730aac
fix: typo in the function names
Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
2025-12-31 07:46:52 +01:00
George Jenkins
f05c21b6b6
Merge pull request #31296 from gjenkins8/gjenkins/runtime_kube_version
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
build: set kube version via `debug.BuildInfo`
2025-12-22 19:15:22 -08:00
Brenden Ehlers
1c119bcaa6 fix: add default casess to switch statements
Signed-off-by: Brenden Ehlers <brenden@theehlers.org>
2025-12-21 09:13:24 -07: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
Matt Farina
4d1150d2af
Merge pull request #31415 from banjoh/em/increase-logging-test-coverage
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: increase logging test coverage
2025-12-17 15:56:17 -05: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
Terry Howe
b52b6615f0
Merge pull request #31207 from zyfy29/delete-unused-var
chore: delete unused var in installer.go
2025-12-13 08:27:37 -07: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
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
Terry Howe
642462e9fe
Merge pull request #11991 from twz123/no-bash-in-testscripts
Make test scripts run without /bin/bash
2025-12-12 07:57:37 -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
Zadkiel AHARONIAN
119341dca7
fix(getter): pass settings environment variables
Signed-off-by: Zadkiel AHARONIAN <hello@zadkiel.fr>
2025-12-07 17:08:29 +01: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
Scott Rigby
4d54bea5ff
Merge pull request #31491 from benoittgt/31490-plugin-name-helper
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
feat: improve plugin name validation error messages and field name detection (v1)
2025-11-25 11:49:58 -05: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
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
Benoit Tigeot
71591ee63e
style: linting
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-11-16 12:21:45 +01:00
Benoit Tigeot
b296cbef6c
test: split tests between valid and invalid
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-11-16 11:49:08 +01:00
Benoit Tigeot
9b242dd9ed
test: convert tests to table drive tests
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-11-16 11:44:49 +01:00
Benoit Tigeot
c81a09b89a
test: refactor TestMetadataLegacyValidate to be more generic
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-11-16 11:37:18 +01:00
yxxhero
8c87024860 update tests
Signed-off-by: yxxhero <aiopsclub@163.com>
2025-11-16 10:05:27 +08:00
yxxhero
2d49f0cb4a Refactor environment variable expansion in PrepareCommands and update tests
Signed-off-by: yxxhero <aiopsclub@163.com>
2025-11-15 11:16:08 +08: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
Benoit Tigeot
acf331a005
fix: improve plugin name validation err messages early via unmarshalling
- Add strict YAML unmarshalling for v1 plugins (d.KnownFields)
- Add comprehensive test coverage for validPluginName regex
- Maintain backwards compatibility for legacy plugins

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-11-14 16:21:37 +01:00
Benoit Tigeot
9e1e3d21c5
fix: Make invalid name error message more similar and move tests
Follow Scott comment\
https://github.com/helm/helm/pull/31491/files#r2524933784

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-11-14 16:13:23 +01:00
Benoit Tigeot
cf077ceb27
fix: focus only on plugin name but give more info about what we get
And improve test

Follow Scott comment:
> here I would have a list of valid and invalid names based on pattern, with a check and intended outcome for each one so that we comprehensively cover the rules.

https://github.com/helm/helm/pull/31491/files#r2524820312

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-11-14 16:13:23 +01:00
Benoit Tigeot
f4b139a82c
Make validation error similar and explicit for both metadatas
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-11-14 16:13:23 +01:00
Benoit Tigeot
c04e18e452
fix: improve plugin name validation error messages
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-11-14 16:13:23 +01:00
Scott Rigby
0ee89d2d4e
Merge pull request #31418 from tisonkun/typo
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 typo of public field
2025-11-10 13:56:39 -05:00
tison
90d01915f9
for all other similar cases
Signed-off-by: tison <wander4096@gmail.com>
2025-11-04 11:33:42 +08:00
Evans Mungai
558cea7458
chore: increase logging package test coverage
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2025-10-30 21:08:08 +00: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