Description
When running in multi team mode we should pass the team name that the task belongs to into the TaskInstance context variables, and possibly add a DAG.team_name attribute. This would be useful for setting team level policies in the airflow_local_settings.py hooks.
Use case/motivation
Setting team level policies for tasks, dags in airflow_local_settings.py and providing team template variables using jinja2, e.g. {{ ti.team_name }}, {{ dag.team_name }} or just {{ team_name }}. This would allow us to create team separated log file paths in the log_file_nametemplate config setting with their own team specific access policies.
Related issues
No response
Are you willing to submit a PR?
Code of Conduct
Description
When running in multi team mode we should pass the team name that the task belongs to into the
TaskInstancecontext variables, and possibly add aDAG.team_nameattribute. This would be useful for setting team level policies in the airflow_local_settings.py hooks.Use case/motivation
Setting team level policies for tasks, dags in airflow_local_settings.py and providing team template variables using jinja2, e.g.
{{ ti.team_name }},{{ dag.team_name }}or just{{ team_name }}. This would allow us to create team separated log file paths in the log_file_nametemplate config setting with their own team specific access policies.Related issues
No response
Are you willing to submit a PR?
Code of Conduct