When using Python for another step than for running ct, you might be surprised that this action activates a Python environment which might mess up your later actions (I know I was).
We use Helm JSON schemas with references to external schemas to validate the user inputs when using our charts, but in order to decrease the amount of network traffic, we have created a Python script which de-references all external schemas and just saves them as one big JSON blob in values.schema.json. Now, when we want to use ct to lint and test changes to our charts, we would use something like:
However, this fails as chart-testing-action installs a virtual environment using the default Python installed on the runner (3.7 in my case), instead of just installing yamllint and yamale in the new v3.11.
I was able to work around the issue by creating a custom action, which just uses ct.sh where anything referencing venv is removed.
To solve this issue for others, I would suggest adding the option to disable the virtual environment - or even removing the virtual environment completely, as it just leads to confusion amongst users
When using Python for another step than for running
ct
, you might be surprised that this action activates a Python environment which might mess up your later actions (I know I was).We use Helm JSON schemas with references to external schemas to validate the user inputs when using our charts, but in order to decrease the amount of network traffic, we have created a Python script which de-references all external schemas and just saves them as one big JSON blob in
values.schema.json
. Now, when we want to usect
to lint and test changes to our charts, we would use something like:However, this fails as
chart-testing-action
installs a virtual environment using the default Python installed on the runner (3.7 in my case), instead of just installingyamllint
andyamale
in the new v3.11.I was able to work around the issue by creating a custom action, which just uses
ct.sh
where anything referencingvenv
is removed.To solve this issue for others, I would suggest adding the option to disable the virtual environment - or even removing the virtual environment completely, as it just leads to confusion amongst users