327 Commits
Author SHA1 Message Date
Sam Darwin bc232c5312 fix(create): default httpRoute match to / instead of /headers (#32824)
Signed-off-by: sdarwin <samuel.d.darwin@gmail.com>
2026-11-01 12:43:10 -07:00
Scott Rigby c0039291c1 bump version to 4.3 (#32605)
Signed-off-by: Scott Rigby <scott@r6by.com>
2026-08-31 18:19:24 -04:00
George Jenkins babae796e3 chore: Cleanup deprecated and TODO comments
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2026-08-31 14:07:08 -07:00
George Jenkins ca6681ca55 chore: Fix independent-merge lint issues
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2026-08-31 13:35:39 -07:00
Benoit Tigeot 11e2010aeb refactor: remove per-file decompression size limit (#31748)
* refactor: remove per-file decompression size limit

Remove MaxDecompressedFileSize as it's no longer necessary after
migrating to a maintained JSON schema library (santhosh-tekuri/jsonschema/v6).
The original limit was added to protect against vulnerabilities in an
unmaintained library.

The total decompressed chart size limit (MaxDecompressedChartSize) remains
to protect against other attack vectors.

Partially resolves #30738

Related:
  - https://github.com/helm/helm/pull/30743

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>

* fix: deprecate MaxDecompressedFileSize instead of removing

As Matt suggested we should keep the variable until v5 as it can be used
because it is public.

Related:
- https://github.com/helm/helm/pull/31748#discussion_r2738518696

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>

* fix: enforce aggregate size budget on directory loading

Directory-based chart loading (`LoadDir`) used unbounded `os.ReadFile`
calls with no total size check. Archive loading already enforces
`MaxDecompressedChartSize` via a remaining-byte budget but directory
loading did not, leaving local charts and `file://` dependencies as
an unbounded memory path.

Add `ReadFileWithBudget` in the archive package and use it in both
v2 and v3 directory loaders so they track the same aggregate budget.

Ref: https://github.com/helm/helm/pull/31748#issuecomment-4138927643

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>

* fix: cap directory budget reads with LimitReader

Use `os.Open` + `io.LimitReader` instead of `os.ReadFile` in
`ReadFileWithBudget` so a file that grows between stat and read
cannot allocate unbounded memory.

Also fix `MaxDecompressedFileSize` doc comment to reflect it is
unused/deprecated, add nil guard on remaining, and check
`os.Stat` errors in tests.

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>

* test: add v3 directory loader budget test

Mirror the v2 `TestLoadDirExceedsBudget` test for the v3 loader
to prevent budget enforcement regressions in either path.

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>

* refactor(loader): make read budget configurable

Follow recommendations from https://github.com/helm/helm/pull/31748#discussion_r3058581419

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>

* fix(loader): export BudgetedReader for cross-package use

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>

* fix(loader): rename max param to avoid shadowing built-in

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>

---------

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2026-08-31 15:43:42 -04:00
Matt Farina b5b498b774 Updating the Go version
This is needed for goreleaser to create updates. Its latest release
needs it.

Updates needed for linting and to fix failed tests resulting from
Go std library changes.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2026-08-25 20:42:36 -04:00
George Jenkins 9b447b4048 Merge pull request #32485 from Mentigen/fix/stamp-mod-times-normalize
fix(chart): normalize StampModTimes timestamp to UTC/truncate + Chart.lock reproducibility test
2026-08-19 18:26:47 -07:00
Dean Chen fd4ed4952b test(loader): cover 8192-byte EOF boundary for LoadValues
Also drop the extra blank line before the test. Addresses review on
#32525.

Signed-off-by: Dean Chen <862469039@qq.com>
2026-08-08 19:45:24 +05:00
Dean Chen 601445e88c fix(loader): do not drop values files ending at a 4096-byte boundary
YAMLReader can return EOF without yielding the last line when that line
has no trailing newline and its length is a multiple of bufio's default
buffer. Read the file fully and ensure a trailing newline before parsing
so compact JSON values files are not silently ignored.

Fixes #32506

Signed-off-by: Dean Chen <862469039@qq.com>
2026-08-08 11:46:06 +05:00
Ilya Kiselev 3c3be926aa fix(chart): normalize StampModTimes timestamp + Chart.lock test
Closes #32396.

StampModTimes now normalizes the supplied time to UTC and truncates to
whole seconds before stamping. Without this, an SDK caller passing a
local-timezone or sub-second time.Time would produce a Chart.lock
generated: field with a timezone offset or fractional seconds, making
the lock file content non-reproducible across machines even when the
same SOURCE_DATE_EPOCH value is used — defeating the purpose of the
feature.

Also add:
- testdata/charts/chart-with-lock fixture: a minimal chart with a
  Chart.lock whose generated: timestamp predates SOURCE_DATE_EPOCH.
- TestRunWithSourceDateEpochStampsLockGenerated: packages the fixture
  with SourceDateEpoch set to a non-UTC, sub-second time.Time and
  asserts that the resulting archive's Chart.lock entry has both the
  correct tar modtime and the correct (normalized) generated: value in
  the marshaled YAML.

Signed-off-by: Ilya Kiselev <kis-ilya-a@yandex.ru>
2026-07-28 18:45:24 +03:00
Matthieu MOREL 24bbb46c62 chore: fix gofumpt issues
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-27 19:53:24 +02:00
Terry Howe 8eb65528be Merge pull request #32467 from mmorel-35/testify-assertions-pkg-3
chore(pkg): refactor: finer tests conversions to testify part 3
2026-07-24 12:03:52 -06:00
Terry Howe e29e06e97d Merge pull request #32466 from mmorel-35/testify-assertions-pkg-2
chore(pkg): refactor: finer tests conversions to testify part 2
2026-07-24 08:11:31 -06:00
Matthieu MOREL 828d01a878 chore(pkg): refactor: finer tests conversions to testify part 1
refactor: finer tests conversions to testify in pkg/strvals
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-24 14:20:03 +02:00
Matthieu MOREL 9a2be11e6f chore(pkg): refactor: finer tests conversions to testify part 3
refactor: finer tests conversions to testify in pkg/cmd
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-24 14:18:15 +02:00
Matthieu MOREL 4d9c03f51c chore(pkg): refactor: finer tests conversions to testify part 2
#### Description

refactor: finer tests conversions to testify in pkg/storage/driver
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-24 13:24:06 +02:00
Robert Sirchia 39231d01e1 Merge pull request #32435 from mmorel-35/testifylint-manual-assert-pkg-19
chore(pkg): refactor: convert tests to testify assert/require part 19
2026-07-23 12:19:45 -04:00
Terry Howe f65e3b72b0 Merge pull request #32438 from mmorel-35/testifylint-manual-assert-pkg-22
chore(pkg): refactor: convert tests to testify assert/require part 22
2026-07-22 14:12:54 -06:00
Terry Howe e5378ad47e Merge pull request #32437 from mmorel-35/testifylint-manual-assert-pkg-21
chore(pkg): refactor: convert tests to testify assert/require part 21
2026-07-22 14:12:14 -06:00
Terry Howe 76bf75c956 Merge pull request #32436 from mmorel-35/testifylint-manual-assert-pkg-20
chore(pkg): refactor: convert tests to testify assert/require part 20
2026-07-22 14:11:38 -06:00
Terry Howe bfb074a601 Merge pull request #32434 from mmorel-35/testifylint-manual-assert-pkg-18
chore(pkg): refactor: convert tests to testify assert/require part 18
2026-07-22 14:09:08 -06:00
Terry Howe 54b915e38a Merge pull request #32433 from mmorel-35/testifylint-manual-assert-pkg-17
chore(pkg): refactor: convert tests to testify assert/require part 17
2026-07-22 14:08:36 -06:00
Terry Howe d8a4a8287b Merge pull request #32432 from mmorel-35/testifylint-manual-assert-pkg-16
chore(pkg): refactor: convert tests to testify assert/require part 16
2026-07-22 14:08:08 -06:00
Terry Howe a6409a7eba Merge pull request #32430 from mmorel-35/testifylint-manual-assert-pkg-15
chore(pkg): refactor: convert tests to testify assert/require part 15
2026-07-22 14:07:34 -06:00
Terry Howe ea9e38035d Merge pull request #32429 from mmorel-35/testifylint-manual-assert-pkg-14
chore(pkg): refactor: convert tests to testify assert/require part 14
2026-07-22 14:07:10 -06:00
Terry Howe da9e2b6bab Merge pull request #32428 from mmorel-35/testifylint-manual-assert-pkg-13
chore(pkg): refactor: convert tests to testify assert/require part 13
2026-07-22 14:06:31 -06:00
Terry Howe 00c2e025e5 Merge pull request #32424 from mmorel-35/testifylint-manual-assert-pkg-9
chore(pkg): refactor: convert tests to testify assert/require part 9
2026-07-22 14:04:09 -06:00
Terry Howe 78796e26bc Merge pull request #32423 from mmorel-35/testifylint-manual-assert-pkg-8
chore(pkg): refactor: convert tests to testify assert/require part 8
2026-07-22 14:03:30 -06:00
Terry Howe eea1defc88 Merge pull request #32422 from mmorel-35/testifylint-manual-assert-pkg-7
chore(pkg): refactor: convert tests to testify assert/require part 7
2026-07-22 14:02:56 -06:00
Terry Howe ce13e3b658 Merge pull request #32417 from mmorel-35/testifylint-manual-assert-pkg-3
chore(pkg): refactor: convert tests to testify assert/require part 3
2026-07-21 16:31:14 -06:00
Matthieu MOREL 33c2839569 chore(pkg): refactor: convert tests to testify assert/require part 19
refactor: convert tests to testify assert/require in pkg/action
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-21 21:03:25 +02:00
Matthieu MOREL 0b1aa55cbb chore(pkg): refactor: convert tests to testify assert/require part 22
#### Description

refactor: convert tests to testify assert/require in pkg/action
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-21 20:21:21 +02:00
Matthieu MOREL a934b827fa chore(pkg): refactor: convert tests to testify assert/require part 21
#### Description

refactor: convert tests to testify assert/require in pkg/cmd
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-21 20:19:45 +02:00
Matthieu MOREL 1d4665e54c chore(pkg): refactor: convert tests to testify assert/require part 20
#### Description

refactor: convert tests to testify assert/require in pkg/cmd
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-21 20:18:27 +02:00
Matthieu MOREL fb8a62bf13 chore(pkg): refactor: convert tests to testify assert/require part 18
#### Description

refactor: convert tests to testify assert/require in pkg/cmd
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-21 20:16:55 +02:00
Matthieu MOREL 0fa9f7d427 chore(pkg): refactor: convert tests to testify assert/require part 16
#### Description

refactor: convert tests to testify assert/require in pkg/cmd
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-21 20:15:41 +02:00
Matthieu MOREL 4073566e28 chore(pkg): refactor: convert tests to testify assert/require part 17
#### Description

refactor: convert tests to testify assert/require in pkg/cmd
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-21 20:14:42 +02:00
Matthieu MOREL 71733656a5 chore(pkg): refactor: convert tests to testify assert/require part 15
#### Description

refactor: convert tests to testify assert/require in pkg/cmd
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-21 20:11:14 +02:00
Matthieu MOREL dc66ee7be7 chore(pkg): refactor: convert tests to testify assert/require part 14
refactor: convert tests to testify assert/require in pkg/storage/driver
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-21 20:09:45 +02:00
Matthieu MOREL aae82bf97a chore(pkg): refactor: convert tests to testify assert/require part 13
refactor: convert tests to testify assert/require in pkg
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-21 20:05:52 +02:00
Matthieu MOREL 13d1edc5f3 chore(pkg): refactor: convert tests to testify assert/require part 9
refactor: convert tests to testify assert/require in pkg/chart/common/util
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-21 19:47:49 +02:00
Matthieu MOREL e5f0e07b96 chore(pkg): refactor: convert tests to testify assert/require part 8
refactor: convert tests to testify assert/require in pkg
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-21 19:44:02 +02:00
Matthieu MOREL ca1767b813 chore(pkg): refactor: convert tests to testify assert/require part 7
refactor: convert tests to testify assert/require in pkg
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-21 19:37:34 +02:00
Terry Howe 3f1f55c4c8 Merge pull request #32420 from mmorel-35/testifylint-manual-assert-pkg-6
chore(pkg): refactor: convert tests to testify assert/require part 6
2026-07-21 11:12:26 -06:00
Matthieu MOREL 0844b3b8b5 chore(pkg): refactor: convert tests to testify assert/require part 6
refactor: convert tests to testify assert/require in pkg
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-21 07:49:59 +02:00
Matthieu MOREL 658a8fac15 chore(pkg): refactor: convert tests to testify assert/require part 4
refactor: convert tests to testify assert/require in pkg
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-21 07:39:39 +02:00
Matthieu MOREL df2d013517 chore(pkg): refactor: convert tests to testify assert/require part 3
refactor: convert tests to testify assert/require in pkg
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-21 07:36:29 +02:00
Abhay Chaurasiya 82be04d7f2 remove legacy import comments from remaining packages (#31933)
Pre-Go-modules import path comments (e.g. `// import "helm.sh/helm/v4/..."`)
are obsolete since Go 1.11 where go.mod is the authoritative module path.
These stale comments cause issues with downstream tooling such as Kythe.

Removes the legacy import comments from 64 files across 20 packages:
- cmd/helm
- internal/chart/v3/lint and sub-packages
- internal/plugin and sub-packages
- internal/release/v2/util
- pkg/chart/v2/lint and sub-packages
- pkg/cmd, pkg/engine, pkg/ignore, pkg/provenance
- pkg/registry
- pkg/release/v1/util
- pkg/repo/v1
- pkg/storage and pkg/storage/driver

Follows up on #31931 and #31932 which addressed pkg/kube.

Fixes #31846

Signed-off-by: abhay1999 <abhay.chaurasiya@example.com>
Signed-off-by: abhay1999 <abhaychaurasiya19@gmail.com>
2026-07-18 05:42:20 -06:00
Matthieu MOREL a2b1a60d51 fix: enhance error handling and improve test assertions (#32352)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-18 05:28:03 -06:00
Lohit Kolluri ad93b7df63 feat: honor SOURCE_DATE_EPOCH for chart archives (#32162)
* feat: honor SOURCE_DATE_EPOCH for chart archives

Add StampModTimes() on Chart struct to recursively set ModTime on
all chart file entries. CLI reads SOURCE_DATE_EPOCH env var and wires
through all 5 commands: package, install, upgrade, dep build, dep update.

Removes unused v3 duplicate source_date_epoch.go (YAGNI).
Inlines env var parsing to CLI layer from chart util.

Signed-off-by: Lohit Kolluri <lohitkolluri@gmail.com>

* docs: document SOURCE_DATE_EPOCH in environment variables help

Add a short entry for $SOURCE_DATE_EPOCH to the env var table shown
in 'helm help'. The variable is honored by 'helm package', 'install',
'upgrade', 'dep build', and 'dep update' to produce reproducible chart
archives. Full documentation belongs in helm-www.

Signed-off-by: Lohit Kolluri <lohitkolluri@gmail.com>

* fix: adapt SourceDateEpoch to upstream refactored dep check

Upstream/main restructured the dependency error handling in install.go
and upgrade.go from a nested-if block (if DependencyUpdate) to an
early-return pattern (if !DependencyUpdate). Adapt the feature's
Manager construction to match the new code structure.

Signed-off-by: Lohit Kolluri <lohitkolluri@gmail.com>

---------

Signed-off-by: Lohit Kolluri <lohitkolluri@gmail.com>
2026-07-14 19:22:09 -06:00