-
Notifications
You must be signed in to change notification settings - Fork 4
[FIX] Add retry if first dashboard retrieval fails #9
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
Conversation
|
Hey, @lmarques03 thanks for the contribution! |
|
Hello, @nicolastakashi. Apart from all of this, I was not able to replicate the error in my local environment, even when importing the same dashboards as in prd. |
|
Hey, @lmarques03 thanks for the clarification. WDT? |
|
@nicolastakashi That sounds like a good idea. Would you prefer to mantain the retry (and do it only when the error is 404), or simply ignore the error altogether, and wait for the next iteration? |
|
Hi @lmarques03 I would say we can just handle the 404 as an warn instead of an error, because the retry is out of the box implemented by the pooling interval, wdyt? |
|
Hello @nicolastakashi. I changed the code to handle 404 as a warning. It should be fine now. Please review and let me know what you think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're using continue you don't need the else on the if statement
|
Yeah that was dumb. I fixed it now. |
Occasionally when retrieving the dashboard information, an error would occur with the message:
"msg="status: 404, body: {\"message\":\"Dashboard not found\"}"After some investigation it was concluded that the error occurred when the request to Grafana API coincided with the restart of Grafana pods.
This PR adds a one-time retry if the GET request fails.