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/13 20:47:55 UTC

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

o-nikolas commented on code in PR #27035:
URL: https://github.com/apache/airflow/pull/27035#discussion_r995108431


##########
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:
   There was some discussion around allowing `XComArg`s in the initial issue, see [here](https://github.com/apache/airflow/issues/13414#issuecomment-776173348). One specific call out from @kaxil was:
   > Currently, we don't support it as we need to de-serialize it for Webserver and show it in the UI in List DagRun page. Needs a bigger change to support other objects that are not JSON serializable atm
   
   Can you do some testing around loading this page with your change @paolo-moriello to confirm that more code changes are required to support this.



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