You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/11/21 11:11:15 UTC

[GitHub] [airflow] turbaszek commented on a change in pull request #12530: fix dag serialization crash caused by preset DagContext

turbaszek commented on a change in pull request #12530:
URL: https://github.com/apache/airflow/pull/12530#discussion_r528183318



##########
File path: airflow/models/baseoperator.py
##########
@@ -1336,6 +1336,9 @@ def get_extra_links(self, dttm: datetime, link_name: str) -> Optional[Dict[str,
     def get_serialized_fields(cls):
         """Stringified DAGs and operators contain exactly these fields."""
         if not cls.__serialized_fields:
+            from airflow.models.dag import DagContext
+
+            DagContext.push_context_managed_dag(None)

Review comment:
       @houqp can you tell more about why we need it?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org