Metrics dashboard: Fix error handling by using a backoff timeout and a flash notice
What does this MR do?
Background
When a metric cannot be loaded, our frontend would stop after 3 tries if a metric loading failed. This change removes the retry count and replaces it with a long timeout.
This is done by grouping all dashboard metrics requests in a Promise.all and by prompting the user when any of them fails.
The other metrics can still load, so specs are added to emulate these condition when a single metric fails have been updated.
Implementation
- Removed the 3 retry count for requests to the PromQL proxy API, under the assumption that the request and corresponding cache might not have enough time to respond.
- Keep using backOff, to avoid over-requesting to the server.
- Use a timeout intead, with a long value of TWO_MINUTES.
- Remove the catch, so the dashboard can attempt to continue loading, and hence display errors already setup.
Screenshots
N/A
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Closes #32778 (closed)
Edited by 🤖 GitLab Bot 🤖