Commit graph

157 commits

Author SHA1 Message Date
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
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
Evans Mungai
b6eca1c0f1
Refactor logging functionality to use slog.Handler
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2025-10-22 15:26:48 +01:00
Evans Mungai
5ab4ca5490
Embed logging functionality to DRY code
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2025-10-22 13:55:12 +01:00
Evans Mungai
50e43f4017
nil logger should be handled by discard handler
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2025-10-22 00:40:03 +01:00
Evans Mungai
7a5816b106
Self review changes
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2025-10-21 23:53:09 +01:00
Evans Mungai
b1d4dc680d
feat: reinstate logger parameter to actions package
Fixes: #31399

Signed-off-by: Evans Mungai <mbuevans@gmail.com>
2025-10-21 22:48:51 +01:00
Matt Farina
9c958dec76 Making uninstall response generic
Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-10-10 11:49:08 -04:00
Matt Farina
f80cbe43d0 Moved release objects to enable versioning
Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-10-10 11:49:08 -04:00
Siew Kam Onn
1c8d5804e2 Refactor SQL tests to use recentUnixTimestamp for time arguments
Signed-off-by: Siew Kam Onn <kosiew@gmail.com>
2025-09-23 16:00:45 +08:00
Matthieu MOREL
157f0ba10a chore: enable thelper
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-05-16 10:25:08 +02:00
yetyear
03448d1d79 refactor: use maps.Copy for cleaner map handling
Signed-off-by: yetyear <flite@outlook.com>
2025-05-09 14:33:25 +08:00
findnature
ac8d2f9aed refactor: use slices.Contains to simplify code
Signed-off-by: findnature <cricis@aliyun.com>
2025-05-02 09:43:25 +08: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
a1c2f47c08
avoid using reflect.DeepEqual with errors
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-14 11:11:37 +02:00
Benoit Tigeot
a9b7732367
could remove embedded field X from selector
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-14 10:43:48 +02:00
Benoit Tigeot
cbaac7652d
Call slog directly instead of using a wrapper
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-10 15:35:36 +02:00
Benoit Tigeot
0c85456788
Leverage slog.Any for errors
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-07 18:26:48 +02:00
Benoit Tigeot
b2380720eb
Migrate to pure slog without a custom wrapper
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-07 16:46:08 +02:00
Benoit Tigeot
3db7ebc591
Fix missing logger to SQL in test
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-07 15:36:54 +02:00
Benoit Tigeot
b42767be40
Migrate more code to log adapter
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-07 15:36:52 +02:00
Benoit Tigeot
83cdffe4ae
Migrate to a dedicated internal package for slog adapter + migrate more
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-07 15:36:36 +02:00
Benoit Tigeot
fae2345edf
Demonstrate the impact of having Logger defined in kube package
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
2025-04-07 15:36:15 +02:00
linghuying
fc476f7235 chore: make function comment match function name
Signed-off-by: linghuying <1599935829@qq.com>
2025-03-20 22:18:28 +08:00
Matt Farina
e711488970
Move pkg/release to pkg/release/v1 to support v3 charts
This is part of HIP 20 which provides a means to have v3 charts
that live alongside v2 charts while having breaking changes.

The plan is to have a different release object for v3 chart
instances for at least a couple reasons:
1. So that the chart object on the release can be fundamentally
   different.
2. So that Helm v3 does not detect or try to work with instances
   of charts whose apiVersion it does not know about.

Note: it is expected that Helm v3 usage will be used long after
the Helm project no longer supports it. 5 years after Helm v2
had reached end-of-life there was still usage of it.

Note: The release util package is separate from the versioned
elements as it is planned to use generics to handle multiple
release object versions.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2025-02-26 10:14:15 -05:00
petercover
605b1a0cf7 chore: fix some comments
Signed-off-by: petercover <raowanxiang@outlook.com>
2025-01-23 00:38:38 +08:00
Matt Farina
2236294119 Updating to helm.sh/helm/v4
Since Helm is going through breaking changes with Helm v4, the version path to
Helm needs to be updated.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2024-12-26 16:33:51 -05:00
Justen Stall
62b5bdc9f6
restore error check in secrets.go
Signed-off-by: Justen Stall <39888103+justenstall@users.noreply.github.com>
2024-11-18 12:54:22 -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
Trent V.
f9183a522a
Merge branch 'helm:main' into main 2024-10-08 03:23:44 -05:00
Nathan Baulch
ef85fa7f2d
Grammar fixes
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
2024-09-14 10:30:31 +10:00
Nathan Baulch
ff9dd262e3
Fix typos
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
2024-09-14 10:29:56 +10:00
Robert Sirchia
d58d7b3762 Fixing all the linting errors
Cleaned up all the linting errors we are getting.

