ykuc opened a new pull request, #69697:
URL: https://github.com/apache/airflow/pull/69697

   Pass dag_id to Dag bundle construction when a worker runs a task.
   
   Custom Dag bundles can now read self.dag_id on the bundle instance before 
initialize() runs. That lets bundle authors tailor setup per Dag (for example, 
per-Dag sparse checkout in Git) without changing the initialize() signature.
   
   Changes:
   
   Add optional dag_id to BaseDagBundle.__init__ (None by default).
   Extend DagBundlesManager.get_bundle() with dag_id and pass it into the 
bundle constructor.
   Pass what.ti.dag_id from task_runner.parse() on the worker task execution 
path.
   Document self.dag_id in the custom Dag bundles section of dag-bundles.rst.
   Not changed: Dag processor, CLI, callbacks, and BundleInfo / Execution API — 
there dag_id stays None.
   
   Tests:
   
   test_get_bundle — asserts dag_id is passed and defaults to None.
   test_parse_passes_dag_id_to_get_bundle — asserts parse() calls 
get_bundle(..., dag_id=...).


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