Commit Graph
24 Commits
Author SHA1 Message Date
Matthieu MOREL 157f0ba10a chore: enable thelper
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-05-16 10:25:08 +02:00
Matthieu MOREL 15b83a9959 fix: dep fs errors
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-04-25 21:58:19 +02:00
Matt Farina ed356cfca8 Fixing windows build
The package github.com/pkg/errors was removed via the pull request #13460.
This change did not correctly handle the case in the windows code and CI
did not exercise this to find the error.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-04-25 15:34:05 -04:00
Justen Stall 280a9ddbdb Merge branch 'main' into stdlib-errors-2
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2025-04-21 12:13:10 -04:00
Benoit Tigeot b2ac216763 func cleanUpDir is unused
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-14 10:36:23 +02:00
Benoit Tigeot a23b96276a var mu is unused (unused)
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-14 10:36:21 +02:00
Benoit Tigeot 7fe554e7a8 Fix naked return errors
> xinternal/third_party/dep/fs/fs.go:175:3: naked return in func `copyFile` with 59 lines of code (nakedret)

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-14 10:36:16 +02:00
Justen StallandGeorge Jenkins 8549a257d9 Update internal/third_party/dep/fs/fs.go
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2024-11-18 22:31:32 -05:00
Justen Stall 6aa19b8c92 more error wrapping uses
- replace os.IsNotExist with errors.Is and fs.ErrNotExist
- use %w directive

Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2024-11-18 12:54:09 -05:00
Justen Stall 63cf42a843 fix: replace "github.com/pkg/errors" with stdlib "errors" package
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2024-11-18 11:35:59 -05:00
Nathan Baulch ef85fa7f2d Grammar fixes
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
2024-09-14 10:30:31 +10:00
Matt Farina 4e7e939f19 Updating the Go version in go.mod
At this time both Go 1.19 and 1.20 are supported. The version
specified in the go.mod file is the minimum version we expect Helm
to be compiled against. This is the oldest supported version to
support environments where others compile Helm. The Helm project
is using Go 1.20 to build Helm itself.

Updating to Go 1.19 also includes dealing with io/ioutil
deprecation and some additional linting issues around staticcheck.
All the staticcheck issues were in test files so linting was
skipped for those.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2023-03-22 11:52:30 -04:00
Matt Farina 50c22ed7f9 Bump the Go version
Needed to gofmt source to meet changes in style

Signed-off-by: Matt Farina <matt.farina@suse.com>
2023-03-22 11:29:26 -04:00
Matthew Fisher 2878cc8079 replace +build with go:build
go:build is the new conditional compilation directive used to specify build constraints. It was introduced in Go 1.17. It is meant to replace the old +build directives.

Now that go.mod points to Go 1.17 we no longer need to support both
build flags.

Signed-off-by: Matthew Fisher <matt.fisher@fermyon.com>
2022-04-14 07:56:31 -07:00
Eng Zer Jun 2e3e22a003 test: use T.TempDir to create temporary test directory
The directory created by `T.TempDir` is automatically removed when the
test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-02-12 13:54:54 +08:00
Kally Fox f9b1445b63 refactor: use os instead of ioutil's ReadDir
Signed-off-by: Kally Fox <kallydev@gmail.com>
2021-07-08 21:28:42 +08:00
Matt Farina b21b009785 Merge pull request #7147 from pmacik/fix-unknown-userid
fs_test.go: Assume non-root user instead of failing the test.
2020-04-20 17:29:16 -04:00
Predrag Knezevic b83d3d415c fs_test: use os.Getuid() instead user.Current() to determine if a test is executed with root privileges.
This change lower the expectations on test env setup, i.e. tests could be executed in a container under a random UID,
without require an user in /etc/passwd

Signed-off-by: Predrag Knezevic <pknezevi@redhat.com>
2020-04-20 17:58:40 +02:00
Adam Reese c2da4fd53d ref(*): kubernetes v1.18 (#7831)
Upgrade Kubernetes libraries to v0.18.0

Add new lazy load KubernetesClientSet to avoid missing kubeconfig error

In kubernetes v1.18 kubeconfig validation was added.  Minikube and Kind
both remove kubeconfig when stopping clusters.  This causes and error
when running any helm commands because we initialize the client before
executing the command.

Signed-off-by: Adam Reese <adam@reese.io>
2020-04-13 08:40:38 -07:00
Nguyen Hai Truong 29cc5efc18 Remove duplicated words (#7336)
Although it is spelling mistakes, it might make an affects while reading.

Signed-off-by: Nguyen Hai Truong <truongnh@fujitsu.com>
2020-01-06 15:54:47 +00:00
Yagnesh Mistry ceb6bcb318 fix rename for helm dependency upgrade
This code was ported over from PR #5038, #6738 which were originally for helm
v2. The code contains functions from golang/dep/internal/fs for renaming files.

Signed-off-by: Yagnesh Mistry <ysh@live.in>
2019-10-23 02:11:00 +05:30
Taylor Thomas a758490f4d fix(chartutil): Uses copystructure for deep copy to avoid using gob
We already had the copystructure library in our dependencies transitively
through sprig. This solves a gob encoding bug that was causing issues with
chart testing

Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
2019-10-17 16:02:51 -05:00
Karuppiah Natarajan dfed8ab5e3 fix install storing computed values in release
this was partially fixed in #6430 but the fix only
worked for values without nesting. this PR fixes it.
this is done by doing a deep copy of values rather
than a top level keys copy. deep copy ensures
values are not mutated during coalesce()
execution which leads to bugs like #6659

the deep copy code has been copied from:

https://gist.github.com/soroushjp/0ec92102641ddfc3ad5515ca76405f4d

which is in turn inspired by this stackoverflow answer:
http://stackoverflow.com/a/28579297/1366283

Signed-off-by: Karuppiah Natarajan <karuppiah7890@gmail.com>
2019-10-17 16:37:19 +05:30
John Howard 7a22cb88d9 Drop dependency on k8s.io/kubernetes (#6609)
* Drop dependency on k8s.io/kubernetes

https://github.com/helm/helm/issues/6606

Depending on k8s.io/kubernetes is not recommended by Kubernetes, and
forces dependencies of Helm to also depend on them. We are only using
this dependency in one relatively isolated occurance, which can be
easily copied over rather than depending on the entire Kubernetes.

Copying this code is not very desirable, so if we don't want to have
this duplication we can at least use this PR as a PoC and see if we can
get Kubernetes to publish the controller package as a separate Go module
(see
https://github.com/kubernetes/kubernetes/issues/79384#issuecomment-538740756)

Signed-off-by: John Howard <howardjohn@google.com>

* Move to internal

Signed-off-by: John Howard <howardjohn@google.com>

* Exclude third_party from validate-license.sh

Signed-off-by: John Howard <howardjohn@google.com>
2019-10-11 14:13:25 +01:00