-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin for listeners - on_dag_run_running hook ignored #31180
Comments
Hi @funes79 , Could you please try I checked with recent master (584a9f5) and the listener is being triggered. Here is the sample I used:
plugin: p.py
and after triggering, scheduller's logs show: |
I am sorry, I tested out now your code and test again my plugin both on 2.5.1 and 2.6.1rc2 and both works. I just somehow did not see those logged in the Kubernetes environment - as the log and print is only visible in the pod log but not in logs/scheduler/YYYY-MM-DD/folder/dag_file.py.log |
@funes79 -> maybe you can make a PR in our docs to clarify that behaviour if it was not clear? It should be as easy as clicking "Suggest a change on this page" at bottom right in the right page -> it will create a PR and you will be able to describe it in the way that will make it easy to see for others like you ? Then you can add |
@potiuk , if I understand correct, the issue might be related to logs (@funes79 please correct me if not). The logs of scheduler do not appear in scheduler's logs directory (like It might be related to wrapping logger for processing dag , the logs under _handle_dag_file_processing() does not appear in the log files (at least for me). Did not have a chance take a closer look yet. |
Yes, correct, it is not visible in the logs. |
cc: @mobuchowski -> maybe you have some good answers for that ? |
It does not run on the same process as
There are You're right, it should be better documented. |
@potiuk @mobuchowski Can I work on this? |
@vijayasarathib if you want to improve documentation, sure, go for it. |
…ignored Documentation update for Plugin for listeners - on_dag_run_running hook ignored
* Fixes: #31180 - Plugin for listeners - on_dag_run_running hook ignored Documentation update for Plugin for listeners - on_dag_run_running hook ignored Co-authored-by: Tzu-ping Chung <[email protected]>
* Fixes: #31180 - Plugin for listeners - on_dag_run_running hook ignored Documentation update for Plugin for listeners - on_dag_run_running hook ignored Co-authored-by: Tzu-ping Chung <[email protected]> (cherry picked from commit ab2c861)
Apache Airflow version
2.6.0
What happened
I created a plugin for custom listeners, the task level listeners works fine, but the dag level listeners are not triggered.
The docs states that listeners defined in
airflow/listeners/spec
should be supported.What you think should happen instead
The dag specs defined
airflow/listeners/spec/dagrun.py
should be workingHow to reproduce
Create a plugin and add the two hooks into a listeners.
Operating System
linux
Versions of Apache Airflow Providers
No response
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: