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 2022/10/14 13:20:40 UTC

[GitHub] [airflow] paolo-moriello commented on a diff in pull request #27035: Move TriggerDagRunOperator config validation from init to execute

paolo-moriello commented on code in PR #27035:
URL: https://github.com/apache/airflow/pull/27035#discussion_r995753819


##########
airflow/operators/trigger_dagrun.py:
##########
@@ -128,6 +123,11 @@ def execute(self, context: Context):
         else:
             parsed_execution_date = timezone.utcnow()
 
+        try:
+            json.dumps(self.conf)
+        except TypeError:
+            raise AirflowException("conf parameter should be JSON Serializable")
+

Review Comment:
   The change I'm proposing here is not changing the existing logic, apart from enabling the above code workflow which otherwise fails.
   
   I've quickly tested that in the List DagRun UI I can see the both the triggered and the trigged dags, with the related config:
   ![Screenshot 2022-10-14 at 15 19 37](https://user-images.githubusercontent.com/61800102/195857000-ced71f8d-a4f6-4d54-aa5e-e19d2ca062cb.png)
   



-- 
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: commits-unsubscribe@airflow.apache.org

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