Skip to content

Add run_id filter for dag runs #52437

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

noeunkim
Copy link

@noeunkim noeunkim commented Jun 29, 2025

Feature

image

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.

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: [email protected]
    Slack: https://s.apache.org/airflow-slack

@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers. labels Jun 29, 2025
Copy link
Contributor

@jscheffl 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?

Copy link
Contributor

@jscheffl jscheffl left a comment

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.

Copy link
Member

@jason810496 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.

@fritz-astronomer
Copy link
Contributor

fritz-astronomer commented Jun 30, 2025

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

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.

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

Thanks for the pull request.

@noeunkim

This comment was marked as resolved.

@bbovenzi bbovenzi added this to the Airflow 3.1.0 milestone Jul 1, 2025
@noeunkim
Copy link
Author

noeunkim commented Jul 2, 2025

Thanks to everyone’s effort and feedback, we now have pattern search for run_id (e.g., %2025-07-02%)

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?

I agree and think our next step could be to support multi field filtering not just a single filter.
Do you think we should split the feature into another PR for it, or continue enhancing this feature here?
I’d love to hear your thoughts experts!

cc. @fritz-astronomer

@pierrejeambrun
Copy link
Member

pierrejeambrun commented Jul 2, 2025

I agree and think our next step could be to support multi field filtering not just a single filter.
Do you think we should split the feature into another PR for it, or continue enhancing this feature here?
I’d love to hear your thoughts experts!

This one is close to be ready and is a nice improvement on its own. I don't think we should delay it further more by building on top of it, what you are suggesting could be a nice follow up PR.

Copy link
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

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

I am okay and thanks for adding a wildcard such that users can better use it! Like it!

I am though a bit un-easy with "%" as being the wildcard. I know that "%" is used in most DB systems but for a nono DBA user the % char is in my view not very common.
Could we change it that a "" is also possible or exachange "%" with "" as being the wildcard?

Won't block if others are okay with "%" but from UX perspective a "%" is non -intuitive in my view.

@@ -13,7 +13,8 @@
"active": "Active",
"all": "All",
"paused": "Paused"
}
},
"runIdPatternFilter": "Add run_id filter"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a tooltip or similar that helps the user to know that "%" is the wildcard? Else user probably does not know or attempts to use "*".

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we let the user simply type "2025" and we handle the % behind the scenes

Copy link
Contributor

@jscheffl jscheffl Jul 2, 2025

Choose a reason for hiding this comment

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

That would also be great. So user enters "abc" and the query is automatically be made with "%abc%"
That would also made it so easy we don't need to add a tooltip then.

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 area:UI Related to UI/UX. For Frontend Developers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants