Skip to content

Fix whitespace handling in DAG owners parsing for multiple owners #52216

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 1 commit into from
Jun 25, 2025

Conversation

choo121600
Copy link
Contributor

Problem

When DAG owners are specified as comma-separated values with spaces (e.g., "owner1, owner2, owner3"), the FastAPI datamodel was not stripping whitespace, resulting in owners being parsed as ["owner1", " owner2", " owner3"] instead of ["owner1", "owner2", "owner3"].

Change

Modified get_owners method in DAGResponse to use [x.strip() for x in v.split(",")] instead of v.split(",") to properly handle whitespace around owner names.

closes: #52215


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

@potiuk potiuk merged commit b1be383 into apache:main Jun 25, 2025
100 checks passed
potiuk pushed a commit to potiuk/airflow that referenced this pull request Jun 25, 2025
…e owners (apache#52216)

(cherry picked from commit b1be383)

Co-authored-by: Yeonguk Choo <[email protected]>
@potiuk potiuk modified the milestones: Airflow 2.11.1, Airflow 3.0.3 Jun 25, 2025
@choo121600 choo121600 deleted the fix/dag-owner-parsing branch June 25, 2025 08:50
pierrejeambrun pushed a commit that referenced this pull request Jun 25, 2025
…e owners (#52216) (#52221)

(cherry picked from commit b1be383)

Co-authored-by: Yeonguk Choo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FastAPI DAGResponse does not strip whitespace in comma-separated owners
2 participants