Skip to content

Conversation

@RoyLee1224
Copy link
Contributor

@RoyLee1224 RoyLee1224 commented Sep 16, 2025

Related issues

closes: #53043

To-Do:

Test coverage:

  • Add test to test_dag_run.py to verify new conf_contains & duration filters

Filters:

  • Dag ID
  • Run ID
  • Start Date
  • End Date
  • Run After (Range)
  • Triggered By
  • Dag Version and/or Bundle Version
  • Duration Range (currently using from & to, improved range selection component would be a separate PR)
  • Conf Content
  • Delete triggeringUserNameFilter translation keys
  • Move all filters into filterBar
  • Producing Asset

Screenshots

CleanShot 2025-09-16 at 16 58 37
conf.mp4

Follow up PR

  • Add new type filters: number range , date range, tag

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

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Sep 16, 2025
@RoyLee1224
Copy link
Contributor Author

conf_contains seems to work fine, but since I didn't find any similar examples to reference for filtering on a JSON column, I'd really appreciate a second pair of eyes on my approach.

@RoyLee1224 RoyLee1224 marked this pull request as ready for review September 16, 2025 20:47
@RoyLee1224 RoyLee1224 changed the title [WIP] Implement filters for Dag run Implement filters for Dag run Sep 16, 2025
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!
LGTM on the API side and it would be nice to add the test in airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_dag_run.py to verify the new filters, thanks!

@bbovenzi
Copy link
Contributor

If we're going to refactor the Filter UX then let's move all the filters in. We can follow the example from #55620 for select inputs.

@RoyLee1224
Copy link
Contributor Author

@bbovenzi Oh I didn't notice the select filters are done. I'm on it.

@bbovenzi
Copy link
Contributor

Let's also hold off on Dag Id until we have the pattern search instead: #55691

@RoyLee1224
Copy link
Contributor Author

I'm also not sure about the best design for the Producing Asset filter. Should I use select type filter?

@bbovenzi bbovenzi added the allow translation change This label should be set if we want to bypass translation freeze and change english translations. label Sep 17, 2025
@bbovenzi
Copy link
Contributor

Let's not do producing asset for now. We don't even have that on the DagRunResponse

@RoyLee1224
Copy link
Contributor Author

Update:

Moved all filters into filterBar
CleanShot 2025-09-23 at 13 08 40@2x

feat: add filter for dag Version

feat(api): Add duration filter for Dag runs

feat(ui): implement duration filter for Dag runs

feat(ui,api): implement conf_contains filter

refactor(ui): move trigering user filter into filterbar

refactor: Simplify JSON type detection for filtering

fix(i18n): modify triggering user translation
fix(tests): Correct  assignment in  fixture

fix: Correct tests for duration and conf_contains filters

fix(test): using from_datetime_to_zulu_without_ms for end date

fix(tests): Correct tuple assignment for  in test setup
@RoyLee1224
Copy link
Contributor Author

RoyLee1224 commented Sep 25, 2025

Fixed the DagRun.duration hybrid property to support the SQLite dialect, which was causing the test failures. It now uses julianday() for calculations. CI should pass now!

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.

Fixed the DagRun.duration hybrid property to support the SQLite dialect, which was causing the test failures. It now uses julianday() for calculations. CI should pass now!

Nice catch! Thanks for the fix.
LGTM on API side.

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.

LGTM thanks

@pierrejeambrun pierrejeambrun merged commit cb84438 into apache:main Sep 30, 2025
111 checks passed
@RoyLee1224 RoyLee1224 deleted the dag_run_filter branch September 30, 2025 17:58
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 1, 2025
* feat(ui): implement filterbar for Dag run

feat: add filter for dag Version

feat(api): Add duration filter for Dag runs

feat(ui): implement duration filter for Dag runs

feat(ui,api): implement conf_contains filter

refactor(ui): move trigering user filter into filterbar

refactor: Simplify JSON type detection for filtering

fix(i18n): modify triggering user translation

* fix: resolve conflicts & move all filters into filterBar

* test: Add test for duration and conf_contains filters

test: modify duration test

* fix(ui): Add icons and styled options to Dag runs select type filters

fix(tests): Correct  assignment in  fixture

fix: Correct tests for duration and conf_contains filters

fix(test): using from_datetime_to_zulu_without_ms for end date

