Skip to content

Conversation

@bbovenzi
Copy link
Contributor

@bbovenzi bbovenzi commented Feb 13, 2025

I built this off of the UI changes for run_after so ignore the first commit.

Closes #46731

Allow dag run endpoints to be sorted by run_after and filtered by run_after_gte and run_after_lte.

Also query recent dag runs for our ui/dags endpoint by run_after instead of logical_date, since it was missing manually triggered dags.

How to replicate bugs:

  1. on main, manually trigger a few dag runs without setting logical_date,
  2. Go to the dags list page in the new UI. Look for your dag. See that there is nothing for "Latest Dag Run" and there is no run duration bar chart
  3. Go to the dag runs list. Try to sort by run_after and get an error
  4. Mark the dag run as failed. Go to dag overview page. See that there is no "X failed runs" button above the run duration chart.

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

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Feb 13, 2025
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.

We probably want to update the dag_run tests. (order_by and filters are tested there def test_filters, def test_dag_runs_ordering)

@bbovenzi bbovenzi merged commit 8f63b82 into apache:main Feb 14, 2025
45 checks passed
@bbovenzi bbovenzi deleted the add-run_after-to-dag-runs-api branch February 14, 2025 16:08
alecsg77 pushed a commit to alecsg77/airflow that referenced this pull request Feb 14, 2025
* Fix some UI usage of logical_date vs run_after

* Add run_after as sort param for dag runs endpoints

* Swap gte/lte search for failed dag run button

* Replace another missed logical_date sort

* Update tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AIP-84 Make dag runs list sortable by run_after

4 participants