Skip to content

fix: get the correct schedule for asset-triggered Dags#62868

Merged
bbovenzi merged 1 commit intoapache:mainfrom
astronomer:use-adrq-count-as-scheduled
Mar 4, 2026
Merged

fix: get the correct schedule for asset-triggered Dags#62868
bbovenzi merged 1 commit intoapache:mainfrom
astronomer:use-adrq-count-as-scheduled

Conversation

@Lee-W
Copy link
Copy Markdown
Member

@Lee-W Lee-W commented Mar 4, 2026

Why

Closes: #55515

The original logic is not accurate. We should get the number of queued events

What

Get the number of queued events instead of depending on the last run which can be a manual one


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)
    cursor

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {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 Mar 4, 2026
@Lee-W Lee-W changed the title fix: use useAssetServiceGetDagAssetQueuedEvents to get the correct number of ADRQs fix: use get the correct schdule for asset triggered Dags Mar 4, 2026
@Lee-W Lee-W changed the title fix: use get the correct schdule for asset triggered Dags fix: get the correct schedule for asset triggered Dags Mar 4, 2026
@Lee-W Lee-W changed the title fix: get the correct schedule for asset triggered Dags fix: get the correct schedule for asset-triggered Dags Mar 4, 2026
Copy link
Copy Markdown
Member

@guan404ming guan404ming left a comment

Choose a reason for hiding this comment

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

Thanks!

@bbovenzi bbovenzi merged commit 36e02fa into apache:main Mar 4, 2026
78 checks passed
@bbovenzi bbovenzi deleted the use-adrq-count-as-scheduled branch March 4, 2026 19:58
Lee-W added a commit to astronomer/airflow that referenced this pull request Mar 5, 2026
Lee-W added a commit to astronomer/airflow that referenced this pull request Mar 5, 2026
Lee-W added a commit that referenced this pull request Mar 5, 2026
@vatsrahul1001 vatsrahul1001 added this to the Airflow 3.1.8 milestone Mar 5, 2026
Copy link
Copy Markdown
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.

This is creating a lot of noise in the UI:

Image

Is it possible to maybe update the backend endpoint to instead return an empty list when no queuedEvents are found? (list should return empty list, and 404 should only happen when querying a specific event) And update the UI accordingly?

@guan404ming
Copy link
Copy Markdown
Member

Thanks, here is the pr #62934

dominikhei pushed a commit to dominikhei/airflow that referenced this pull request Mar 11, 2026
skymensch added a commit to skymensch/airflow that referenced this pull request Apr 3, 2026
…umer DAG run

The ``next_run_assets`` UI endpoint was not tested for the case where a consumer
DAG has never run before. This caused a regression in older versions (3.1.x) where
the frontend relied on ``latestRunAfter`` being defined to show queued assets, making
the counter always show "0 of N" on the first run cycle.

The fix (frontend, PR apache#62868) switched to using ``AssetDagRunQueue`` records via
``useAssetServiceGetDagAssetQueuedEvents`` for the counter, which works correctly
regardless of whether a prior run exists. This test ensures the backend correctly
returns ``lastUpdate`` for queued assets even when no ``DagRun`` has ever been created.

closes: apache#64616

Signed-off-by: Haneul Yeom <haneul0826@gmail.com>
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.

Airflow UI shows incorrect assets updated number after manual run

5 participants