[ 
https://issues.apache.org/jira/browse/AIRFLOW-5644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17357179#comment-17357179
 ] 

ASF GitHub Bot commented on AIRFLOW-5644:
-----------------------------------------

AddEleven commented on pull request #6317:
URL: https://github.com/apache/airflow/pull/6317#issuecomment-854475700


   > Thanks for the quick reply @BasPH, and especially for taking the time to 
sketch out the workaround / new style.
   > 
   > That does clarify - I'm assuming that `_should_trigger` in your example 
above can modify `dag_run.conf` to perhaps add more inputs in. That would 
replicate what we currently do with `TriggerDagRunOperator`. For example, a 
really trivial case would be:
   > 
   > ```python
   > def _should_trigger(dag_run, **_):
   >     if not dag_run.conf["should_trigger"]:
   >         raise AirflowSkipException("should_trigger set to False")
   >     dag_run.conf["downstream_payload"]["trigger_checked_at"] = 
datetime.now()
   > ```
   > 
   > I do also appreciate - from a design perspective - that the code now is 
simpler; I daresay it's cleaner for us to separate out the logic of if / how to 
trigger (which is purely business logic), from the trigger itself (which is 
purely an airflow construct). I guess the old code was conflating a bit of 
`PythonOperator` concerns with `TriggerDagRunOperator` concerns.
   > 
   > Is there some sort of release notes for the new `TriggerDagRunOperator` 
changes? I'd like to contribute to clarify what functionality has changed, and 
codify the workaround you're suggesting here.
   
   Hi Sharadh,
   
   Did you managed to find a way to edit dag_run.conf to add further inputs 
before passing it to the TriggerDagRunOperator conf parameter? I have been 
trying this and can't seem to find a solution.
   
   Thanks,
   


-- 
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:
[email protected]


> Simplify TriggerDagRunOperator usage
> ------------------------------------
>
>                 Key: AIRFLOW-5644
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5644
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: operators
>    Affects Versions: 2.0.0
>            Reporter: Bas Harenslak
>            Priority: Major
>             Fix For: 2.0.0
>
>
> The TriggerDagRunOperator usage is rather odd at the moment, especially the 
> way to pass a conf.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to