Closed pindge closed 2 years ago
@pindge can you describe your setup?
Do you have a way to reproduce this behavior?
@pindge can you describe your setup?
Do you have a way to reproduce this behavior?
git clone https://github.com/GeoscienceAustralia/dea-airflow.git
cd dea-airflow
git checkout develop
mkdir ./logs
echo -e "AIRFLOW_UID=$(id -u)\nAIRFLOW_GID=0" >> .env
docker-compose up airflow-init
docker-compose up
via web browser
username: airflow
and password:airflow
dea_public_data_sns_streamline_indexing
/admin/metrics/
end pointLikely due to this line
params={"labels": {"env": "dev"}},
here is the snippets, I am going to fix this, but will leave this issue open
# THE DAG
dag = DAG(
"dea_public_data_sns_streamline_indexing",
doc_md=__doc__,
default_args=DEFAULT_ARGS,
schedule_interval="0 */1 * * *", # hourly
# schedule_interval=None, # for testing
catchup=False,
max_active_runs=1,
tags=["k8s", "sentinel-2", "streamline-indexing"],
params={"labels": {"env": "dev"}},
)
I got the same error the day before on Airflow 2.2.2 too.
I guessed from 2.2.2, the Param class has been changed
https://github.com/apache/airflow/blob/main/airflow/models/param.py#L36
so we need to change the way to get the labels
on
File "/home/airflow/.local/lib/python3.8/site-packages/airflow_exporter/prometheus_exporter.py", line 201, in get_dag_labels
labels = labels.get('__var', {})
This function (get_dag_labels
) runs well on Airflow 2.1.1
I'm looking into it