Skip to content

Update yamale dependency to version > 6.0 for Python 3.14 compatibility #189

@pierluigilenoci

Description

@pierluigilenoci

Description

The current version of chart-testing-action includes yamale version 4.x, which is incompatible with Python 3.14 due to the removal of deprecated AST attributes (ast.Num, ast.Str, etc.). This causes chart linting to fail when running on systems with Python 3.14.

Current Behavior

Chart linting fails with the following error during YAML schema validation:

Validating /home/runner/work/manifests/manifests/helm/oauth2-proxy/Chart.yaml...
Traceback (most recent call last):
  File "/opt/hostedtoolcache/ct/3.12.0/amd64/venv/bin/yamale", line 7, in <module>
    sys.exit(main())
  File "/opt/hostedtoolcache/ct/3.12.0/amd64/venv/lib/python3.14/site-packages/yamale/command_line.py", line 124, in main
    _router(args.path, args.schema, args.cpu_num, args.parser, not args.no_strict)
  ...
  File "/opt/hostedtoolcache/ct/3.12.0/amd64/venv/lib/python3.14/site-packages/yamale/syntax/parser.py", line 22, in _validate_expr
    ast.Constant, ast.Num, ast.Str, ast.Bytes, ast.NameConstant]
                  ^^^^^^^
AttributeError: module 'ast' has no attribute 'Num'

failed linting charts: failed processing charts
Error: Process completed with exit status 1.

Expected Behavior

Chart linting should complete successfully on Python 3.14.

Proposed Solution

Update the yamale dependency to version > 6.0, which includes Python 3.14 compatibility and replaces the deprecated AST attributes with ast.Constant.

Reference: yamale releases

Additional Context

Workaround

Currently, users can work around this by explicitly pinning Python to version 3.12 or earlier in their workflows, but this is not a sustainable long-term solution.

Thank you for maintaining this valuable tool!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions