Skip to content

fix: Reference schema files from the installed package for helm lint#7245

Merged
mergify[bot] merged 1 commit intoos-autoinst:masterfrom
okurz:fix/helm_chart
Apr 9, 2026
Merged

fix: Reference schema files from the installed package for helm lint#7245
mergify[bot] merged 1 commit intoos-autoinst:masterfrom
okurz:fix/helm_chart

Conversation

@okurz
Copy link
Copy Markdown
Member

@okurz okurz commented Apr 3, 2026

Motivation:

make test-helm-lint failed locally on openSUSE Slowroll as of 2026-03
because ct (Chart Testing tool) cannot find the default schema files
chart_schema.yaml and lintconf.yaml. This is likely due to a newer
chart-testing package (at time of writing problem appears with
3.14.0-1.2), which places these files in a non-standard location
(/usr/share/doc/packages/chart-testing/) instead of the default search
paths (., ~/.ct/, or /etc/ct/).

Design Choices:

  • Updated tools/test_helm_chart to check for schema files in the
    default search locations first.
  • If not found, it attempts to locate them in the package's
    documentation directory and passes them explicitly via
    --chart-yaml-schema and --lint-conf.
  • This approach avoids committing large schema files to the repository
    while ensuring compatibility with the newer system's package layout.

Benefits:

  • Restores the functionality of make test-helm-lint for local test
    runs and/or on newer systems
  • Ensures robustness across different installation layouts of the
    chart-testing tool.

Motivation:

`make test-helm-lint` failed locally on openSUSE Slowroll as of 2026-03
because `ct` (Chart Testing tool) cannot find the default schema files
`chart_schema.yaml` and `lintconf.yaml`.  This is likely due to a newer
`chart-testing` package (at time of writing problem appears with
3.14.0-1.2), which places these files in a non-standard location
(`/usr/share/doc/packages/chart-testing/`) instead of the default search
paths (`.`, `~/.ct/`, or `/etc/ct/`).

Design Choices:
- Updated `tools/test_helm_chart` to check for schema files in the
  default search locations first.
- If not found, it attempts to locate them in the package's
  documentation directory and passes them explicitly via
  `--chart-yaml-schema` and `--lint-conf`.
- This approach avoids committing large schema files to the repository
  while ensuring compatibility with the newer system's package layout.

Benefits:
- Restores the functionality of `make test-helm-lint` for local test
  runs and/or on newer systems
- Ensures robustness across different installation layouts of the
  `chart-testing` tool.
@mergify mergify bot merged commit e466faa into os-autoinst:master Apr 9, 2026
51 checks passed
@okurz okurz deleted the fix/helm_chart branch April 9, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants