-
Notifications
You must be signed in to change notification settings - Fork 7
Conversation
src/warnings_cache.ts
Outdated
@@ -0,0 +1,61 @@ | |||
export declare namespace IWarningsCache { |
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.
Is the I
for inline or interface? Can this be named more descriptive?
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.
Is the I for inline or interface?
Interface.
Can this be named more descriptive?
👍
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.
I had one question about the naming otherwise LGTM.
I've been holding off on moving forward with this until I've had a clearer picture for how Heroic error handling could work and thus play with this cacheing implementation. Since Heroic responses could contain time series data, even those containing errors/limits/etc - relying on Grafana's native alerting to display warnings to users is not possible. Datasource responses must be rejected and doing so will discard the data. The datasource currently relies on the The alternative approach would be to raise warnings manually at the time of the query, before the response is passed to Grafana. Since many different components within Grafana can trigger a datasource query, these warnings could be triggered excessively. The datasource receives limited context at the time of the query, so being able to conditionally render warnings whether in dashboard or panel mode is not possible. Additionally, Grafana offers no way to map I'm going to stick a pin in this until a cleaner solution becomes available. |
testing - initialize variables before each test run formatting + move error warnings from inline to multiple labels add and clear warnings from cache to persist across navigations return an array of warning messages instead of a string with line breaks deprecate event names as strings update tsconfig to allow typescript support of es7 add cache key to series metadata. cache errors before returning series to grafana for rendering add cache key to series metadata cleanup Use app events for suggestion alerting; check if series exists before checking for suggestions; git cleanup add warningsKey type warnings -> suggestions; return array of strings for rendering cache for heroic query error warnings
Several updates were made since this PR and makes changes to how errors are displayed in the datasource
|
This PR contains the following changes:
Currently, "inline" error warnings are lost between dashboard <--> panel navigations. Heroic (not Grafana) warnings are only generated after data is received in the query panel. When users navigate away from the editor to the dashboard and back to the editor - without requerying - these warnings are lost and can lead to confusion.
Warnings will now persist in the query editor across panel/dashboard navigations until they are manually dismissed or the user requeries Heroic. This PR does not address dashboard level warnings (aka "dogear" warnings) generated by Grafana and may be addressed in a separate PR.