hussein-awala commented on issue #29432:
URL: https://github.com/apache/airflow/issues/29432#issuecomment-1426569954

   As I understood, `MappedOperator` is a wrapper for `AbstractOperator` and we 
don't extend it, it just contains a reference for an operator instance created 
from the custom operator which extends `AbstractOperator`:
   
![Airflow_operators](https://user-images.githubusercontent.com/21311487/218232220-64bb2514-8507-4867-aab6-2445b3965e27.png)
   
   Without #29451, the `MappedOperator` calls its own 
`_do_render_template_fields` method where the custom operator doesn't extend 
it, for that the nested fields of `KubernetesPodOperator` were not rendered.
   Call stack:
   - MappedOperator.render_template_fields()
   - AbstractOperator._render_nested_template_fields()
   
   With #29451 `MappedOperator` calls the method `_do_render_template_fields` 
from the `unmapped_task` which is an instance created from our custom operator, 
in this case the logic we define in this method will be applied on the instance 
fields.
   Call stack:
   - MappedOperator.render_template_fields()
   - CustomOperator._render_nested_template_fields()
   - Super._render_nested_template_fields() (if called)
   - ...
   
   


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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to