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

fix(dashboards): Use loading indicator to avoid multiple requests #56558

Conversation

narsaynorath
Copy link
Member

@narsaynorath narsaynorath commented Sep 20, 2023

Dashboard widgets were doing 2x the requests when there should only be one. This causes the occurrence of 429s to increase when opening a dashboard and is a poor user experience. The issue was hiding the loading in the metrics compatibility check. If we don't use the loader then the children (i.e. the widgets) will attempt to render, triggering a bunch of requests to our dashboard endpoints, and when the check is complete then we'll re-render and re-fetch metrics enhanced data.

I'm re-enabling the loading state because this is a big issue and it doesn't look out of place when the dashboard is loading up either.

During the metrics compatibility check, if we don't use the loader then
the children will attempt to render, triggering a bunch of requests to
our dashboard endpoints. This causes the occurrence of 429s to increase.

I'm re-enabling the loading state because this is a big issue and it
doesn't look out of place when the dashboard is loading up either.
@narsaynorath narsaynorath requested a review from a team September 20, 2023 13:46
@narsaynorath narsaynorath marked this pull request as ready for review September 20, 2023 13:47
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Sep 20, 2023
Copy link
Contributor

@Abdkhan14 Abdkhan14 left a comment

Choose a reason for hiding this comment

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

Makes sense to me

@narsaynorath narsaynorath enabled auto-merge (squash) September 20, 2023 14:13
@narsaynorath narsaynorath merged commit 3ffcefc into master Sep 20, 2023
43 checks passed
@narsaynorath narsaynorath deleted the nar/fix/dashboards-multiple-requests-due-to-hiding-metrics-loader branch September 20, 2023 14:14
@github-actions github-actions bot locked and limited conversation to collaborators Oct 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants