mirror of
https://github.com/helm/helm.git
synced 2026-04-21 06:06:56 -04:00
commit
2bfcedd7b6
15 changed files with 37 additions and 17 deletions
2
.github/workflows/build-test.yml
vendored
2
.github/workflows/build-test.yml
vendored
|
|
@ -22,7 +22,7 @@ jobs:
|
|||
- name: Setup Go
|
||||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # pin@5.1.0
|
||||
with:
|
||||
go-version: '1.22'
|
||||
go-version: '1.23'
|
||||
check-latest: true
|
||||
- name: Test source headers are present
|
||||
run: make test-source-headers
|
||||
|
|
|
|||
4
.github/workflows/golangci-lint.yml
vendored
4
.github/workflows/golangci-lint.yml
vendored
|
|
@ -18,9 +18,9 @@ jobs:
|
|||
- name: Setup Go
|
||||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # pin@5.1.0
|
||||
with:
|
||||
go-version: '1.22'
|
||||
go-version: '1.23'
|
||||
check-latest: true
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 #pin@6.1.1
|
||||
with:
|
||||
version: v1.58
|
||||
version: v1.62
|
||||
|
|
|
|||
2
.github/workflows/govulncheck.yml
vendored
2
.github/workflows/govulncheck.yml
vendored
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
- name: Setup Go
|
||||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # pin@5.1.0
|
||||
with:
|
||||
go-version: '1.22'
|
||||
go-version: '1.23'
|
||||
check-latest: true
|
||||
- name: govulncheck
|
||||
uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # pin@1.0.4
|
||||
|
|
|
|||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
|
@ -27,7 +27,7 @@ jobs:
|
|||
- name: Setup Go
|
||||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # pin@5.1.0
|
||||
with:
|
||||
go-version: '1.22.7'
|
||||
go-version: '1.23'
|
||||
|
||||
- name: Run unit tests
|
||||
run: make test-coverage
|
||||
|
|
@ -83,7 +83,7 @@ jobs:
|
|||
- name: Setup Go
|
||||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # pin@5.1.0
|
||||
with:
|
||||
go-version: '1.22'
|
||||
go-version: '1.23'
|
||||
check-latest: true
|
||||
|
||||
- name: Run unit tests
|
||||
|
|
|
|||
|
|
@ -23,3 +23,23 @@ linters-settings:
|
|||
local-prefixes: helm.sh/helm/v3
|
||||
dupl:
|
||||
threshold: 400
|
||||
issues:
|
||||
exclude-rules:
|
||||
# Helm, and the Go source code itself, sometimes uses these names outside their built-in
|
||||
# functions. As the Go source code has re-used these names it's ok for Helm to do the same.
|
||||
# Linting will look for redefinition of built-in id's but we opt-in to the ones we choose to use.
|
||||
- linters:
|
||||
- revive
|
||||
text: "redefines-builtin-id: redefinition of the built-in function append"
|
||||
- linters:
|
||||
- revive
|
||||
text: "redefines-builtin-id: redefinition of the built-in function clear"
|
||||
- linters:
|
||||
- revive
|
||||
text: "redefines-builtin-id: redefinition of the built-in function max"
|
||||
- linters:
|
||||
- revive
|
||||
text: "redefines-builtin-id: redefinition of the built-in function min"
|
||||
- linters:
|
||||
- revive
|
||||
text: "redefines-builtin-id: redefinition of the built-in function new"
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ func (o *pluginUninstallOptions) run(out io.Writer) error {
|
|||
}
|
||||
}
|
||||
if len(errorPlugins) > 0 {
|
||||
return errors.Errorf(strings.Join(errorPlugins, "\n"))
|
||||
return errors.New(strings.Join(errorPlugins, "\n"))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ func (o *pluginUpdateOptions) run(out io.Writer) error {
|
|||
}
|
||||
}
|
||||
if len(errorPlugins) > 0 {
|
||||
return errors.Errorf(strings.Join(errorPlugins, "\n"))
|
||||
return errors.New(strings.Join(errorPlugins, "\n"))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ func (s statusPrinter) WriteTable(out io.Writer) error {
|
|||
_, _ = fmt.Fprintf(out, "DESCRIPTION: %s\n", s.release.Info.Description)
|
||||
}
|
||||
|
||||
if s.showResources && s.release.Info.Resources != nil && len(s.release.Info.Resources) > 0 {
|
||||
if s.showResources && len(s.release.Info.Resources) > 0 {
|
||||
buf := new(bytes.Buffer)
|
||||
printFlags := get.NewHumanPrintFlags()
|
||||
typePrinter, _ := printFlags.ToPrinter("")
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -1,6 +1,6 @@
|
|||
module helm.sh/helm/v3
|
||||
|
||||
go 1.22.0
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ func (cfg *Configuration) execHook(rl *release.Release, hook release.HookEvent,
|
|||
|
||||
for _, h := range executingHooks {
|
||||
// Set default delete policy to before-hook-creation
|
||||
if h.DeletePolicies == nil || len(h.DeletePolicies) == 0 {
|
||||
if len(h.DeletePolicies) == 0 {
|
||||
// TODO(jlegrone): Only apply before-hook-creation delete policy to run to completion
|
||||
// resources. For all other resource types update in place if a
|
||||
// resource with the same name already exists and is owned by the
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ func (e Engine) initFunMap(t *template.Template) {
|
|||
log.Printf("[INFO] Missing required value: %s", warn)
|
||||
return "", nil
|
||||
}
|
||||
return val, errors.Errorf(warnWrap(warn))
|
||||
return val, errors.New(warnWrap(warn))
|
||||
} else if _, ok := val.(string); ok {
|
||||
if val == "" {
|
||||
if e.LintMode {
|
||||
|
|
@ -214,7 +214,7 @@ func (e Engine) initFunMap(t *template.Template) {
|
|||
log.Printf("[INFO] Missing required value: %s", warn)
|
||||
return "", nil
|
||||
}
|
||||
return val, errors.Errorf(warnWrap(warn))
|
||||
return val, errors.New(warnWrap(warn))
|
||||
}
|
||||
}
|
||||
return val, nil
|
||||
|
|
|
|||
|
|
@ -435,7 +435,7 @@ func (c *Client) Update(original, target ResourceList, force bool) (*Result, err
|
|||
case err != nil:
|
||||
return res, err
|
||||
case len(updateErrors) != 0:
|
||||
return res, errors.Errorf(strings.Join(updateErrors, " && "))
|
||||
return res, errors.New(strings.Join(updateErrors, " && "))
|
||||
}
|
||||
|
||||
for _, info := range original.Difference(target) {
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ func SelectorsForObject(object runtime.Object) (selector labels.Selector, err er
|
|||
case *batchv1.Job:
|
||||
selector, err = metav1.LabelSelectorAsSelector(t.Spec.Selector)
|
||||
case *corev1.Service:
|
||||
if t.Spec.Selector == nil || len(t.Spec.Selector) == 0 {
|
||||
if len(t.Spec.Selector) == 0 {
|
||||
return nil, fmt.Errorf("invalid service '%s': Service is defined without a selector", t.Name)
|
||||
}
|
||||
selector = labels.SelectorFromSet(t.Spec.Selector)
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ func generateChartOCIAnnotations(meta *chart.Metadata, creationTime string) map[
|
|||
chartOCIAnnotations = addToMap(chartOCIAnnotations, ocispec.AnnotationSource, meta.Sources[0])
|
||||
}
|
||||
|
||||
if meta.Maintainers != nil && len(meta.Maintainers) > 0 {
|
||||
if len(meta.Maintainers) > 0 {
|
||||
var maintainerSb strings.Builder
|
||||
|
||||
for maintainerIdx, maintainer := range meta.Maintainers {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ IFS=$'\n\t'
|
|||
find_files() {
|
||||
find . -not \( \
|
||||
\( \
|
||||
-wholename './vendor' \
|
||||
-wholename './.git' \
|
||||
-o -wholename '*testdata*' \
|
||||
-o -wholename '*third_party*' \
|
||||
\) -prune \
|
||||
|
|
|
|||
Loading…
Reference in a new issue