-
Notifications
You must be signed in to change notification settings - Fork 15.5k
feat(docs): explain owners definition #53176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Static checks fail :( |
.. _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). |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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".
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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*
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. |
Unstale. I'm currently working of the fixes, I will push in the next days. |
d550fb8
to
ebcdafb
Compare
c3ff94b
to
0aec25c
Compare
Ownership | ||
========= | ||
|
||
When multiple users are authoring the DAGs of a single Airflow instance, it can be tedious to know who is responsible of what. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
Documentation updates to clarify the use of
Task.owner
andDAG.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.