* Alerting: Call RLock() before reading sendAlertsTo map
* defer unlocking
* drive-tru fix for another lock
* less time holding the lock in SyncAndApplyConfigFromDatabase
* Tempo: Replace deprecated @grafana/experimental with @grafana/plugin-ui
* Add also pyroscope and tracing features
* align version of package with main
Valid MSSQL database names can contain characters like `-`, which need
to be escaped when used in queries.
This PR wraps database names in `[]`, and fixes Grafana issue #58757.
* chore: use IRM plugin ID instead of OnCall / Incident if it's present in the stack
* minor improvements
* fix unit tests
* Add IRM plugin discovery tests
---------
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
* Upgrade grafana-app-sdk to 0.31.0
What
This commit upgrades the app SDK to 0.31.0 and re-generates codegen files.
It doesn't touch alerting schemas, because those are quite old and
should be upgraded separately.
This commit slightly alters the schemas for the investigations app,
because the codegen is not happy with the current syntax, for some
reason (probably has to do with CUE upgrades in `cog`).
Why
To make sure we use up-to-date SDK version and remove the workaround for
the `defencoding=none` bug that required us to clean up generated CRD
files.
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Revert changes to golden file for store tests
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
---------
Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
* Testing out rows in schemav2
* update schema
* loading sort of works
* descibe position in relation to row
* add row repeats by variable
* explain ts-expect-error
* Save repeats as well
* Update tests for repeat behavior of rows
* Don't add the clones of the repeated rows
* Add row support for response transformer for V2
* Add row actions
* fix panel name
* fix merge issue
* fix tests
* Implement ensureV1
* set key of GridRow
* fix lint issue
* When going from V2 to V1 rows should be assigned unique ids following max panel id
* remove old comment
* Add panel repeats in V2 -> V1 transform
* Alerting: Fix Alertmanager configuration updates
Alertmanager configuration updates would behave inconsistently when performing no-op updates with `mysql` as the store.
In particular this bug manifested as a failure to reload the provisioned alertmanager configuration components with no changes to the configuration itself. This would result in a 500 error with mysql store only.
The core issue is that we were relying on the number of rows affected by the update query to determine if the configuration was found in the db or not.
While this behavior works for certain sql dialects, mysql does not return the number of rows matched by the update query but rather the number of rows actually updated.
Also discovered and fixed the mismatched `xorm` tag for the `CreatedAt` field to match the actual column name in the db.
References: https://dev.mysql.com/doc/refman/8.4/en/update.html