fix(tests): Correct tuple assignment for  in test setup

* fix(tests): Correct datetime formatting and test expectations in dag_run API tests

* fix(tests): Simplify conf_contains filter test patterns

* test: using int for testing duration

* fix(models): Make DagRun.duration property SQLite-compatible

* fix(i18n): add duration translation keys
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 2, 2025
* feat(ui): implement filterbar for Dag run

feat: add filter for dag Version

feat(api): Add duration filter for Dag runs

feat(ui): implement duration filter for Dag runs

feat(ui,api): implement conf_contains filter

refactor(ui): move trigering user filter into filterbar

refactor: Simplify JSON type detection for filtering

fix(i18n): modify triggering user translation

* fix: resolve conflicts & move all filters into filterBar

* test: Add test for duration and conf_contains filters

test: modify duration test

* fix(ui): Add icons and styled options to Dag runs select type filters

fix(tests): Correct  assignment in  fixture

fix: Correct tests for duration and conf_contains filters

fix(test): using from_datetime_to_zulu_without_ms for end date

fix(tests): Correct tuple assignment for  in test setup

* fix(tests): Correct datetime formatting and test expectations in dag_run API tests

* fix(tests): Simplify conf_contains filter test patterns

* test: using int for testing duration

* fix(models): Make DagRun.duration property SQLite-compatible

* fix(i18n): add duration translation keys
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 3, 2025
* feat(ui): implement filterbar for Dag run

feat: add filter for dag Version

feat(api): Add duration filter for Dag runs

feat(ui): implement duration filter for Dag runs

feat(ui,api): implement conf_contains filter

refactor(ui): move trigering user filter into filterbar

refactor: Simplify JSON type detection for filtering

fix(i18n): modify triggering user translation

* fix: resolve conflicts & move all filters into filterBar

* test: Add test for duration and conf_contains filters

test: modify duration test

* fix(ui): Add icons and styled options to Dag runs select type filters

fix(tests): Correct  assignment in  fixture

fix: Correct tests for duration and conf_contains filters

fix(test): using from_datetime_to_zulu_without_ms for end date

fix(tests): Correct tuple assignment for  in test setup

* fix(tests): Correct datetime formatting and test expectations in dag_run API tests

* fix(tests): Simplify conf_contains filter test patterns

* test: using int for testing duration

* fix(models): Make DagRun.duration property SQLite-compatible

* fix(i18n): add duration translation keys
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 4, 2025
* feat(ui): implement filterbar for Dag run

feat: add filter for dag Version

feat(api): Add duration filter for Dag runs

feat(ui): implement duration filter for Dag runs

feat(ui,api): implement conf_contains filter

refactor(ui): move trigering user filter into filterbar

refactor: Simplify JSON type detection for filtering

fix(i18n): modify triggering user translation

* fix: resolve conflicts & move all filters into filterBar

* test: Add test for duration and conf_contains filters

test: modify duration test

* fix(ui): Add icons and styled options to Dag runs select type filters

fix(tests): Correct  assignment in  fixture

fix: Correct tests for duration and conf_contains filters

fix(test): using from_datetime_to_zulu_without_ms for end date

fix(tests): Correct tuple assignment for  in test setup

* fix(tests): Correct datetime formatting and test expectations in dag_run API tests

* fix(tests): Simplify conf_contains filter test patterns

* test: using int for testing duration

* fix(models): Make DagRun.duration property SQLite-compatible

* fix(i18n): add duration translation keys
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 5, 2025
* feat(ui): implement filterbar for Dag run

feat: add filter for dag Version

feat(api): Add duration filter for Dag runs

feat(ui): implement duration filter for Dag runs

feat(ui,api): implement conf_contains filter

refactor(ui): move trigering user filter into filterbar

refactor: Simplify JSON type detection for filtering

fix(i18n): modify triggering user translation

* fix: resolve conflicts & move all filters into filterBar

* test: Add test for duration and conf_contains filters

test: modify duration test

* fix(ui): Add icons and styled options to Dag runs select type filters

fix(tests): Correct  assignment in  fixture

fix: Correct tests for duration and conf_contains filters

fix(test): using from_datetime_to_zulu_without_ms for end date

fix(tests): Correct tuple assignment for  in test setup

* fix(tests): Correct datetime formatting and test expectations in dag_run API tests

* fix(tests): Simplify conf_contains filter test patterns

* test: using int for testing duration

* fix(models): Make DagRun.duration property SQLite-compatible

* fix(i18n): add duration translation keys
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 5, 2025
* feat(ui): implement filterbar for Dag run

feat: add filter for dag Version

feat(api): Add duration filter for Dag runs

feat(ui): implement duration filter for Dag runs

feat(ui,api): implement conf_contains filter

refactor(ui): move trigering user filter into filterbar

refactor: Simplify JSON type detection for filtering

fix(i18n): modify triggering user translation

* fix: resolve conflicts & move all filters into filterBar

* test: Add test for duration and conf_contains filters

test: modify duration test

* fix(ui): Add icons and styled options to Dag runs select type filters

fix(tests): Correct  assignment in  fixture

fix: Correct tests for duration and conf_contains filters

fix(test): using from_datetime_to_zulu_without_ms for end date

fix(tests): Correct tuple assignment for  in test setup

* fix(tests): Correct datetime formatting and test expectations in dag_run API tests

* fix(tests): Simplify conf_contains filter test patterns

* test: using int for testing duration

* fix(models): Make DagRun.duration property SQLite-compatible

* fix(i18n): add duration translation keys
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 7, 2025
* feat(ui): implement filterbar for Dag run

feat: add filter for dag Version

feat(api): Add duration filter for Dag runs

feat(ui): implement duration filter for Dag runs

feat(ui,api): implement conf_contains filter

refactor(ui): move trigering user filter into filterbar

refactor: Simplify JSON type detection for filtering

fix(i18n): modify triggering user translation

* fix: resolve conflicts & move all filters into filterBar

* test: Add test for duration and conf_contains filters

test: modify duration test

* fix(ui): Add icons and styled options to Dag runs select type filters

fix(tests): Correct  assignment in  fixture

fix: Correct tests for duration and conf_contains filters

fix(test): using from_datetime_to_zulu_without_ms for end date

fix(tests): Correct tuple assignment for  in test setup

* fix(tests): Correct datetime formatting and test expectations in dag_run API tests

* fix(tests): Simplify conf_contains filter test patterns

* test: using int for testing duration

* fix(models): Make DagRun.duration property SQLite-compatible

* fix(i18n): add duration translation keys
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 8, 2025
* feat(ui): implement filterbar for Dag run

feat: add filter for dag Version

feat(api): Add duration filter for Dag runs

feat(ui): implement duration filter for Dag runs

feat(ui,api): implement conf_contains filter

refactor(ui): move trigering user filter into filterbar

refactor: Simplify JSON type detection for filtering

fix(i18n): modify triggering user translation

* fix: resolve conflicts & move all filters into filterBar

* test: Add test for duration and conf_contains filters

test: modify duration test

* fix(ui): Add icons and styled options to Dag runs select type filters

fix(tests): Correct  assignment in  fixture

fix: Correct tests for duration and conf_contains filters

fix(test): using from_datetime_to_zulu_without_ms for end date

fix(tests): Correct tuple assignment for  in test setup

* fix(tests): Correct datetime formatting and test expectations in dag_run API tests

* fix(tests): Simplify conf_contains filter test patterns

* test: using int for testing duration

* fix(models): Make DagRun.duration property SQLite-compatible

* fix(i18n): add duration translation keys
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 9, 2025
* feat(ui): implement filterbar for Dag run

feat: add filter for dag Version

feat(api): Add duration filter for Dag runs

feat(ui): implement duration filter for Dag runs

feat(ui,api): implement conf_contains filter

refactor(ui): move trigering user filter into filterbar

refactor: Simplify JSON type detection for filtering

fix(i18n): modify triggering user translation

* fix: resolve conflicts & move all filters into filterBar

* test: Add test for duration and conf_contains filters

test: modify duration test

* fix(ui): Add icons and styled options to Dag runs select type filters

fix(tests): Correct  assignment in  fixture

fix: Correct tests for duration and conf_contains filters

fix(test): using from_datetime_to_zulu_without_ms for end date

fix(tests): Correct tuple assignment for  in test setup

* fix(tests): Correct datetime formatting and test expectations in dag_run API tests

* fix(tests): Simplify conf_contains filter test patterns

* test: using int for testing duration

* fix(models): Make DagRun.duration property SQLite-compatible

