Open Mint2702 opened 1 week ago
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
Version 2.7 of Airflow is pretty old and un-maintained. I'd propose in general to update. There might numerous fixes and improvements since then.
Can you test against the most recent Airflow 2.10 version?
Apache Airflow version
Other Airflow 2 version (please specify below)
If "Other Airflow 2 version" selected, which one?
2.7.1
What happened?
When running two schedulers in Airflow, I have encountered an issue where the listener responsible for sending custom metrics using the StatsD exporter is triggered twice. This happens specifically when the DAG state changes, and the listener is called in both
on_dag_run_failed
andon_dag_run_success
.Key Observations:
What you think should happen instead?
Listener should be called only once per event, even if two schedulers are running. The metric should only be sent once when the DAG state changes, such as on DAG success or failure.
How to reproduce
on_dag_run_failed
,on_dag_run_success
).Operating System
Ubuntu
Versions of Apache Airflow Providers
No response
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
Anything else?
Listener code:
Metric sending code:
Are you willing to submit PR?
Code of Conduct