Skip to content

Add name filtering to the Deadline Alerts API - #74127

Merged
shahar1 merged 2 commits into
apache:mainfrom
SameerMesiah97:DeadlineAlerts-Name-Filter
Oct 29, 2026
Merged

shahar1 merged 2 commits into
apache:mainfrom
SameerMesiah97:DeadlineAlerts-Name-Filter

Conversation

@SameerMesiah97

@SameerMesiah97 SameerMesiah97 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Description

This change adds support for filtering Deadline Alerts by name in the GET /dags/{dag_id}/deadlineAlerts endpoint.

The implementation uses the existing FilterParam infrastructure, allowing clients to retrieve Deadline Alerts by their configured name while remaining consistent with the filtering behaviour used across the rest of the FastAPI UI API.

Rationale

The Deadline Alerts endpoint currently always returns every configured alert for a DAG. Adding support for filtering by name allows clients to request only the alerts they are interested in, rather than retrieving the full collection and filtering client-side.

This follows the existing filtering pattern used throughout the FastAPI UI API and provides a straightforward building block for UI features such as searching Deadline Alerts by name.

Tests

Added API tests verifying that:

  • Filtering by name returns only the matching Deadline Alert.
  • Filtering by an unknown name returns an empty result.
  • Name filtering composes correctly with version_number filtering.

Backwards Compatibility

This change is fully backwards compatible. Requests that do not specify the name query parameter continue to return all Deadline Alerts for the requested DAG.

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: [GPT 5.6] following the guidelines

@boring-cyborg boring-cyborg Bot added the area:API Airflow's REST/HTTP API label Oct 2, 2026
@SameerMesiah97
SameerMesiah97 force-pushed the DeadlineAlerts-Name-Filter branch 2 times, most recently from cb62819 to b276ad9 Compare October 3, 2026 18:59
@SameerMesiah97
SameerMesiah97 marked this pull request as ready for review October 3, 2026 20:14
@SameerMesiah97
SameerMesiah97 force-pushed the DeadlineAlerts-Name-Filter branch from b276ad9 to 1c226ab Compare October 5, 2026 18:17

@fat-catTW fat-catTW left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great work!!

@shahar1 shahar1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall LGTM, @ferruzzi - Could you please take another look?

Sameer Mesiah added 2 commits October 24, 2026 19:30
Allow Deadline Alerts to be filtered by name using the existing
FilterParam infrastructure and add API tests covering matching,
non-matching, and version-scoped filtering.
Replace exact name filtering with Airflow's shared search parameter helper.
Support pattern-based searches on DeadlineAlert names in the UI API.
Update filtering tests and endpoint documentation.
@SameerMesiah97
SameerMesiah97 force-pushed the DeadlineAlerts-Name-Filter branch from b983af9 to 79a9f11 Compare October 24, 2026 19:01
@SameerMesiah97

Copy link
Copy Markdown
Contributor Author

Can someone trigger CI?

@shahar1 shahar1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Swaps exact-name filtering for the shared search_param_factory (ILIKE substring) on the UI Deadline Alerts endpoint, addressing ferruzzi's consistency comment; tests cover single, substring, multi, no-match and version-scoped cases. One nit below, not blocking.

Smaller observations

  • See inline comments on airflow-core/src/airflow/api_fastapi/core_api/routes/ui/deadlines.py:189.

This review was drafted by an AI-assisted tool and
confirmed by an Apache Airflow maintainer. The maintainer
approving this PR has read the findings and signed off. If
something feels off, please reply on the PR and a maintainer
will follow up.

More on how Apache Airflow handles maintainer review:
Contributing guide.

@shahar1
shahar1 merged commit 37b6b04 into apache:main Oct 29, 2026
89 checks passed
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.

4 participants