xBis7 commented on code in PR #68906:
URL: https://github.com/apache/airflow/pull/68906#discussion_r3690593321


##########
airflow-core/src/airflow/models/serialized_dag.py:
##########
@@ -762,6 +763,7 @@ def write_dag(
             session.merge(dag_version)
             # Update the latest DagCode
             DagCode.update_source_code(dag_id=dag.dag_id, fileloc=dag.fileloc, 
session=session)
+            stats.incr("dag.serialization_writes", tags={"dag_id": dag.dag_id, 
"bundle_name": bundle_name})

Review Comment:
   @potiuk There was a bug which was fixed in PR 
https://github.com/apache/airflow/pull/63871
   
   When the dag template contained a callable as a value, without any actual 
changes to the dag, every time that it was parsed, it would get reserialized. 
We noticed this issue by chance while monitoring the DB.
   
   I think it's good to keep both metrics but distinguish between them. Having 
a metric for even when there isn't an actual write, will help us identify such 
issues sooner.



-- 
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