8000 feat: Add owner_links field to DAGDetailsResponse by choo121600 · Pull Request #50557 · apache/airflow · GitHub
[go: up one dir, main page]

Skip to content

feat: Add owner_links field to DAGDetailsResponse #50557

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

Merged
merged 4 commits into from
May 14, 2025

Conversation

choo121600
Copy link
Contributor

This PR adds the owner_links field to the DAGDetailsResponse object from api_fastapi/core_api in order to resolve #48562

When the UI was based on Flask AppBuilder (FAB), we could retrieve the owner link using the following method:

{% if owner_links and owner.strip() in owner_links.get(dag.dag_id, {}) %}

However, now that the UI has been changed to React, this method no longer works. In the React UI, we need to retrieve the owner_links data from the API, which is why it needed to be included in the DAGDetailsResponse.

In the current implementation, owner_links is stored as a dictionary like:

{ "owner_example": "https://example_link.com" }

I have preserved this format and added the owner_links field to the DAGDetailsResponse. This allows the UI to receive and render the owner_links data via the API response.


^ 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.

@bbovenzi bbovenzi added this to the Airflow 3.0.2 milestone May 13, 2025
@bbovenzi bbovenzi added the backport-to-v3-0-test Mark PR with this label to backport to v3-0-test branch label May 13, 2025
Copy link
Member
@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

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

Thanks

@pierrejeambrun pierrejeambrun merged commit e37a40d into apache:main May 14, 2025
95 checks passed
Copy link

Backport failed to create: v3-0-test. View the failure log Run details

Status Branch Result
v3-0-test Commit Link

You can attempt to backport this manually by running:

cherry_picker e37a40d v3-0-test

This should apply the commit to the v3-0-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

pierrejeambrun pushed a commit to astronomer/airflow that referenced this pull request May 14, 2025
* feat: Add owner_links field to DAGDetailsResponse model and update related schemas

* remove owner_links in test code

* add tests for DAG owner_links in DAG details endpoint

* refactor: apply ruff formatting to test_dags.py

(cherry picked from commit e37a40d)
@pierrejeambrun
Copy link
Member

Manual cherry pick PR here:
#50604

pierrejeambrun added a commit that referenced this pull request May 14, 2025
* feat: Add owner_links field to DAGDetailsResponse model and update related schemas

* remove owner_links in test code

* add tests for DAG owner_links in DAG details endpoint

* refactor: apply ruff formatting to test_dags.py

(cherry picked from commit e37a40d)

Co-authored-by: Yeonguk <choo121600@gmail.com>
kaxil pushed a commit that referenced this pull request Jun 3, 2025
* feat: Add owner_links field to DAGDetailsResponse model and update related schemas

* remove owner_links in test code

* add tests for DAG owner_links in DAG details endpoint

* refactor: apply ruff formatting to test_dags.py

(cherry picked from commit e37a40d)

Co-authored-by: Yeonguk <choo121600@gmail.com>
sanederchik pushed a commit to sanederchik/airflow that referenced this pull request Jun 7, 2025
* feat: Add owner_links field to DAGDetailsResponse model and update related schemas

* remove owner_links in test code

* add tests for DAG owner_links in DAG details endpoint

* refactor: apply ruff formatting to test_dags.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:airflow-ctl area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers. backport-to-v3-0-test Mark PR with this label to backport to v3-0-test branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for owner links in UI
5 participants
0