Skip to content

Conversation

AlexisBRENON
Copy link
Contributor

Documentation updates to clarify the use of Task.owner and DAG.owner_links.

https://apache-airflow.slack.com/archives/CCQ7EGB1P/p1752053763120249


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@shahar1
Copy link
Contributor

shahar1 commented Jul 11, 2025

Static checks fail :(

Comment on lines 688 to 702
.. _concepts:dags-ownership:

Ownership
~~~~~~~~~

In addition to these documentation and notes, you are also able to link a DAG with a set of owners.
This way the DAG users may be able to reach out the right set of people when needed.

This ownership is split in two parts:

1. at the :ref:`Task level <concepts:task-owner>` through the ``owner`` definition;
2. at the DAG level to customize the UI through the ``owner_links`` definition.

Each DAG collects the set of owners from its task set, and display it on the DAGs view UI.
Any owner matching an item defined in the ``owner_links`` dictionary is converted to a clickable link (that may be a instant messaging handle or a mailto link).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

owner_links was not ported to 3.0
which is why we don't have
https://airflow.apache.org/docs/apache-airflow/3.0.0/howto/add-owner-links.html

but we do have
https://airflow.apache.org/docs/apache-airflow/2.11.0/howto/add-owner-links.html

we should revive the doc as stand alone.

I don't think owner links needs to be explained in core-concept. It is not a core concept.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point that it may not be "core concept" (I didn't know exactly where to put this info).

But, what do you mean by "not ported to 3.0". I still see in owner_links in the API on the main branch: https://github.com/apache/airflow/blob/main/task-sdk/src/airflow/sdk/definitions/dag.py#L430

I may move the documentation to a dedicated page: "DAGs and Tasks ownership".

Copy link
Contributor

@choo121600 choo121600 Jul 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The owner_links was added to the backend in version 3.0.2, but it only started appearing in the UI from version 3.1.0.

PR: #50627

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. Might be good to target it for 3.1.0 and mention that owner links were missing in 3.0*

Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Aug 28, 2025
@AlexisBRENON
Copy link
Contributor Author

Unstale. I'm currently working of the fixes, I will push in the next days.

@github-actions github-actions bot removed the stale Stale PRs per the .github/workflows/stale.yml policy file label Aug 29, 2025
Ownership
=========

When multiple users are authoring the DAGs of a single Airflow instance, it can be tedious to know who is responsible of what.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we've decided to refer to “DAG” as “Dag” from now on, so please change it accordingly.

1. at the Task level, through the ``owner`` argument of the :class:`~airflow.models.baseoperator.BaseOperator`;
2. at the DAG level, to customize the UI through the ``owner_links`` definition.

In Airflow 2, the list of owners was displayed in the DAG list view, not taking into account the ``owner_links`` value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is misleading because it generalizes for all of Airflow 2. The owner_links feature was added in version 2.4.0, so it did work in later Airflow 2 releases.

https://airflow.apache.org/docs/apache-airflow/2.4.0/howto/add-owner-links.html

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

Successfully merging this pull request may close these issues.

5 participants