I'm attempting to use a Cluster Policy in Airflow 1.9. I followed the instructions in the official documentation, but it doesn't seem to be taking effect.
In my file at $AIRFLOW_HOME/config/airflow_local_settings.py
, I've defined the method as the docs instructed and it has the following signature:
def policy(task_instance):
Additional concerns:
- What Airflow component is actually running the policy code (is it the scheduler)?
- Is there a recommended way to unit test cluster policy code? If not, what about local testing?
Can anyone help me understand why this Cluster Policy isn't taking effect?
I'm using Airflow 1.9.
PYTHONPATH=$PYTHONPATH:/path/to/dir/ airflow scheduler
). – chris.mclennon