Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package helm for openSUSE:Factory checked in at 2025-12-15 11:58:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/helm (Old) and /work/SRC/openSUSE:Factory/.helm.new.1939 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "helm" Mon Dec 15 11:58:44 2025 rev:92 rq:1322790 version:4.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/helm/helm.changes 2025-11-26 17:15:06.421356775 +0100 +++ /work/SRC/openSUSE:Factory/.helm.new.1939/helm.changes 2025-12-15 12:04:46.331418404 +0100 @@ -1,0 +2,12 @@ +Thu Dec 11 07:00:08 UTC 2025 - Johannes Kastl <[email protected]> + +- Update to version 4.0.2: + * fix: prevent reporting fallback on version when none specified + * fix: prevent segmentation violation on empty yaml in multidoc + * Ignore duplicated URN in logs + * jsonschema: warn and ignore unresolved URN $ref to match + v3.18.4 + * Publish Helm v4 -> `helm-latest-version` + * fix: Fix Helm v4 release distribtion/get-helm-3 script + +------------------------------------------------------------------- Old: ---- helm-4.0.1.obscpio New: ---- helm-4.0.2.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ helm.spec ++++++ --- /var/tmp/diff_new_pack.6g4Ic2/_old 2025-12-15 12:04:47.331460518 +0100 +++ /var/tmp/diff_new_pack.6g4Ic2/_new 2025-12-15 12:04:47.331460518 +0100 @@ -17,7 +17,7 @@ Name: helm -Version: 4.0.1 +Version: 4.0.2 Release: 0 Summary: The Kubernetes Package Manager License: Apache-2.0 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.6g4Ic2/_old 2025-12-15 12:04:47.363461866 +0100 +++ /var/tmp/diff_new_pack.6g4Ic2/_new 2025-12-15 12:04:47.371462203 +0100 @@ -5,7 +5,7 @@ <param name="exclude">.git</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> - <param name="revision">v4.0.1</param> + <param name="revision">v4.0.2</param> <param name="changesgenerate">enable</param> </service> <service name="set_version" mode="manual"> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.6g4Ic2/_old 2025-12-15 12:04:47.395463214 +0100 +++ /var/tmp/diff_new_pack.6g4Ic2/_new 2025-12-15 12:04:47.399463382 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/helm/helm.git</param> - <param name="changesrevision">12500dd401faa7629f30ba5d5bff36287f3e94d3</param></service></servicedata> + <param name="changesrevision">94659f25033af6eb43fc186c24e6c07b1091800b</param></service></servicedata> (No newline at EOF) ++++++ helm-4.0.1.obscpio -> helm-4.0.2.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-4.0.1/internal/chart/v3/lint/rules/crds.go new/helm-4.0.2/internal/chart/v3/lint/rules/crds.go --- old/helm-4.0.1/internal/chart/v3/lint/rules/crds.go 2025-11-24 14:57:30.000000000 +0100 +++ new/helm-4.0.2/internal/chart/v3/lint/rules/crds.go 2025-12-10 21:25:38.000000000 +0100 @@ -80,8 +80,10 @@ return } - linter.RunLinterRule(support.ErrorSev, fpath, validateCrdAPIVersion(yamlStruct)) - linter.RunLinterRule(support.ErrorSev, fpath, validateCrdKind(yamlStruct)) + if yamlStruct != nil { + linter.RunLinterRule(support.ErrorSev, fpath, validateCrdAPIVersion(yamlStruct)) + linter.RunLinterRule(support.ErrorSev, fpath, validateCrdKind(yamlStruct)) + } } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-4.0.1/internal/chart/v3/lint/rules/crds_test.go new/helm-4.0.2/internal/chart/v3/lint/rules/crds_test.go --- old/helm-4.0.1/internal/chart/v3/lint/rules/crds_test.go 2025-11-24 14:57:30.000000000 +0100 +++ new/helm-4.0.2/internal/chart/v3/lint/rules/crds_test.go 2025-12-10 21:25:38.000000000 +0100 @@ -17,6 +17,8 @@ package rules import ( + "os" + "path/filepath" "testing" "github.com/stretchr/testify/assert" @@ -34,3 +36,31 @@ assert.Len(t, res, 1) assert.ErrorContains(t, res[0].Err, "not a directory") } + +// multi-document YAML with empty documents would panic +func TestCrdWithEmptyDocument(t *testing.T) { + chartDir := t.TempDir() + + os.WriteFile(filepath.Join(chartDir, "Chart.yaml"), []byte( + `apiVersion: v1 +name: test +version: 0.1.0 +`), 0644) + + // CRD with comments before --- (creates empty document) + crdsDir := filepath.Join(chartDir, "crds") + os.Mkdir(crdsDir, 0755) + os.WriteFile(filepath.Join(crdsDir, "test.yaml"), []byte( + `# Comments create empty document +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: test.example.io +`), 0644) + + linter := support.Linter{ChartDir: chartDir} + Crds(&linter) + + assert.Len(t, linter.Messages, 0) +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-4.0.1/pkg/chart/common/util/jsonschema.go new/helm-4.0.2/pkg/chart/common/util/jsonschema.go --- old/helm-4.0.1/pkg/chart/common/util/jsonschema.go 2025-11-24 14:57:30.000000000 +0100 +++ new/helm-4.0.2/pkg/chart/common/util/jsonschema.go 2025-12-10 21:25:38.000000000 +0100 @@ -24,6 +24,7 @@ "log/slog" "net/http" "strings" + "sync" "time" "github.com/santhosh-tekuri/jsonschema/v6" @@ -142,6 +143,7 @@ "file": jsonschema.FileLoader{}, "http": newHTTPURLLoader(), "https": newHTTPURLLoader(), + "urn": urnLoader{}, } compiler := jsonschema.NewCompiler() @@ -164,6 +166,35 @@ return nil } +// URNResolverFunc allows SDK to plug a URN resolver. It must return a +// schema document compatible with the validator (e.g., result of +// jsonschema.UnmarshalJSON). +type URNResolverFunc func(urn string) (any, error) + +// URNResolver is the default resolver used by the URN loader. By default it +// returns a clear error. +var URNResolver URNResolverFunc = func(urn string) (any, error) { + return nil, fmt.Errorf("URN not resolved: %s", urn) +} + +// urnLoader implements resolution for the urn: scheme by delegating to +// URNResolver. If unresolved, it logs a warning and returns a permissive +// boolean-true schema to avoid hard failures (back-compat behavior). +type urnLoader struct{} + +// warnedURNs ensures we log the unresolved-URN warning only once per URN. +var warnedURNs sync.Map + +func (l urnLoader) Load(urlStr string) (any, error) { + if doc, err := URNResolver(urlStr); err == nil && doc != nil { + return doc, nil + } + if _, loaded := warnedURNs.LoadOrStore(urlStr, struct{}{}); !loaded { + slog.Warn("unresolved URN reference ignored; using permissive schema", "urn", urlStr) + } + return jsonschema.UnmarshalJSON(strings.NewReader("true")) +} + // Note, JSONSchemaValidationError is used to wrap the error from the underlying // validation package so that Helm has a clean interface and the validation package // could be replaced without changing the Helm SDK API. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-4.0.1/pkg/chart/common/util/jsonschema_test.go new/helm-4.0.2/pkg/chart/common/util/jsonschema_test.go --- old/helm-4.0.1/pkg/chart/common/util/jsonschema_test.go 2025-11-24 14:57:30.000000000 +0100 +++ new/helm-4.0.2/pkg/chart/common/util/jsonschema_test.go 2025-12-10 21:25:38.000000000 +0100 @@ -376,3 +376,16 @@ t.Fatalf("expected an error when subchart values have invalid type, got nil") } } + +// Test that an unresolved URN $ref is soft-ignored and validation succeeds. +// it mimics the behavior of Helm 3.18.4 +func TestValidateAgainstSingleSchema_UnresolvedURN_Ignored(t *testing.T) { + schema := []byte(`{ + "$schema": "https://json-schema.org/draft-07/schema#", + "$ref": "urn:example:helm:schemas:v1:helm-schema-validation-conditions:v1/helmSchemaValidation-true" + }`) + vals := map[string]interface{}{"any": "value"} + if err := ValidateAgainstSingleSchema(vals, schema); err != nil { + t.Fatalf("expected no error when URN unresolved is ignored, got: %v", err) + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-4.0.1/pkg/chart/v2/lint/rules/crds.go new/helm-4.0.2/pkg/chart/v2/lint/rules/crds.go --- old/helm-4.0.1/pkg/chart/v2/lint/rules/crds.go 2025-11-24 14:57:30.000000000 +0100 +++ new/helm-4.0.2/pkg/chart/v2/lint/rules/crds.go 2025-12-10 21:25:38.000000000 +0100 @@ -80,8 +80,10 @@ return } - linter.RunLinterRule(support.ErrorSev, fpath, validateCrdAPIVersion(yamlStruct)) - linter.RunLinterRule(support.ErrorSev, fpath, validateCrdKind(yamlStruct)) + if yamlStruct != nil { + linter.RunLinterRule(support.ErrorSev, fpath, validateCrdAPIVersion(yamlStruct)) + linter.RunLinterRule(support.ErrorSev, fpath, validateCrdKind(yamlStruct)) + } } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-4.0.1/pkg/chart/v2/lint/rules/crds_test.go new/helm-4.0.2/pkg/chart/v2/lint/rules/crds_test.go --- old/helm-4.0.1/pkg/chart/v2/lint/rules/crds_test.go 2025-11-24 14:57:30.000000000 +0100 +++ new/helm-4.0.2/pkg/chart/v2/lint/rules/crds_test.go 2025-12-10 21:25:38.000000000 +0100 @@ -17,6 +17,8 @@ package rules import ( + "os" + "path/filepath" "testing" "github.com/stretchr/testify/assert" @@ -34,3 +36,31 @@ assert.Len(t, res, 1) assert.ErrorContains(t, res[0].Err, "not a directory") } + +// multi-document YAML with empty documents would panic +func TestCrdWithEmptyDocument(t *testing.T) { + chartDir := t.TempDir() + + os.WriteFile(filepath.Join(chartDir, "Chart.yaml"), []byte( + `apiVersion: v1 +name: test +version: 0.1.0 +`), 0644) + + // CRD with comments before --- (creates empty document) + crdsDir := filepath.Join(chartDir, "crds") + os.Mkdir(crdsDir, 0755) + os.WriteFile(filepath.Join(crdsDir, "test.yaml"), []byte( + `# Comments create empty document +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: test.example.io +`), 0644) + + linter := support.Linter{ChartDir: chartDir} + Crds(&linter) + + assert.Len(t, linter.Messages, 0) +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-4.0.1/pkg/repo/v1/index.go new/helm-4.0.2/pkg/repo/v1/index.go --- old/helm-4.0.1/pkg/repo/v1/index.go 2025-11-24 14:57:30.000000000 +0100 +++ new/helm-4.0.2/pkg/repo/v1/index.go 2025-12-10 21:25:38.000000000 +0100 @@ -215,7 +215,9 @@ } if constraint.Check(test) { - slog.Warn("unable to find exact version; falling back to closest available version", "chart", name, "requested", version, "selected", ver.Version) + if len(version) != 0 { + slog.Warn("unable to find exact version requested; falling back to closest available version", "chart", name, "requested", version, "selected", ver.Version) + } return ver, nil } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-4.0.1/scripts/get-helm-3 new/helm-4.0.2/scripts/get-helm-3 --- old/helm-4.0.1/scripts/get-helm-3 2025-11-24 14:57:30.000000000 +0100 +++ new/helm-4.0.2/scripts/get-helm-3 2025-12-10 21:25:38.000000000 +0100 @@ -114,7 +114,7 @@ checkDesiredVersion() { if [ "x$DESIRED_VERSION" == "x" ]; then # Get tag from release URL - local latest_release_url="https://get.helm.sh/helm-latest-version" + local latest_release_url="https://get.helm.sh/helm3-latest-version" local latest_release_response="" if [ "${HAS_CURL}" == "true" ]; then latest_release_response=$( curl -L --silent --show-error --fail "$latest_release_url" 2>&1 || true ) ++++++ helm.obsinfo ++++++ --- /var/tmp/diff_new_pack.6g4Ic2/_old 2025-12-15 12:04:49.867567321 +0100 +++ /var/tmp/diff_new_pack.6g4Ic2/_new 2025-12-15 12:04:49.871567489 +0100 @@ -1,5 +1,5 @@ name: helm -version: 4.0.1 -mtime: 1763992650 -commit: 12500dd401faa7629f30ba5d5bff36287f3e94d3 +version: 4.0.2 +mtime: 1765398338 +commit: 94659f25033af6eb43fc186c24e6c07b1091800b ++++++ vendor.tar.gz ++++++ /work/SRC/openSUSE:Factory/helm/vendor.tar.gz /work/SRC/openSUSE:Factory/.helm.new.1939/vendor.tar.gz differ: char 37, line 1
