-
Notifications
You must be signed in to change notification settings - Fork 245
Description
When running chart-testing (ct) on a self-hosted GitHub Actions runner that has Python 3.14 installed, CT creates its own virtual environment using Python 3.14.
This results in immediate failures during schema validation due to Yamale being incompatible with Python 3.14.
What Happens
CT bundles its own Python virtualenv under the toolcache, for example:
/var/lib/github-action-runner/_work/_tool/ct/3.12.0/amd64/venv/lib/python3.14
When Python 3.14 is detected, CT installs a venv using that version.
The bundled Yamale version used by CT still relies on deprecated ast.Num and other removed AST nodes, which leads to errors such as:
Yamale / Python 3.14 error traceback
Linting chart "base-service => (version: "0.0.0", path: "base-service")"
Validating /var/lib/github-action-runner/runner/_work/helm-charts/helm-charts/base-service/Chart.yaml...
Traceback (most recent call last):
File "/var/lib/github-action-runner/runner/_work/_tool/ct/3.12.0/amd64/venv/bin/yamale", line 7, in <module>
sys.exit(main())
~~~~^^
File "/var/lib/github-action-runner/runner/_work/_tool/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 "/var/lib/github-action-runner/runner/_work/_tool/ct/3.12.0/amd64/venv/lib/python3.14/site-packages/yamale/command_line.py", line 104, in _router
_validate_single(root, schema_name, parser, strict)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/lib/github-action-runner/runner/_work/_tool/ct/3.12.0/amd64/venv/lib/python3.14/site-packages/yamale/command_line.py", line 69, in _validate_single
_validate(s, yaml_path, parser, strict, True)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/lib/github-action-runner/runner/_work/_tool/ct/3.12.0/amd64/venv/lib/python3.14/site-packages/yamale/command_line.py", line 28, in _validate
schema = yamale.make_schema(schema_path, parser)
File "/var/lib/github-action-runner/runner/_work/_tool/ct/3.12.0/amd64/venv/lib/python3.14/site-packages/yamale/yamale.py", line 15, in make_schema
s = Schema(raw_schemas[0], path, validators=validators)
File "/var/lib/github-action-runner/runner/_work/_tool/ct/3.12.0/amd64/venv/lib/python3.14/site-packages/yamale/schema/schema.py", line 17, in __init__
self._schema = self._process_schema(DataPath(),
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
schema_dict,
^^^^^^^^^^^^
self.validators)
^^^^^^^^^^^^^^^^
File "/var/lib/github-action-runner/runner/_work/_tool/ct/3.12.0/amd64/venv/lib/python3.14/site-packages/yamale/schema/schema.py", line 36, in _process_schema
schema_data[key] = self._process_schema(path + DataPath(key),
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
data,
^^^^^
validators)
^^^^^^^^^^^
File "/var/lib/github-action-runner/runner/_work/_tool/ct/3.12.0/amd64/venv/lib/python3.14/site-packages/yamale/schema/schema.py", line 40, in _process_schema
schema_data = self._parse_schema_item(path,
schema_data,
validators)
File "/var/lib/github-action-runner/runner/_work/_tool/ct/3.12.0/amd64/venv/lib/python3.14/site-packages/yamale/schema/schema.py", line 47, in _parse_schema_item
return syntax.parse(expression, validators)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/lib/github-action-runner/runner/_work/_tool/ct/3.12.0/amd64/venv/lib/python3.14/site-packages/yamale/syntax/parser.py", line 40, in parse
_validate_expr(tree.body, validators)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/var/lib/github-action-runner/runner/_work/_tool/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'Impact
- Chart validation fails consistently.
- CT is unable to perform schema validation.
- Pipelines depending on CT break once Python 3.14 is present on the runner.
Expected Behavior
Ideally, CT should:
- avoid selecting incompatible Python versions when creating its internal virtual environment, or
- update the bundled dependencies to support Python 3.14, or
- consider moving away from Python-based validation altogether.
Workaround
We temporarily reverted our environment to Python 3.12, which restores compatibility.
Requested Fix
It would be greatly appreciated if future versions of CT could:
- add support for Python 3.14, or
- ensure that the internal virtual environment is fully isolated from system Python version changes, or
- consider adopting a Python-independent approach for schema validation.
This would help avoid compatibility issues in environments where system Python versions evolve independently of CT.