Signed-off-by: Robert Sirchia <rsirchia@outlook.com>
2024-03-11 17:13:34 -04:00
Trenton VanderWert
ab640a7177
added sprintf solution and found other possible overflow occurences
Signed-off-by: Trenton VanderWert <trenton.vanderwert@gmail.com>
2024-02-08 23:51:21 -06:00
Trenton VanderWert
4a45342887
changed Iota to FormatInt to allow int64 value preventing 2038 overflow
Signed-off-by: Trenton VanderWert <trenton.vanderwert@gmail.com>
2024-02-08 10:45:38 -06:00
Matt Farina
847369c184
Update to Go 1.21 for builds
Noteis:
1. This moves golangci scanning to a GitHub action. This will
   enable inline pointers to issues in the PR where linting fails.
2. Go 1.21 is specified in the go.mod because Kubernetes libs
   require it.
3. The lint issues were removed. Some were fixed while others
   were handled by skipping linting or using _ as an argument.
   Many of these can be refactored later for better cleanup.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2024-01-08 15:48:36 -05:00
Dmitry Chepurovskiy
250f0bd46e
Drop filterSystemLabels usage from Query method
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2023-10-13 20:48:26 +03:00
Dmitry Chepurovskiy
0ec47f8ec9
Apply review suggestions
Co-authored-by: French Ben <FrenchBen@users.noreply.github.com>
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2023-10-13 20:43:49 +03:00
Dmitry Chepurovskiy
e6d9b99255
Allow using label selectors for system labels for sql backend.
Fixes #12435

Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2023-10-03 03:42:46 +03:00
Dmitry Chepurovskiy
e219c756e0
Allow using label selectors for system labels for secrets and configmap
backends.

Fixes #12435

Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2023-10-03 03:17:40 +03:00
abrarcv170
4199be82b5
Increased release information key name max length.
Helm release names are limited to 53 characters. By default, Release information is stored in Kubernetes as secrets, and the secret's name structure follows the pattern "sh.helm.release.v1.<release name up to 53 characters>.v<release revision>." However, in the case of using an SQL backend, this release information key is stored in the release_v1 table, and the table constraint currently limits the key name length to 67 characters. This limitation may not be suitable for release names that are within Helm's 53-character limit and need to accommodate the additional "sh.helm.release.v1." prefix and the release revision suffix. 

Signed-off-by: abrarcv170 <78675575+abrarcv170@users.noreply.github.com>
2023-09-15 11:17:48 +05:30
Maxim Trofimov
4944acb341 fix conflict
Signed-off-by: Maxim Trofimov <qwerty65k@mail.ru>
2023-08-26 20:11:08 +03:00
Maxim Trofimov
6138e101aa add big tests
Signed-off-by: Maxim Trofimov <qwerty65k@mail.ru>
2023-08-26 20:09:28 +03:00
Maxim Trofimov
199784f711 fix conflict
Signed-off-by: Maxim Trofimov <qwerty65k@mail.ru>
2023-08-26 20:09:06 +03:00
Maxim Trofimov
b786cb40f0 fix
Signed-off-by: Maxim Trofimov <qwerty65k@mail.ru>
2023-08-26 20:05:50 +03:00
Maxim Trofimov
df5904d88a add check if all migrations already applied
Signed-off-by: Maxim Trofimov <qwerty65k@mail.ru>
2023-08-26 20:05:50 +03:00
Joe Julian
4ff7d90872
Merge remote-tracking branch 'upstream/main' into add-labels-to-install-upgrade 2023-08-23 10:42:16 -07:00
Dmitry Chepurovskiy
7b13ac9914
Added error in case try to supply custom label with name of system label during install/upgrade
Signed-off-by: Dmitry Chepurovskiy <me@dm3ch.net>
2023-07-25 17:55:05 +03: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