* fix(i18n): add duration translation keys
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 10, 2025
* feat(ui): implement filterbar for Dag run

feat: add filter for dag Version

feat(api): Add duration filter for Dag runs

feat(ui): implement duration filter for Dag runs

feat(ui,api): implement conf_contains filter

refactor(ui): move trigering user filter into filterbar

refactor: Simplify JSON type detection for filtering

fix(i18n): modify triggering user translation

* fix: resolve conflicts & move all filters into filterBar

* test: Add test for duration and conf_contains filters

test: modify duration test

* fix(ui): Add icons and styled options to Dag runs select type filters

fix(tests): Correct  assignment in  fixture

fix: Correct tests for duration and conf_contains filters

fix(test): using from_datetime_to_zulu_without_ms for end date

fix(tests): Correct tuple assignment for  in test setup

* fix(tests): Correct datetime formatting and test expectations in dag_run API tests

* fix(tests): Simplify conf_contains filter test patterns

* test: using int for testing duration

* fix(models): Make DagRun.duration property SQLite-compatible

* fix(i18n): add duration translation keys
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 11, 2025
* feat(ui): implement filterbar for Dag run

feat: add filter for dag Version

feat(api): Add duration filter for Dag runs

feat(ui): implement duration filter for Dag runs

feat(ui,api): implement conf_contains filter

refactor(ui): move trigering user filter into filterbar

refactor: Simplify JSON type detection for filtering

fix(i18n): modify triggering user translation

* fix: resolve conflicts & move all filters into filterBar

* test: Add test for duration and conf_contains filters

test: modify duration test

* fix(ui): Add icons and styled options to Dag runs select type filters

fix(tests): Correct  assignment in  fixture

fix: Correct tests for duration and conf_contains filters

fix(test): using from_datetime_to_zulu_without_ms for end date

fix(tests): Correct tuple assignment for  in test setup

* fix(tests): Correct datetime formatting and test expectations in dag_run API tests

* fix(tests): Simplify conf_contains filter test patterns

* test: using int for testing duration

* fix(models): Make DagRun.duration property SQLite-compatible

* fix(i18n): add duration translation keys
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 12, 2025
* feat(ui): implement filterbar for Dag run

feat: add filter for dag Version

feat(api): Add duration filter for Dag runs

feat(ui): implement duration filter for Dag runs

feat(ui,api): implement conf_contains filter

refactor(ui): move trigering user filter into filterbar

refactor: Simplify JSON type detection for filtering

fix(i18n): modify triggering user translation

* fix: resolve conflicts & move all filters into filterBar

* test: Add test for duration and conf_contains filters

test: modify duration test

* fix(ui): Add icons and styled options to Dag runs select type filters

fix(tests): Correct  assignment in  fixture

fix: Correct tests for duration and conf_contains filters

fix(test): using from_datetime_to_zulu_without_ms for end date

fix(tests): Correct tuple assignment for  in test setup

* fix(tests): Correct datetime formatting and test expectations in dag_run API tests

* fix(tests): Simplify conf_contains filter test patterns

* test: using int for testing duration

* fix(models): Make DagRun.duration property SQLite-compatible

* fix(i18n): add duration translation keys
dabla pushed a commit to dabla/airflow that referenced this pull request Oct 12, 2025
* feat(ui): implement filterbar for Dag run

feat: add filter for dag Version

feat(api): Add duration filter for Dag runs

feat(ui): implement duration filter for Dag runs

feat(ui,api): implement conf_contains filter

refactor(ui): move trigering user filter into filterbar

refactor: Simplify JSON type detection for filtering

fix(i18n): modify triggering user translation

* fix: resolve conflicts & move all filters into filterBar

* test: Add test for duration and conf_contains filters

test: modify duration test

* fix(ui): Add icons and styled options to Dag runs select type filters

fix(tests): Correct  assignment in  fixture

fix: Correct tests for duration and conf_contains filters

fix(test): using from_datetime_to_zulu_without_ms for end date

fix(tests): Correct tuple assignment for  in test setup

* fix(tests): Correct datetime formatting and test expectations in dag_run API tests

* fix(tests): Simplify conf_contains filter test patterns

* test: using int for testing duration

* fix(models): Make DagRun.duration property SQLite-compatible

