Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add run_id_pattern search for Dag Run API.#52437

Merged
jscheffl merged 27 commits intoapache:mainfrom
noeunkim:feature/issue-52363-add-run-id-filter-to-ui-and-api
Jul 8, 2025
Merged

Add run_id_pattern search for Dag Run API.#52437
jscheffl merged 27 commits intoapache:mainfrom
noeunkim:feature/issue-52363-add-run-id-filter-to-ui-and-api

Conversation

Copy link
Contributor

noeunkim commented Jun 29, 2025 *
edited
Loading

Feature

  • Adds single run_id pattern filter to /dag_runs page
  • Based on Feature Gap - UI/API Filters #52363
  • This filter was available in previous version but is currently missing in v3

Discussion points

  • Single run_id filter sufficient? or should we support more complex search parser?
    • e.g., AND / OR conditions
  • Any suggestions for improving the UI design? more structured form preferable?

Feedback and suggestions are welcome!


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

kyungjunleeme, choo121600, and kgw7401 reacted with thumbs up emoji
noeunkim requested review from bbovenzi, ephraimbuddy, jscheffl, pierrejeambrun, ryanahamilton and shubhamraj-git as code owners June 29, 2025 05:00
Copy link

boring-cyborg bot commented Jun 29, 2025

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better .
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

noeunkim requested review from bugraoz93, jason810496 and rawwar as code owners June 29, 2025 05:00
boring-cyborg bot added area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers. labels Jun 29, 2025
jscheffl reviewed Jun 29, 2025
Copy link
Contributor

jscheffl left a comment

Choose a reason for hiding this comment

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

If something in UI changes it is cool to always also add a screenshot - that makes review easier. Can you add some mugshot to PR description?

fritz-astronomer and vietvudanh reacted with thumbs up emoji
jscheffl reviewed Jun 29, 2025
Copy link
Contributor

jscheffl left a comment *
edited
Loading

Choose a reason for hiding this comment

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

I am not fully sure about this feature, it is really a gap from previous version but the implementation only offers an exact match. No globbing.

I'd request some other reviewers as well, I assume next level is also we need to invest into better search capabilities in general, only exact run ID match is not much of a great value.

Please do not treat it tooo negative. I think in general the search capabilties are a shortcoming in the UI in general. I am unsure about the increments needed to get back to 2.11 state of options.

jason810496 reviewed Jun 29, 2025
Copy link
Member

jason810496 left a comment

Choose a reason for hiding this comment

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

Nice! Thanks for the PR, just a small nit. LGTM on API side after fix.

Copy link
Contributor

fritz-astronomer commented Jun 30, 2025 *
edited
Loading

That was fast! Awesome work.

There are a number of other fields that could be sorted on, and I agree with

only exact run ID match is not much of a great value

However, I do also think something is better than nothing?
Maybe can revisit at a later time to add something more generic and powerful for many fields across many models?

Copy link
Member

pierrejeambrun left a comment *
edited
Loading

Choose a reason for hiding this comment

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

Thanks for the pull request, that's a good idea.

We do support searching on patterns:

DESCRIPTION = (
"SQL LIKE expression -- use `%` / `_` wildcards (e.g. `%customer_%`). "
"Regular expressions are **not** supported."
)

You can take a look at search_param_factory to construct such filters on the API side.

For instance for the task_display_name_pattern search.

bbovenzi and noeunkim reacted with thumbs up emoji
Copy link
Member

pierrejeambrun left a comment

Choose a reason for hiding this comment

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

Nice, just a few nitpicks and should be good to merge.

Thanks for the pull request.

This comment was marked as resolved.

bbovenzi reviewed Jul 1, 2025
bbovenzi added this to the Airflow 3.1.0 milestone Jul 1, 2025
noeunkim requested a review from pierrejeambrun July 4, 2025 00:11
Copy link
Member

pierrejeambrun left a comment *
edited
Loading

Choose a reason for hiding this comment

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

One remark

noeunkim requested a review from pierrejeambrun July 5, 2025 08:29
Copy link
Member

pierrejeambrun left a comment

Choose a reason for hiding this comment

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

Two small nits and we should be good to merge.

Copy link
Member

pierrejeambrun commented Jul 7, 2025

Also I think you took example on the TaskInstance page, where the Search Bar is first in the filters. This PR adds the SearchBar as last in the DagRun filter page. I think we should be consistent and put the search first in this page too.

noeunkim reacted with thumbs up emoji

pierrejeambrun approved these changes Jul 8, 2025
Copy link
Member

pierrejeambrun left a comment

