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

   ### What
   
   Add a `bundle_name` attribute to DAG objects and populate it when DAGs are 
imported from a bundle.
   
   ### Why
   
   This makes it possible to identify which DAG bundle a DAG originated from 
and enables bundle-specific DAG policies.
   
   Example:
   
   ```python
   @hookimpl
   def dag_policy(dag):
       if dag.bundle_name == "example_dags":
           return
   
       if dag.bundle_name == "special_dags":
           ...
   ```
   
   ### Changes
   
   * Added `bundle_name` field to `DAG`.
   * Set `dag.bundle_name` during DAG import.
   * Added tests to verify imported DAGs receive the configured bundle name.
   
   Fixes #68575
   


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