* fix(i18n): add duration translation keys
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 14, 2025
* feat(ui): implement filterbar for Dag run

feat: add filter for dag Version

feat(api): Add duration filter for Dag runs

feat(ui): implement duration filter for Dag runs

feat(ui,api): implement conf_contains filter

refactor(ui): move trigering user filter into filterbar

refactor: Simplify JSON type detection for filtering

fix(i18n): modify triggering user translation

* fix: resolve conflicts & move all filters into filterBar

* test: Add test for duration and conf_contains filters

test: modify duration test

* fix(ui): Add icons and styled options to Dag runs select type filters

fix(tests): Correct  assignment in  fixture

fix: Correct tests for duration and conf_contains filters

fix(test): using from_datetime_to_zulu_without_ms for end date

fix(tests): Correct tuple assignment for  in test setup

* fix(tests): Correct datetime formatting and test expectations in dag_run API tests

* fix(tests): Simplify conf_contains filter test patterns

* test: using int for testing duration

* fix(models): Make DagRun.duration property SQLite-compatible

* fix(i18n): add duration translation keys
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 15, 2025
* feat(ui): implement filterbar for Dag run

feat: add filter for dag Version

feat(api): Add duration filter for Dag runs

feat(ui): implement duration filter for Dag runs

feat(ui,api): implement conf_contains filter

refactor(ui): move trigering user filter into filterbar

refactor: Simplify JSON type detection for filtering

fix(i18n): modify triggering user translation

* fix: resolve conflicts & move all filters into filterBar

* test: Add test for duration and conf_contains filters

test: modify duration test

* fix(ui): Add icons and styled options to Dag runs select type filters

fix(tests): Correct  assignment in  fixture

fix: Correct tests for duration and conf_contains filters

fix(test): using from_datetime_to_zulu_without_ms for end date

fix(tests): Correct tuple assignment for  in test setup

* fix(tests): Correct datetime formatting and test expectations in dag_run API tests

* fix(tests): Simplify conf_contains filter test patterns

* test: using int for testing duration

* fix(models): Make DagRun.duration property SQLite-compatible

* fix(i18n): add duration translation keys
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 17, 2025
* feat(ui): implement filterbar for Dag run

feat: add filter for dag Version

feat(api): Add duration filter for Dag runs

feat(ui): implement duration filter for Dag runs

feat(ui,api): implement conf_contains filter

refactor(ui): move trigering user filter into filterbar

refactor: Simplify JSON type detection for filtering

fix(i18n): modify triggering user translation

* fix: resolve conflicts & move all filters into filterBar

* test: Add test for duration and conf_contains filters

test: modify duration test

* fix(ui): Add icons and styled options to Dag runs select type filters

fix(tests): Correct  assignment in  fixture

fix: Correct tests for duration and conf_contains filters

fix(test): using from_datetime_to_zulu_without_ms for end date

fix(tests): Correct tuple assignment for  in test setup

* fix(tests): Correct datetime formatting and test expectations in dag_run API tests

* fix(tests): Simplify conf_contains filter test patterns

* test: using int for testing duration

* fix(models): Make DagRun.duration property SQLite-compatible

* fix(i18n): add duration translation keys
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 19, 2025
* feat(ui): implement filterbar for Dag run

feat: add filter for dag Version

feat(api): Add duration filter for Dag runs

feat(ui): implement duration filter for Dag runs

feat(ui,api): implement conf_contains filter

refactor(ui): move trigering user filter into filterbar

refactor: Simplify JSON type detection for filtering

fix(i18n): modify triggering user translation

* fix: resolve conflicts & move all filters into filterBar

* test: Add test for duration and conf_contains filters

test: modify duration test

* fix(ui): Add icons and styled options to Dag runs select type filters

fix(tests): Correct  assignment in  fixture

fix: Correct tests for duration and conf_contains filters

fix(test): using from_datetime_to_zulu_without_ms for end date

fix(tests): Correct tuple assignment for  in test setup

* fix(tests): Correct datetime formatting and test expectations in dag_run API tests

* fix(tests): Simplify conf_contains filter test patterns

* test: using int for testing duration

* fix(models): Make DagRun.duration property SQLite-compatible

* fix(i18n): add duration translation keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

allow translation change This label should be set if we want to bypass translation freeze and change english translations. area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Filters] Add filtering support to Search – DAG Runs

4 participants