ephraimbuddy commented on code in PR #42913:
URL: https://github.com/apache/airflow/pull/42913#discussion_r1820811205


##########
airflow/example_dags/plugins/event_listener.py:
##########
@@ -164,9 +164,10 @@ def on_dag_run_running(dag_run: DagRun, msg: str):
     """
     print("Dag run  in running state")
     queued_at = dag_run.queued_at
-    dag_hash_info = dag_run.dag_hash
 
-    print(f"Dag information Queued at: {queued_at} hash info: {dag_hash_info}")
+    dag_version = dag_run.dag_version.version if dag_run.dag_version else None

Review Comment:
   Since it's a foreignkey ref, I decided to ensure the dag_version is always 
available by providing it in unittest. In normal run, the dag_version will 
always be available. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to