Skip to content

Add auto refresh for HistoricalMetrics #49830

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

Merged
merged 1 commit into from
Apr 28, 2025

Conversation

guan404ming
Copy link
Contributor

@guan404ming guan404ming commented Apr 26, 2025

Related Issue

closes: #49672
cc: @bbovenzi @tirkarthi

Why

HistoricalMetrics refresh will keep changing the last hour date

How

Auto-refresh them


^ 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 Apr 26, 2025
@guan404ming guan404ming force-pushed the refresh-historical-metric branch 3 times, most recently from c5800af to 45a274f Compare April 27, 2025 19:49
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.

Overall looks good.

I'm wondering if this shouldn't always refresh. Autorefresh will stop when everything is settled, but won't update anymore if dagrun starts afterward... which is not great for a dashboard I think. Basically you can't leave that on a screen to monitor your cluster, things will stop refreshing after a while. (unless you'r very lucky and there's always a run ongoing.

@guan404ming
Copy link
Contributor Author

Ummmm The case makes sense to me. If we do want to monitor only when there are some pending task or dag, we need to do lots of trick (like auto-refresh until it has some run or something more tricky?) to perform the func that we want. I think how about just turn it back to auto-refresh for any condition?

@pierrejeambrun
Copy link
Member

pierrejeambrun commented Apr 28, 2025

I think how about just turn it back to auto-refresh for any condition?

I think in this particular context it makes sense. On other pages, for instance DagRun details, once the DagRun is settled, there is no need to go further and keep refreshing, nothing will change.

Here I think the use case is different on the overview page, that can be a long lasting page that will need to keep refreshing even if things are all settled for a while.

@guan404ming guan404ming force-pushed the refresh-historical-metric branch from 052e089 to 94e3958 Compare April 28, 2025 13:16
@guan404ming guan404ming force-pushed the refresh-historical-metric branch from 94e3958 to ede8f46 Compare April 28, 2025 13:49
@guan404ming guan404ming force-pushed the refresh-historical-metric branch from ede8f46 to 9fe66a0 Compare April 28, 2025 14:25
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

@pierrejeambrun pierrejeambrun added the backport-to-v3-0-test Mark PR with this label to backport to v3-0-test branch label Apr 28, 2025
@pierrejeambrun pierrejeambrun merged commit cdf394b into apache:main Apr 28, 2025
42 checks passed
github-actions bot pushed a commit that referenced this pull request Apr 28, 2025
(cherry picked from commit cdf394b)

Co-authored-by: Guan Ming(Wesley) Chiu <[email protected]>
Co-authored-by: pierrejeambrun <[email protected]>
@guan404ming
Copy link
Contributor Author

Thanks for the review and suggestion~

Copy link

Backport successfully created: v3-0-test

Status Branch Result
v3-0-test PR Link

@guan404ming guan404ming deleted the refresh-historical-metric branch April 28, 2025 14:50
pierrejeambrun added a commit that referenced this pull request Apr 28, 2025
(cherry picked from commit cdf394b)

Co-authored-by: Guan Ming(Wesley) Chiu <[email protected]>
Co-authored-by: pierrejeambrun <[email protected]>
mvfc pushed a commit to mvfc/airflow that referenced this pull request Apr 29, 2025
mvfc pushed a commit to mvfc/airflow that referenced this pull request Apr 29, 2025
jroachgolf84 pushed a commit to jroachgolf84/airflow that referenced this pull request Apr 30, 2025
@guan404ming guan404ming changed the title feat: auto refresh for HistoricalMetrics Add auto refresh for HistoricalMetrics Apr 30, 2025
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. backport-to-v3-0-test Mark PR with this label to backport to v3-0-test branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Information on Home/Welcome page are not auto-refreshed (have to refresh the page)
2 participants