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/08/28 03:13:26 UTC

[GitHub] [airflow] uranusjr commented on issue #26016: Apply templates to Dynamic task arguments passed as expand

uranusjr commented on issue #26016:
URL: https://github.com/apache/airflow/issues/26016#issuecomment-1229364541

   This is actually intentionally done to match the current behaviour without task-mapping. For example:
   
   ```python
   @task
   def get_templated_echo():
       return 'echo "The date is {{ ds }}"'
   
   BashOperator(task_id="echo_task", bash_command=get_templated_echo())
   ```
   
   The task `echo_task` will echo `The date is {{ ds }}"` without template resolution.
   
   You could argue that the current behaviour (regardless of task mapping) is unexpected, but it is an established behaviour (taskflow has existed for a while now), and the change needs to be made for all cases, not different between dynamic task-mapping and non-mapped tasks.
   
   I’m modifying the title to reflect the actual scope of the feature request.


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