diff --git a/airflow-core/docs/faq.rst b/airflow-core/docs/faq.rst index 396c4d2fc4064..31e327a1c5a7a 100644 --- a/airflow-core/docs/faq.rst +++ b/airflow-core/docs/faq.rst @@ -379,6 +379,27 @@ How to avoid version inflation bash_command="echo {{ var.value.my_variable }}", ) +How to diagnose version inflation yourself +"""""""""""""""""""""""""""""""""""""""""" + +If your Dag version keeps increasing and it is not obvious which constructor argument is to blame, you +can identify the changing field by inspecting the serialized Dag rows directly. + +The most reliable way is to query the ``serialized_dag`` table in the metadata database and compare how +the serialized payload differs between two consecutive versions of the same Dag. The column that stores +the serialized Dag holds the structured data that Airflow hashes to decide whether a new version is +needed, so diffing two rows shows you exactly which field changed between parses. + +Once you spot the changing field, trace it back to the place in your Dag file where it is set, and +replace the dynamic value with a deterministic one — for example, a fixed ``datetime`` literal, a Jinja +template evaluated at execution time, or an Airflow Variable resolved via template. See +`How to avoid version inflation`_ for concrete patterns. + +If you cannot tie the changing field to anything in your Dag code, and the value appears to come from +Airflow itself (for example, an internal attribute that should be stable across parses), please report +it as a bug at https://github.com/apache/airflow/issues. Include both serialized Dag payloads (or the +relevant diff) and the Airflow version so maintainers can reproduce the issue. + Dag version inflation detection """"""""""""""""""""""""""""""""