Brunda10 commented on code in PR #54256:
URL: https://github.com/apache/airflow/pull/54256#discussion_r2278981063
##########
airflow-core/src/airflow/config_templates/config.yml:
##########
@@ -509,6 +509,19 @@ core:
type: string
example: ~
default: ~
+ template_searchpath:
+ description: |
+ Path where Airflow looks for Jinja templates used in DAGs and task
fields.
+ Can be a single absolute path (string) or a comma-separated list of
multiple
+ absolute paths.
+ When multiple paths are specified, Airflow searches them in the
provided order
+ until the requested template file is found. Relative paths are
resolved against
+ `AIRFLOW_HOME`.
+ version_added: ~
+ type: string
+ example: "/opt/airflow/dags/templates,/opt/airflow/cutom_templates"
+ default: "{AIRFLOW_HOME}/dags/include"
Review Comment:
I understand the concern about having a hardcoded default like
{AIRFLOW_HOME}/dags/include — especially since it may not exist in setups using
Git-based DAG versioning in Airflow 3.
I’m fine with removing the default and letting users configure it explicitly.
Regarding the per–DAG bundle manager approach — I see how that would be more
robust in Airflow 3, since the DAG source location can vary. For now, my change
is focused on making the config global to reduce boilerplate in DAG
definitions, but I can adjust the PR so it doesn’t assume a $AIRFLOW_HOME/dags
structure and doesn’t break in Git-based setups
--
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]