ashb commented on a change in pull request #18575:
URL: https://github.com/apache/airflow/pull/18575#discussion_r719286866
##########
File path: airflow/models/dagbag.py
##########
@@ -599,7 +599,12 @@ def _serialize_dag_capturing_errors(dag, session):
except OperationalError:
raise
except Exception:
- self.log.exception("Failed to write serialized DAG: %s",
dag.full_filepath)
+ self.log.exception("Failed to write serialized DAG '%s' in:
%s", dag.dag_id, dag.fileloc)
+ # Update the dag_hash to force resync as something (likely
_sync_perm_for_dag) failed
+ session.flush()
+
session.query(SerializedDagModel).filter(SerializedDagModel.dag_id ==
dag.dag_id).update(
+ {"dag_hash": "(force resync)"}
Review comment:
(Non blocking comment)
--
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]