Dillon Johnson created AIRFLOW-4007:
---------------------------------------

             Summary: TriggerDagRunOperator Forces JSON
                 Key: AIRFLOW-4007
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4007
             Project: Apache Airflow
          Issue Type: Bug
          Components: DagRun
    Affects Versions: 1.10.0
            Reporter: Dillon Johnson


The project has seemingly forced the TriggerDagRunOperator `conf` to allow JSON 
only. This is different than how it was previously where I was allowed to pass 
class instances without any special handling.

https://github.com/apache/airflow/blob/master/airflow/operators/dagrun_operator.py#L94

https://github.com/apache/airflow/blob/master/airflow/api/common/experimental/trigger_dag.py#L65

These are the 2 snippets that enforce this.

This is different than the previous behavior as well as XCOMs. I can pass my 
class instance object through XCOM, but I cannot pass it via conf with 
TriggerDagRunOperator. If this is the intended behavior, what's the feasible 
workaround for this?

 

Currently, I'm working around this by creating a custom operator with the old 
code that allows class instances to be passed in the conf.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to