Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package helm-schema for openSUSE:Factory checked in at 2026-04-02 17:42:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/helm-schema (Old) and /work/SRC/openSUSE:Factory/.helm-schema.new.21863 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "helm-schema" Thu Apr 2 17:42:29 2026 rev:8 rq:1344283 version:0.23.0 Changes: -------- --- /work/SRC/openSUSE:Factory/helm-schema/helm-schema.changes 2026-03-11 20:56:50.189677170 +0100 +++ /work/SRC/openSUSE:Factory/.helm-schema.new.21863/helm-schema.changes 2026-04-02 17:43:34.365320173 +0200 @@ -1,0 +2,314 @@ +Tue Mar 31 05:03:28 UTC 2026 - Johannes Kastl <[email protected]> + +- Update to version 0.23.0: + * Bug Fixes + - adjust pre-commit-hooks by @dadav + - use better name for pre-commit task by @dadav + - adjust pre-commit-hooks by @dadav + - use latest version by @dadav + - map also contains arrays by @dadav + - move version into separate file by @dadav + - adjust version in pre-commit hooks by @dadav + - make exit code working by @dadav + - add global property if not present by @dadav + - use structs to parse the schema by @dadav + - make it working by @dadav + - make it working by @dadav + - remove required fields on dependencies by @dadav + - set to nil by @dadav + - clarify warning by @dadav + - use pointers by @dadav + - adjust pre-commit hook to only run on Chart.yaml and + values.yaml changes by @dadav + - move sorting to util package by @dadav + - adjust error message by @dadav + - make sure this matches nested files by @dadav + - use draft 7 by @dadav + - clarify help by @dadav + - Adjust linting hints by @dadav + - Adjust structs field alignment by @dadav + - Make required field working for properties by @dadav + - Set type to object if properties are used by @dadav + - Be sure to only start on valid yaml by @dadav + - convert upper to lower case in help for consistency + typo by + @Grraahaam + - improve troubleshooting by @Grraahaam + - omit topology sorting when --no-dependencies by @Grraahaam + - Update dependencies by @dadav + - Make it possible to sort charts with same name by @dadav + - Update dependencies by @dadav + - Update deps by @dadav + - Adjust version and options by @dadav + - Should run in the end by @dadav + - Use alias if defined by @dadav + - Make newline optional by @dadav + - Should consider all possible types by @dadav + - put schema reference below document start + - adding empty line after yaml-language-server, keeping + distance from other content + - also remove helm-docs tags when not running with + dontRemoveHelmDocsPrefix + - remove left over #\n lines from description + - Use TrimPrefix instead of TrimLeft by @dadav + - Fail test if helm-schema fails by @dadav + - Adjust changed url by @dadav + - Add example to e2e tests by @dadav + - Adjust lint hints by @dadav + - Dupplicate charts are ok by @dadav + - Do not set type on items by @dadav + - Adjust test by @dadav + - Ghcr login by @dadav + - Permissions by @dadav + - Adjust workdir to /home/helm-schema by @dadav + - Format code by @dadav + - Use single lines by @dadav + - update module github.com/masterminds/semver/v3 to v3.3.1 by + @renovate[bot] + - update module github.com/deckarep/golang-set/v2 to v2.7.0 by + @renovate[bot] + - update module github.com/santhosh-tekuri/jsonschema/v5 to v6 + by @renovate[bot] + - Use latest jsonschema version by @dadav + - update module github.com/magiconair/properties to v1.8.8 by + @renovate[bot] + - Check custom annotations more dynamically by @dadav + - update module github.com/magiconair/properties to v1.8.9 by + @renovate[bot] + - Fix some bugs, add comments by @dadav + - Split validation in smaller ones by @dadav + - update module github.com/stretchr/testify to v1.10.0 by + @renovate[bot] + - Make it work again by @dadav + - Decrease verbosity by @dadav + - Add type if not set by user by @dadav + - update module github.com/spf13/viper to v1.21.0 by + @renovate[bot] + - update module github.com/santhosh-tekuri/jsonschema/v6 to + v6.0.2 by @renovate[bot] + - update module github.com/magiconair/properties to v1.8.10 by + @renovate[bot] + - uniqueItems test case, must be bool by @alexwiedermann + - update module github.com/spf13/cobra to v1.10.1 by + @renovate[bot] + - Omit required field for non-object schema by @giovanism + - bug in path when using absolute by @nomalord + - changed naming of chart searching + archive opening by + @nomalord + - warning message for dependencies by @nomalord + - Claude fixed some bugs by @dadav + - Use buildx action by @dadav + - Remove deprecated goreleaser functions by @dadav + - Add missing steps in build workflow by @dadav + - update module github.com/spf13/cobra to v1.10.2 (#163) by + @renovate[bot] + - resolve deadlock issues causing 5-hour test hangs by @dadav + - Action secret issue fixed by @dadav + - Signing issue by @dadav + - resolve race conditions, type assertions, and convert + log.Fatal to error returns by @dadav + - Fixes #139 by @dadav + - update module github.com/sirupsen/logrus to v1.9.4 (#171) by + @renovate[bot] + - update PGP signing method to use clearsign format (#172) by + @eranor + - correct provenance file format by @eranor + - preserve indentation and flush buffer on uncommented lines + (#179) by @damemi + - Fixed various bugs and improved docs by @dadav + - respect @schema.root when separated from first key by blank + lines by @TvdW + - Add missing required in root schema by @dadav + * Chores + - Add cliff support by @dadav + - Add release notes to gitignore by @dadav + - Adjust goreleaser includes by @dadav + - Adjust renovate config by @dadav + - Update dependencies by @dadav + - Use latest version by @dadav + - Version++ by @dadav + - add github workflows by @dadav + - add goreleaser config by @dadav + - add license file by @dadav + - adjust comments by @dadav + - adjust go version in github action by @dadav + - adjust release tarball name by @dadav + - adjust workflow name by @dadav + - bump golang.org/x/crypto from 0.21.0 to 0.31.0 by + @dependabot[bot] + - bump versions by @dadav + - don't ignore values.yaml example by @Grraahaam + - exclude chore commits by @dadav + - go mod tidy by @dadav + - ignoring vscode files by @Grraahaam + - keeping original singular eol available + - limit arch support by @dadav + - pin dependencies (#168) by @renovate[bot] + - pin dependencies by @renovate[bot] + - pin orhun/git-cliff-action action to c93ef52 (#199) by + @renovate[bot] + - remove old comment by @dadav + - update actions/checkout action to v4 by @renovate[bot] + - update actions/checkout action to v5 by @renovate[bot] + - update actions/checkout action to v6 (#160) by @renovate[bot] + - update actions/checkout digest to 08eba0b by @renovate[bot] + - update actions/checkout digest to 93cb6ef (#158) by + @renovate[bot] + - update actions/checkout digest to de0fac2 (#180) by + @renovate[bot] + - update actions/download-artifact digest to 3e5f45b (#200) by + @renovate[bot] + - update actions/download-artifact digest to d3f86a1 by + @renovate[bot] + - update actions/setup-go action to v5 by @renovate[bot] + - update actions/setup-go action to v6 by @renovate[bot] + - update actions/setup-go digest to 3041bf5 by @renovate[bot] + - update actions/setup-go digest to 4b73464 (#184) by + @renovate[bot] + - update actions/setup-go digest to 4dc6199 (#159) by + @renovate[bot] + - update actions/setup-go digest to 7a3fe6c (#170) by + @renovate[bot] + - update actions/setup-go digest to d35c59a by @renovate[bot] + - update actions/setup-go digest to f111f33 by @renovate[bot] + - update actions/upload-artifact digest to 65c4c4a by + @renovate[bot] + - update actions/upload-artifact digest to 6f51ac0 by + @renovate[bot] + - update actions/upload-artifact digest to ea165f8 by + @renovate[bot] + - update alpine docker tag to v3.21 by @renovate[bot] + - update alpine docker tag to v3.22 by @renovate[bot] + - update alpine docker tag to v3.23 (#164) by @renovate[bot] + - update alpine:3.21 docker digest to 5405e8f by @renovate[bot] + - update alpine:3.21 docker digest to 56fa17d by @renovate[bot] + - update alpine:3.23 docker digest to 2510918 (#175) by + @renovate[bot] + - update azure/setup-helm action to v5 (#203) by @renovate[bot] + - update azure/setup-helm digest to 1a275c3 (#176) by + @renovate[bot] + - update crazy-max/ghaction-import-gpg action to v7 (#192) by + @renovate[bot] + - update docker/login-action action to v4 (#193) by + @renovate[bot] + - update docker/login-action digest to 5e57cd1 by + @renovate[bot] + - update docker/login-action digest to c94ce9f (#177) by + @renovate[bot] + - update docker/setup-buildx-action action to v4 (#194) by + @renovate[bot] + - update docker/setup-qemu-action action to v4 (#195) by + @renovate[bot] + - update github artifact actions (#165) by @renovate[bot] + - update github artifact actions (#185) by @renovate[bot] + - update github artifact actions by @renovate[bot] + - update goreleaser/goreleaser-action action to v6 by + @renovate[bot] + - update goreleaser/goreleaser-action action to v7 (#183) by + @renovate[bot] + - update goreleaser/goreleaser-action digest to e435ccd by + @renovate[bot] + - update softprops/action-gh-release digest to 153bb8e (#201) + by @renovate[bot] + * Documentation + - clarify how helm-schema behaves by @dadav + - add logo by @dadav + - add license info to readme by @dadav + - make readme prettier by @dadav + - add info that you need to copy the config first by @dadav + - add deprecated annotation by @dadav + - add pre-commit badget by @dadav + - adjust badges by @dadav + - add go report badge by @dadav + - typo by @dadav + - adjust flags by @dadav + - add aur install method by @dadav + - adjust readme by @dadav + - add missing params by @dadav + - update help by @dadav + - add limitations by @dadav + - improve README by @Grraahaam + - improve README by @Grraahaam + - Add missing char by @dadav + - Adjust description and examples by @dadav + - add examples to README.md by @Grraahaam + - add values.yaml example by @Grraahaam + - add pre-commit config args by @Grraahaam + - improve examples by @Grraahaam + - Add missing docs for not and required by @dadav + - Typo by @dadav + - Adjust helm plugin install comand by @dadav + - Add comments by @dadav + - Improve wording (#154) by @dadav + - Add comment about tpl mapping by @dadav + - Clarify the key must be saved in gpg format by @dadav + * Features + - add additional option by @dadav + - add schema embeding by @dadav + - patch condition property into dependency chart by @dadav + - use topological sort by @dadav + - use another jsonschema library by @dadav + - add SchemaOrBool type by @dadav + - add patternProperties and use SchemaOrBool type for + additionalProperies by @dadav + - use SchemaOrBool by @dadav + - add prefixedItems by @dadav + - add option to disable removal of helm-docs prefix by @dadav + - ignore sorting error by @dadav + - Add possibility to skip the auto-generation of fields by + @ubergesundheit + - Also make it possible to skip required field by @dadav + - Also make it possible to skip additionalProperties field by + @dadav + - Make $ref from external source usable (#11) by @dadav + - Add possibility to parse comments by @dadav + - Add flag to insert schema reference to values file by @dadav + - Support semver in dependencies by @dadav + - Add support for not keyword by @dadav + - Add readOnly and writeOnly by @dadav + - Support array for required field by @dadav + - Add e2e tests by @dadav + - Add e2e test for default helm values by @dadav + - Add container image by @dadav + - Add MinLength and MaxLength by @dadav + - Support relative files in ref by @dadav + - Distribute as helm plugin by @amine7536 + - Support minItems and maxItems by @dadav + - Add helm-docs compatibility mode by @dadav + - Support yaml anchors by @dadav + - Add dependency filter functionality by @dadav + - Add tests for worker file by @dadav + - Add tests for errs.go by @dadav + - Add dont-add-global flag by @dadav + - Support ref in patternProperties by @dadav + - Support skipping of type generation by @dadav + - Support skipping of type generation by @dadav + - add support to uniqueitems by @alexwiedermann + - add tests; bump version by @alexwiedermann + - bump as minor by @alexwiedermann + - subchart auto-open archives by @nomalord + - Create arm64 image by @dadav + - Add signing by @dadav + - Add missing features by @dadav + - Add annotate functionality by @dadav + - add system pre-commit hook (#182) by @sergei-ivanov + - support patternProperties, definitions, and composition + keywords in @schema.root (#187) by @TvdW + - support Helm's import-values directive (#188) by @TvdW + - Merge found values file by @dadav ++++ 17 more lines (skipped) ++++ between /work/SRC/openSUSE:Factory/helm-schema/helm-schema.changes ++++ and /work/SRC/openSUSE:Factory/.helm-schema.new.21863/helm-schema.changes Old: ---- helm-schema-0.22.0.obscpio New: ---- helm-schema-0.23.0.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ helm-schema.spec ++++++ --- /var/tmp/diff_new_pack.vo46Vx/_old 2026-04-02 17:43:35.101350571 +0200 +++ /var/tmp/diff_new_pack.vo46Vx/_new 2026-04-02 17:43:35.101350571 +0200 @@ -17,7 +17,7 @@ Name: helm-schema -Version: 0.22.0 +Version: 0.23.0 Release: 0 Summary: Generate jsonschemas from helm charts License: MIT ++++++ _service ++++++ --- /var/tmp/diff_new_pack.vo46Vx/_old 2026-04-02 17:43:35.141352223 +0200 +++ /var/tmp/diff_new_pack.vo46Vx/_new 2026-04-02 17:43:35.145352388 +0200 @@ -3,7 +3,7 @@ <param name="url">https://github.com/dadav/helm-schema</param> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="revision">0.22.0</param> + <param name="revision">0.23.0</param> <param name="versionformat">@PARENT_TAG@</param> <param name="changesgenerate">enable</param> </service> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.vo46Vx/_old 2026-04-02 17:43:35.169353379 +0200 +++ /var/tmp/diff_new_pack.vo46Vx/_new 2026-04-02 17:43:35.173353545 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/dadav/helm-schema</param> - <param name="changesrevision">aa676429e4683d6d2704a9ca43ba82676439086e</param></service></servicedata> + <param name="changesrevision">884210a7a2b155160b33bb44631ada79189b2425</param></service></servicedata> (No newline at EOF) ++++++ helm-schema-0.22.0.obscpio -> helm-schema-0.23.0.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-schema-0.22.0/.pre-commit-config.yaml new/helm-schema-0.23.0/.pre-commit-config.yaml --- old/helm-schema-0.22.0/.pre-commit-config.yaml 2026-03-10 20:33:49.000000000 +0100 +++ new/helm-schema-0.23.0/.pre-commit-config.yaml 2026-03-30 18:53:58.000000000 +0200 @@ -1,7 +1,7 @@ --- repos: - repo: https://github.com/dadav/helm-schema - rev: 0.18.1 + rev: 0.22.0 hooks: - id: helm-schema # for all available options: helm-schema -h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-schema-0.22.0/CLAUDE.md new/helm-schema-0.23.0/CLAUDE.md --- old/helm-schema-0.22.0/CLAUDE.md 2026-03-10 20:33:49.000000000 +0100 +++ new/helm-schema-0.23.0/CLAUDE.md 2026-03-30 18:53:58.000000000 +0200 @@ -153,8 +153,10 @@ - Uses GPG to sign the provenance 2. **GitHub Actions Workflow**: `.github/workflows/release.yml` + - Generates release notes with `orhun/git-cliff-action@v4` using `cliff.toml` - Imports GPG private key from secrets (`GPG_PRIVATE_KEY`, `GPG_PASSPHRASE`) - Runs goreleaser to build and package binaries + - Updates the GitHub release body from `RELEASE_NOTES.md` - Signs all `.tar.gz` files with `sign-plugin.sh` - Uploads `.prov` files to GitHub releases @@ -162,6 +164,11 @@ - Archives include plugin files: `plugin.yaml`, `install-binary.sh`, `README.md`, `LICENSE` - Configured to sign checksums with GPG +4. **git-cliff Config**: `cliff.toml` + - Groups conventional commits into release note sections + - Uses GitHub metadata to link pull requests in generated release notes + - Generates only the latest tagged release notes in CI via `--latest --strip header` + ### Setup for Maintainers - See `.github/SETUP_SIGNING.md` for initial GPG key setup diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-schema-0.22.0/README.md new/helm-schema-0.23.0/README.md --- old/helm-schema-0.22.0/README.md 2026-03-10 20:33:49.000000000 +0100 +++ new/helm-schema-0.23.0/README.md 2026-03-30 18:53:58.000000000 +0200 @@ -75,6 +75,9 @@ # Verify the imported key fingerprint (expect: 806F 70D2 5667 D42A AE4E 07CE F587 0796 9D0F BFA5) gpg --fingerprint F58707969D0FBFA5 +# Export from kdx and save in old gpg format +gpg --export F58707969D0FBFA5 > ~/.gnupg/pubring.gpg + # Install with explicit verification helm plugin install https://github.com/dadav/helm-schema/releases/download/vX.Y.Z/helm-schema_X.Y.Z_Linux_x86_64.tar.gz --verify ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-schema-0.22.0/cliff.toml new/helm-schema-0.23.0/cliff.toml --- old/helm-schema-0.22.0/cliff.toml 1970-01-01 01:00:00.000000000 +0100 +++ new/helm-schema-0.23.0/cliff.toml 2026-03-30 18:53:58.000000000 +0200 @@ -0,0 +1,37 @@ +[changelog] +header = "" +body = """ +{% if version %}## {{ version }} - {{ timestamp | date(format="%Y-%m-%d") }} +{% else %}## Unreleased +{% endif %} + +{% for group, commits in commits | group_by(attribute="group") %} +### {{ group }} +{% for commit in commits %} +- {{ commit.message | split(pat="\n") | first | trim }}{% if commit.remote.pr_number %} ([#{{ commit.remote.pr_number }}](https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}/pull/{{ commit.remote.pr_number }})){% endif %}{% if commit.remote.username %} by @{{ commit.remote.username }}{% endif %} +{% endfor %} + +{% endfor %} +""" +trim = true + +[git] +conventional_commits = true +filter_unconventional = true +split_commits = false +protect_breaking_commits = false +filter_commits = true +tag_pattern = "v[0-9].*" +sort_commits = "oldest" +commit_parsers = [ + { message = "^feat", group = "Features" }, + { message = "^fix", group = "Bug Fixes" }, + { message = "^docs?", group = "Documentation" }, + { message = "^refactor", group = "Refactoring" }, + { message = "^test", group = "Testing" }, + { message = "^chore", group = "Chores" }, +] + +[remote.github] +owner = "dadav" +repo = "helm-schema" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-schema-0.22.0/cmd/helm-schema/main.go new/helm-schema-0.23.0/cmd/helm-schema/main.go --- old/helm-schema-0.22.0/cmd/helm-schema/main.go 2026-03-10 20:33:49.000000000 +0100 +++ new/helm-schema-0.23.0/cmd/helm-schema/main.go 2026-03-30 18:53:58.000000000 +0200 @@ -1,6 +1,7 @@ package main import ( + "encoding/json" "errors" "fmt" "os" @@ -320,6 +321,41 @@ } } + // For dependency charts with pre-existing schema files, load them instead of + // using the worker-generated schema from values.yaml + if !noDeps { + isDependencyChart := make(map[string]bool) + for _, result := range results { + if result.Chart == nil || len(result.Errors) > 0 { + continue + } + for _, dep := range result.Chart.Dependencies { + isDependencyChart[dep.Name] = true + } + } + for _, result := range results { + if result.Chart == nil || len(result.Errors) > 0 { + continue + } + if !isDependencyChart[result.Chart.Name] { + continue + } + schemaPath := filepath.Join(filepath.Dir(result.ChartPath), outFile) + schemaData, err := os.ReadFile(schemaPath) + if err != nil { + continue + } + var existingSchema schema.Schema + if err := json.Unmarshal(schemaData, &existingSchema); err != nil { + log.Warnf("Found existing %s for dependency %s but failed to parse it: %s", outFile, result.Chart.Name, err) + continue + } + log.Debugf("Using pre-existing schema for dependency chart %s", result.Chart.Name) + result.Schema = existingSchema + result.PreExistingSchema = true + } + } + conditionsToPatch := make(map[string][][]string) if !noDeps { for _, result := range results { @@ -507,6 +543,12 @@ // Hoist all nested definitions to the root level so $ref pointers resolve correctly result.Schema.HoistDefinitions() + // Skip writing output for dependency charts with pre-existing schema files + if result.PreExistingSchema { + log.Debugf("Skipping output for dependency chart %s: using pre-existing schema", result.Chart.Name) + continue + } + jsonStr, err := result.Schema.ToJson() if err != nil { log.Error(err) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-schema-0.22.0/cmd/helm-schema/version.go new/helm-schema-0.23.0/cmd/helm-schema/version.go --- old/helm-schema-0.22.0/cmd/helm-schema/version.go 2026-03-10 20:33:49.000000000 +0100 +++ new/helm-schema-0.23.0/cmd/helm-schema/version.go 2026-03-30 18:53:58.000000000 +0200 @@ -1,3 +1,3 @@ package main -var version string = "0.22.0" +var version string = "0.23.0" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-schema-0.22.0/go.mod new/helm-schema-0.23.0/go.mod --- old/helm-schema-0.22.0/go.mod 2026-03-10 20:33:49.000000000 +0100 +++ new/helm-schema-0.23.0/go.mod 2026-03-30 18:53:58.000000000 +0200 @@ -27,7 +27,7 @@ github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/pelletier/go-toml/v2 v2.3.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/sagikazarmark/locafero v0.12.0 // indirect @@ -37,9 +37,9 @@ github.com/spf13/pflag v1.0.10 // indirect github.com/subosito/gotenv v1.6.0 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/crypto v0.47.0 // indirect - golang.org/x/sys v0.40.0 // indirect - golang.org/x/text v0.33.0 // indirect + golang.org/x/crypto v0.49.0 // indirect + golang.org/x/sys v0.42.0 // indirect + golang.org/x/text v0.35.0 // indirect gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect - helm.sh/helm/v3 v3.20.0 // indirect + helm.sh/helm/v3 v3.20.1 // indirect ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-schema-0.22.0/go.sum new/helm-schema-0.23.0/go.sum --- old/helm-schema-0.22.0/go.sum 2026-03-10 20:33:49.000000000 +0100 +++ new/helm-schema-0.23.0/go.sum 2026-03-30 18:53:58.000000000 +0200 @@ -41,6 +41,8 @@ github.com/norwoodj/helm-docs v1.14.2/go.mod h1:qdo76rorOkPDme8nsV5e0JBAYrs56kzvZMYW83k1kgc= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= +github.com/pelletier/go-toml/v2 v2.3.0 h1:k59bC/lIZREW0/iVaQR8nDHxVq8OVlIzYCOJf421CaM= +github.com/pelletier/go-toml/v2 v2.3.0/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= @@ -75,10 +77,16 @@ go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4= +golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA= golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= +golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +golang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8= +golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -86,3 +94,5 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= helm.sh/helm/v3 v3.20.0 h1:2M+0qQwnbI1a2CxN7dbmfsWHg/MloeaFMnZCY56as50= helm.sh/helm/v3 v3.20.0/go.mod h1:rTavWa0lagZOxGfdhu4vgk1OjH2UYCnrDKE2PVC4N0o= +helm.sh/helm/v3 v3.20.1 h1:T8PodUaH1UwNvE+imUA2mIKjJItY8g7CVvLVP5g4NzI= +helm.sh/helm/v3 v3.20.1/go.mod h1:Fl1kBaWCpkUrM6IYXPjQ3bdZQfFrogKArqptvueZ6Ww= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-schema-0.22.0/pkg/schema/schema.go new/helm-schema-0.23.0/pkg/schema/schema.go --- old/helm-schema-0.22.0/pkg/schema/schema.go 2026-03-10 20:33:49.000000000 +0100 +++ new/helm-schema-0.23.0/pkg/schema/schema.go 2026-03-30 18:53:58.000000000 +0200 @@ -379,8 +379,8 @@ } // UnmarshalJSON implements custom JSON unmarshaling for Schema objects. -// It handles both "definitions" (Draft 7) and "$defs" (Draft 2019-09+) keywords, -// merging them into the Definitions field for consistent Draft 7 output. +// It handles "definitions" (Draft 7), "$defs" (Draft 2019-09+), custom +// annotations (prefixed with "x-"), and tracks explicit "const" fields. func (s *Schema) UnmarshalJSON(data []byte) error { // Create an alias type to avoid recursion type schemaAlias Schema @@ -391,7 +391,7 @@ return err } - // Parse raw JSON to check for $defs + // Parse raw JSON to check for $defs, custom annotations, and const var raw map[string]json.RawMessage if err := json.Unmarshal(data, &raw); err != nil { return err @@ -414,6 +414,28 @@ } } + // Track if const field was explicitly set (even to null) + if _, ok := raw["const"]; ok { + alias.constWasSet = true + } + + // Extract custom annotations (x-* prefixed keys) + knownKeys := s.getJsonKeys() + alias.CustomAnnotations = make(map[string]interface{}) + for key, rawValue := range raw { + if !strings.HasPrefix(key, CustomAnnotationPrefix) { + continue + } + if slices.Contains(knownKeys, key) { + continue + } + var value interface{} + if err := json.Unmarshal(rawValue, &value); err != nil { + return fmt.Errorf("failed to unmarshal custom annotation %s: %w", key, err) + } + alias.CustomAnnotations[key] = value + } + // Copy alias to the main struct *s = Schema(*alias) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-schema-0.22.0/pkg/schema/schema_test.go new/helm-schema-0.23.0/pkg/schema/schema_test.go --- old/helm-schema-0.22.0/pkg/schema/schema_test.go 2026-03-10 20:33:49.000000000 +0100 +++ new/helm-schema-0.23.0/pkg/schema/schema_test.go 2026-03-30 18:53:58.000000000 +0200 @@ -229,6 +229,37 @@ assert.Equal(t, schema.CustomAnnotations["x-custom-foo"], "bar") } +func TestUnmarshalJSON(t *testing.T) { + jsonData := `{ + "type": "object", + "x-custom-foo": "bar", + "x-kubernetes-preserve-unknown-fields": true, + "const": null, + "properties": { + "nested": { + "type": "string", + "x-nested-annotation": 42 + } + } + }` + + var schema Schema + err := json.Unmarshal([]byte(jsonData), &schema) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + assert.Equal(t, schema.Type, StringOrArrayOfString{"object"}) + assert.Equal(t, schema.CustomAnnotations["x-custom-foo"], "bar") + assert.Equal(t, schema.CustomAnnotations["x-kubernetes-preserve-unknown-fields"], true) + assert.Equal(t, schema.constWasSet, true) + + // Nested schema should also preserve custom annotations + if schema.Properties["nested"] == nil { + t.Fatal("expected nested property to exist") + } + assert.Equal(t, schema.Properties["nested"].CustomAnnotations["x-nested-annotation"], float64(42)) +} + func TestNewDraft7Keywords(t *testing.T) { tests := []struct { name string diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-schema-0.22.0/pkg/schema/worker.go new/helm-schema-0.23.0/pkg/schema/worker.go --- old/helm-schema-0.22.0/pkg/schema/worker.go 2026-03-10 20:33:49.000000000 +0100 +++ new/helm-schema-0.23.0/pkg/schema/worker.go 2026-03-30 18:53:58.000000000 +0200 @@ -13,11 +13,12 @@ ) type Result struct { - ChartPath string - ValuesPath string - Chart *chart.ChartFile - Schema Schema - Errors []error + ChartPath string + ValuesPath string + Chart *chart.ChartFile + Schema Schema + Errors []error + PreExistingSchema bool } func Worker( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-schema-0.22.0/plugin.yaml new/helm-schema-0.23.0/plugin.yaml --- old/helm-schema-0.22.0/plugin.yaml 2026-03-10 20:33:49.000000000 +0100 +++ new/helm-schema-0.23.0/plugin.yaml 2026-03-30 18:53:58.000000000 +0200 @@ -1,6 +1,6 @@ --- name: "schema" -version: "0.22.0" +version: "0.23.0" usage: "generate jsonschemas for your helm charts" description: "generate jsonschemas for your helm charts" command: "$HELM_PLUGIN_DIR/bin/helm-schema" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-schema-0.22.0/tests/preexisting-schema/dep-with-schema/Chart.yaml new/helm-schema-0.23.0/tests/preexisting-schema/dep-with-schema/Chart.yaml --- old/helm-schema-0.22.0/tests/preexisting-schema/dep-with-schema/Chart.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/helm-schema-0.23.0/tests/preexisting-schema/dep-with-schema/Chart.yaml 2026-03-30 18:53:58.000000000 +0200 @@ -0,0 +1,4 @@ +apiVersion: v2 +name: dep-with-schema +version: 1.0.0 +description: A dependency chart with its own schema diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-schema-0.22.0/tests/preexisting-schema/dep-with-schema/values.schema.json new/helm-schema-0.23.0/tests/preexisting-schema/dep-with-schema/values.schema.json --- old/helm-schema-0.22.0/tests/preexisting-schema/dep-with-schema/values.schema.json 1970-01-01 01:00:00.000000000 +0100 +++ new/helm-schema-0.23.0/tests/preexisting-schema/dep-with-schema/values.schema.json 2026-03-30 18:53:58.000000000 +0200 @@ -0,0 +1,22 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "port": { + "type": "integer", + "description": "The port to listen on", + "minimum": 1, + "maximum": 65535 + }, + "host": { + "type": "string", + "description": "The hostname to bind to", + "format": "hostname", + "x-custom-annotation": "preserve-me" + } + }, + "required": [ + "host", + "port" + ] +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-schema-0.22.0/tests/preexisting-schema/dep-with-schema/values.yaml new/helm-schema-0.23.0/tests/preexisting-schema/dep-with-schema/values.yaml --- old/helm-schema-0.22.0/tests/preexisting-schema/dep-with-schema/values.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/helm-schema-0.23.0/tests/preexisting-schema/dep-with-schema/values.yaml 2026-03-30 18:53:58.000000000 +0200 @@ -0,0 +1,2 @@ +port: 8080 +host: localhost diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-schema-0.22.0/tests/preexisting-schema/parent/Chart.yaml new/helm-schema-0.23.0/tests/preexisting-schema/parent/Chart.yaml --- old/helm-schema-0.22.0/tests/preexisting-schema/parent/Chart.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/helm-schema-0.23.0/tests/preexisting-schema/parent/Chart.yaml 2026-03-30 18:53:58.000000000 +0200 @@ -0,0 +1,8 @@ +apiVersion: v2 +name: parent +version: 1.0.0 +description: A parent chart depending on dep-with-schema +dependencies: + - name: dep-with-schema + version: 1.0.0 + repository: file://../dep-with-schema diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-schema-0.22.0/tests/preexisting-schema/parent/values.schema.expected.json new/helm-schema-0.23.0/tests/preexisting-schema/parent/values.schema.expected.json --- old/helm-schema-0.22.0/tests/preexisting-schema/parent/values.schema.expected.json 1970-01-01 01:00:00.000000000 +0100 +++ new/helm-schema-0.23.0/tests/preexisting-schema/parent/values.schema.expected.json 2026-03-30 18:53:58.000000000 +0200 @@ -0,0 +1,41 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "appName": { + "default": "myapp", + "title": "appName", + "type": "string" + }, + "dep-with-schema": { + "description": "A dependency chart with its own schema", + "properties": { + "host": { + "description": "The hostname to bind to", + "format": "hostname", + "type": "string", + "x-custom-annotation": "preserve-me" + }, + "port": { + "description": "The port to listen on", + "maximum": 65535, + "minimum": 1, + "type": "integer" + } + }, + "required": [], + "title": "dep-with-schema", + "type": "object" + }, + "global": { + "description": "Global values are values that can be accessed from any chart or subchart by exactly the same name.", + "required": [], + "title": "global", + "type": "object" + } + }, + "required": [ + "appName" + ], + "type": "object" +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-schema-0.22.0/tests/preexisting-schema/parent/values.yaml new/helm-schema-0.23.0/tests/preexisting-schema/parent/values.yaml --- old/helm-schema-0.22.0/tests/preexisting-schema/parent/values.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/helm-schema-0.23.0/tests/preexisting-schema/parent/values.yaml 2026-03-30 18:53:58.000000000 +0200 @@ -0,0 +1 @@ +appName: myapp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-schema-0.22.0/tests/run.sh new/helm-schema-0.23.0/tests/run.sh --- old/helm-schema-0.22.0/tests/run.sh 2026-03-10 20:33:49.000000000 +0100 +++ new/helm-schema-0.23.0/tests/run.sh 2026-03-30 18:53:58.000000000 +0200 @@ -60,4 +60,25 @@ rm -f ../import-values/parent/values.schema.json ../import-values/child/values.schema.json rm -f ../import-values/parent-complex/values.schema.json ../import-values/child-complex/values.schema.json +# Pre-existing schema test +echo "Testing pre-existing dependency schema" +dep_schema_before=$(cat ../preexisting-schema/dep-with-schema/values.schema.json) +../helm-schema -c ../preexisting-schema >/dev/null 2>&1 +if diff -y --suppress-common-lines <(jq --sort-keys . ../preexisting-schema/parent/values.schema.json) <(jq --sort-keys . ../preexisting-schema/parent/values.schema.expected.json); then + echo "✅: pre-existing dependency schema" +else + echo "❌: pre-existing dependency schema" + rc=1 +fi + +dep_schema_after=$(cat ../preexisting-schema/dep-with-schema/values.schema.json) +if [ "$dep_schema_before" = "$dep_schema_after" ]; then + echo "✅: dependency schema not overwritten" +else + echo "❌: dependency schema was overwritten" + rc=1 +fi + +rm -f ../preexisting-schema/parent/values.schema.json + exit "$rc" ++++++ helm-schema.obsinfo ++++++ --- /var/tmp/diff_new_pack.vo46Vx/_old 2026-04-02 17:43:35.405363127 +0200 +++ /var/tmp/diff_new_pack.vo46Vx/_new 2026-04-02 17:43:35.409363292 +0200 @@ -1,5 +1,5 @@ name: helm-schema -version: 0.22.0 -mtime: 1773171229 -commit: aa676429e4683d6d2704a9ca43ba82676439086e +version: 0.23.0 +mtime: 1774889638 +commit: 884210a7a2b155160b33bb44631ada79189b2425 ++++++ vendor.tar.gz ++++++ ++++ 54337 lines of diff (skipped)
