Skip to content

Add team name to dag attributes and task context variables #65465

Description

@stephen-bracken

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?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions