-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
base: main
Are you sure you want to change the base?
Add run_id filter for dag runs #52437
Conversation
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)
|
There was a problem hiding this 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?
There was a problem hiding this 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.
There was a problem hiding this 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.
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py
Outdated
Show resolved
Hide resolved
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py
Outdated
Show resolved
Hide resolved
That was fast! Awesome work. There are a number of other fields that could be sorted on, and I agree with
However, I do also think something is better than nothing? |
There was a problem hiding this 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.
There was a problem hiding this 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.
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py
Outdated
Show resolved
Hide resolved
This comment was marked as resolved.
This comment was marked as resolved.
Thanks to everyone’s effort and feedback, we now have pattern search for
I agree and think our next step could be to support multi field filtering not just a single filter. |
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. |
There was a problem hiding this 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" |
There was a problem hiding this comment.
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 "*".
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Feature
run_id
pattern filter to/dag_runs
pageDiscussion points
run_id
filter sufficient? or should we support more complex search parser?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.