Skip to content
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

Asynchronous requests to retrieve stats in clusters list #435

Merged
merged 8 commits into from
Jan 30, 2025
Merged

Conversation

rezib
Copy link
Contributor

@rezib rezib commented Jan 10, 2025

Some tasks are still pending:

  • Add loading placeholders
  • Add unit tests to cover ClustersView and ClusterListItem component
  • Update gateway assets with new /clusters response

fix #428

@rezib rezib added the refactor Code refactoring to reduce maintenance cost and technical debt label Jan 10, 2025
@rezib rezib added this to the v4.1.0 milestone Jan 10, 2025
@rezib rezib self-assigned this Jan 10, 2025
@rezib rezib force-pushed the pr/fix-428 branch 3 times, most recently from 1cd70d7 to 8f01abe Compare January 13, 2025 20:41
@rezib rezib marked this pull request as ready for review January 13, 2025 20:43
@rezib rezib force-pushed the pr/fix-428 branch 2 times, most recently from 6da46b0 to fccbb10 Compare January 17, 2025 21:44
rezib added 8 commits January 30, 2025 15:21
Do not return clusters global stats in /clusters endpoint anymore. These
stats can take lot of time to get from clusters, depending on the number
of jobs and cache status. The user experience is better if the frontend
can quickly retrieve the clusters list with their permissions and then
clusters stats asynchronously.
Instead of expecting the clusters stats in response along the clusters
list, send asynchronous requests to retrieve the stats on all clusters
after the list of clusters is rendered to users.

fix #428
Introduce ClusterListItem component in order to move some code out of
ClustersView and simplify logic of parallel and asynchronous cluster
stats retrieval.
Do not report ongoing issue when users do not have permission on
view-stats action on a cluster in clusters list page.
Display loading spinner when loading cluster stats in clusters list.
Add unit tests to cover ClustersView and ClustersListItem component.
Introduce ClusterDescription boolean error flag to share error status
when retrieving stats between ClustersListItem and ClustersPopOver
components.
@rezib rezib merged commit cb77b36 into main Jan 30, 2025
10 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
refactor Code refactoring to reduce maintenance cost and technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split clusters and jobs/nodes retrieval to minimize rendering time of clusters list
1 participant