suii2210 commented on issue #58893:
URL: https://github.com/apache/airflow/issues/58893#issuecomment-3674129122

   That’s a good point, and I agree with the concern.
   
   The intent of the TaskInstance.run() example was to document the 
lowest-level execution path and reflect how operator unit tests are commonly 
written in the codebase, but I agree it doesn’t generalise well and could be 
misleading if treated as a default pattern.
   
   For most users - especially TaskFlow users -the dag.create_dagrun() approach 
is more representative, and an example like the one you outlined would be very 
helpful in the docs. It probably makes sense to clearly position 
TaskInstance.run() as a narrow, operator-level testing tool rather than a 
general solution.
   
   The idea of a helper like run_xcom_task() is interesting as well, though 
that feels like a broader design discussion beyond the current docs change.
   
   Happy to follow up with a small docs addition if the team thinks that would 
be useful.


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