Choose a reason for hiding this comment

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

Nice, thanks

Copy link
Contributor Author

noeunkim commented Jul 8, 2025

Nice, thanks

sorry for bothering you for the final step
It seems there is an issue on CI: https://github.com/apache/airflow/actions/runs/16147315558/job/45570359614
should I rebase to resolve this, or just keep retriggering?

Run # Catch errors in the download with || to avoid the whole workflow failing
error downloading cache-pre-commit-v4-3.10.18-728e39db9f8498b32d8121c0e563f645 c7a2c9ed2da2fa53e2a59696c9f984df-main:
HTTP 502: Server Error (https://api.github.com/repos/apache/airflow/actions/artifacts/3486535546/zip)```

noeunkim requested review from jscheffl and pierrejeambrun July 8, 2025 17:17
jscheffl approved these changes Jul 8, 2025
Copy link
Contributor

jscheffl left a comment

Choose a reason for hiding this comment

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

Thanks! Also for staying on it with that amount of feedback! Hope we did not scare you in reviews.
LGTM!

bbovenzi reacted with hooray emoji noeunkim reacted with heart emoji
jscheffl merged commit 65aa408 into apache:main Jul 8, 2025
102 checks passed
Copy link

boring-cyborg bot commented Jul 8, 2025

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

Copy link
Contributor

bbovenzi commented Jul 8, 2025

Great work!

noeunkim reacted with heart emoji

HsiuChuanHsu pushed a commit to HsiuChuanHsu/airflow that referenced this pull request Jul 10, 2025
* Add run_id filter for dag runs

* Update i18n support for run_id filter in Dag Runs page

* Apply param dependency injection and update i18n key structure

* Apply _SearchParam to support pattern search

* Rename run_id to run_id_pattern and refactor DagRuns ui to use SearchBar

* Resolve merge conflict

* Improve test cases

* Resolve test failure

* Fix: resolve Advanced Search button visibility

* Improve filter layout and variable consistency
noeunkim deleted the feature/issue-52363-add-run-id-filter-to-ui-and-api branch July 13, 2025 02:25
stephen-bracken pushed a commit to stephen-bracken/airflow that referenced this pull request Jul 15, 2025
* Add run_id filter for dag runs

* Update i18n support for run_id filter in Dag Runs page

* Apply param dependency injection and update i18n key structure

* Apply _SearchParam to support pattern search

* Rename run_id to run_id_pattern and refactor DagRuns ui to use SearchBar

* Resolve merge conflict

* Improve test cases

* Resolve test failure

* Fix: resolve Advanced Search button visibility

* Improve filter layout and variable consistency
Copy link
Contributor

kyungjunleeme commented Jul 18, 2025

nice work!!

kaxil added a commit to apache/airflow-client-python that referenced this pull request Oct 22, 2025
(from https://github.com/apache/airflow/tree/python-client/3.1.0rc1)

## New Features:

- Add `map_index` filter to TaskInstance API queries ([#55614](apache/airflow#55614))
- Add `has_import_errors` filter to Core API GET /dags endpoint ([#54563](apache/airflow#54563))
- Add `dag_version` filter to get_dag_runs endpoint ([#54882](apache/airflow#54882))
- Implement pattern search for event log endpoint ([#55114](apache/airflow#55114))
- Add asset-based filtering support to DAG API endpoint ([#54263](apache/airflow#54263))
- Add Greater Than and Less Than range filters to DagRuns and Task Instance list ([#54302](apache/airflow#54302))
- Add `try_number` as filter to task instances ([#54695](apache/airflow#54695))
- Add filters to Browse XComs endpoint ([#54049](apache/airflow#54049))
- Add Filtering by DAG Bundle Name and Version to API routes ([#54004](apache/airflow#54004))
- Add search filter for DAG runs by triggering user name ([#53652](apache/airflow#53652))
- Enable multi sorting (AIP-84) ([#53408](apache/airflow#53408))
- Add `run_on_latest_version` support for backfill and clear operations ([#52177](apache/airflow#52177))
- Add `run_id_pattern` search for Dag Run API ([#52437](apache/airflow#52437))
- Add tracking of triggering user to Dag runs ([#51738](apache/airflow#51738))
- Expose DAG parsing duration in the API ([#54752](apache/airflow#54752))

## New API Endpoints:

- Add Human-in-the-Loop (HITL) endpoints for approval workflows ([#52868](apache/airflow#52868), [#53373](apache/airflow#53373), [#53376](apache/airflow#53376), [#53885](apache/airflow#53885), [#53923](apache/airflow#53923), [#54308](apache/airflow#54308), [#54310](apache/airflow#54310), [#54723](apache/airflow#54723), [#54773](apache/airflow#54773), [#55019](apache/airflow#55019), [#55463](apache/airflow#55463), [#55525](apache/airflow#55525), [#55535](apache/airflow#55535), [#55603](apache/airflow#55603), [#55776](apache/airflow#55776))
- Add endpoint to watch dag run until finish ([#51920](apache/airflow#51920))
- Add TI bulk actions endpoint ([#50443](apache/airflow#50443))
- Add Keycloak Refresh Token Endpoint ([#51657](apache/airflow#51657))

## Deprecations:

- Mark `DagDetailsResponse.concurrency` as deprecated ([#55150](apache/airflow#55150))

## Bug Fixes:

- Fix dag import error modal pagination ([#55719](apache/airflow#55719))
kaxil mentioned this pull request Oct 22, 2025
kaxil added a commit to apache/airflow-client-python that referenced this pull request Oct 23, 2025
(from https://github.com/apache/airflow/tree/python-client/3.1.0rc1)

## New Features:

- Add `map_index` filter to TaskInstance API queries ([#55614](apache/airflow#55614))
- Add `has_import_errors` filter to Core API GET /dags endpoint ([#54563](apache/airflow#54563))
- Add `dag_version` filter to get_dag_runs endpoint ([#54882](apache/airflow#54882))
- Implement pattern search for event log endpoint ([#55114](apache/airflow#55114))
- Add asset-based filtering support to DAG API endpoint ([#54263](apache/airflow#54263))
- Add Greater Than and Less Than range filters to DagRuns and Task Instance list ([#54302](apache/airflow#54302))
- Add `try_number` as filter to task instances ([#54695](apache/airflow#54695))
- Add filters to Browse XComs endpoint ([#54049](apache/airflow#54049))
- Add Filtering by DAG Bundle Name and Version to API routes ([#54004](apache/airflow#54004))
- Add search filter for DAG runs by triggering user name ([#53652](apache/airflow#53652))
- Enable multi sorting (AIP-84) ([#53408](apache/airflow#53408))
- Add `run_on_latest_version` support for backfill and clear operations ([#52177](apache/airflow#52177))
- Add `run_id_pattern` search for Dag Run API ([#52437](apache/airflow#52437))
- Add tracking of triggering user to Dag runs ([#51738](apache/airflow#51738))
- Expose DAG parsing duration in the API ([#54752](apache/airflow#54752))

## New API Endpoints:

- Add Human-in-the-Loop (HITL) endpoints for approval workflows ([#52868](apache/airflow#52868), [#53373](apache/airflow#53373), [#53376](apache/airflow#53376), [#53885](apache/airflow#53885), [#53923](apache/airflow#53923), [#54308](apache/airflow#54308), [#54310](apache/airflow#54310), [#54723](apache/airflow#54723), [#54773](apache/airflow#54773), [#55019](apache/airflow#55019), [#55463](apache/airflow#55463), [#55525](apache/airflow#55525), [#55535](apache/airflow#55535), [#55603](apache/airflow#55603), [#55776](apache/airflow#55776))
- Add endpoint to watch dag run until finish ([#51920](apache/airflow#51920))
- Add TI bulk actions endpoint ([#50443](apache/airflow#50443))
- Add Keycloak Refresh Token Endpoint ([#51657](apache/airflow#51657))

## Deprecations:

- Mark `DagDetailsResponse.concurrency` as deprecated ([#55150](apache/airflow#55150))

## Bug Fixes:

- Fix dag import error modal pagination ([#55719](apache/airflow#55719))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

jscheffl jscheffl approved these changes

ryanahamilton Awaiting requested review from ryanahamilton ryanahamilton is a code owner

shubhamraj-git Awaiting requested review from shubhamraj-git shubhamraj-git is a code owner

ephraimbuddy Awaiting requested review from ephraimbuddy ephraimbuddy is a code owner

rawwar Awaiting requested review from rawwar rawwar is a code owner

bugraoz93 Awaiting requested review from bugraoz93 bugraoz93 is a code owner

jason810496 Awaiting requested review from jason810496 jason810496 is a code owner

bbovenzi Awaiting requested review from bbovenzi bbovenzi is a code owner

pierrejeambrun Awaiting requested review from pierrejeambrun pierrejeambrun is a code owner

Assignees

No one assigned

Labels

area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Milestone

Airflow 3.1.0

Development

Successfully merging this pull request may close these issues.

7 participants