Commit Graph

8143 Commits

Author SHA1 Message Date
Grot (@grafanabot)
504ecbd4f9 Plugins: Improved handling of symlinks (#51324) (#51431)
Improves how we handle symlinks in plugin management.

(cherry picked from commit 04df634ef5)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-06-27 06:41:51 -04:00
Marcus Efraimsson
e037f7ace7 [v9.0.x] Plugins: Use a Grafana specific SDK logger implementation for core plugins (#51229) (#51325)
* Plugins: Use a Grafana specific SDK logger implementation for core plugins (#51229)

Upgrade grafana-aws-sdk to v0.10.6

(cherry picked from commit a8eb29f1d7)

* fix go.mod go.sum
2022-06-27 12:22:28 +02:00
Grot (@grafanabot)
c54f381570 [v9.0.x] Alerting: Remove fmt.Println from Threema (#51382)
Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-24 16:05:31 +02:00
Grot (@grafanabot)
b429aa11fe AzureMonitor: Parse non-fatal errors for Logs (#51320) (#51362)
(cherry picked from commit b10ddfdf8c)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-06-24 09:13:15 +02:00
Alexander Weaver
40ff163fde Alerting: Code-gen parsing of URL parameters and fix related bugs (#50731) (#51353)
* Extend template and generate

* Generate and fix up alertmanager endpoints

* Prometheus routes

* fix up Testing endpoints

* touch up ruler API

* Update provisioning and fix 500

* Drop dead code

* Remove more dead code

* Resolve merge conflicts

(cherry picked from commit 0d9389e1f4)
2022-06-23 16:51:01 -04:00
gotjosh
d1c45321f7 Alerting: Don't stop the migration when alert rule tags are invalid (#51253) (#51341)
* Alerting: Don't stop the migration when alert rule tags are invalid

As we migrate we expect the `alertRuleTags` on a dashboard alert to be a JSON object. However, it seems this is not really validated by Grafana and an user can change the format to something else that the JSON parser is not able to marshal into a `map[string]string`.

Let's do a bit better by "attempting" to parse the tags and if we can't we'll simple return an empty map. The data is still there so if the user wishes they can go back, fix the data and attemp the migration again.

(cherry picked from commit 90646e7f41)
2022-06-23 19:51:22 +02:00
Grot (@grafanabot)
bacb7893d6 Encryption: Stop decrypting EE encrypted secrets with legacy encryption (#50090) (#51309)
(cherry picked from commit 7a614fd8a1)

Co-authored-by: Tania <yalyna.ts@gmail.com>
2022-06-23 14:09:06 +02:00
Grot (@grafanabot)
00165544bd Query history: Fix default value when no config (#51129) (#51167)
* Query history: Fix default value in setting.go

* Update for frontend

* Remove frontend update

(cherry picked from commit 62e55d530d)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-06-22 17:08:23 +02:00
Grot (@grafanabot)
a8401fc8e8 OAuth: Restore debug log behavior (#51244) (#51247)
(cherry picked from commit d2ab3556fa)

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
2022-06-22 15:44:55 +02:00
Grot (@grafanabot)
7d537849b3 Alerting: Add support for images in Kafka alerts (#50758) (#51231)
(cherry picked from commit 6e44b36a30)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-22 11:16:08 +01:00
Grot (@grafanabot)
beeefd36f5 Alerting: Add support for images in VictorOps alerts (#50759) (#51228)
(cherry picked from commit 99516360c9)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-22 10:27:46 +01:00
Serge Zaitsev
72c6512e3f [v9.0.x] Chore: Remove global bus variable (#51126)
* Chore: Remove global bus variable (#50765)

* Chore: Remove global bus variable

* fix bus in tests

(cherry picked from commit 0b55c41d05)

* fix the imports
2022-06-21 11:40:44 +02:00
Grot (@grafanabot)
fd4c0ac83a Alerting: Add support for image annotation in Alertmanager alerts (#50686) (#51145)
(cherry picked from commit c8466d285c)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-21 09:36:35 +01:00
Ryan McKinley
2e14e277a9 [v9.0.x] Heatmap: Sync main and 9.0.1 heatmap-new (#51136) 2022-06-20 20:52:11 -07:00
Grot (@grafanabot)
ca14dc2288 Alerting: Add support for images in Threema alerts (#50734) (#51127)
(cherry picked from commit 67046c5e79)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-20 16:01:53 +01:00
Grot (@grafanabot)
5a1842635d Alerting: Use ErrImagesDone in Discord and SensuGo (#51106) (#51125)
(cherry picked from commit 7235480be5)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-20 15:11:46 +01:00
Grot (@grafanabot)
d6f2ebb9ae Alerting: Support up to N fake images (#51111) (#51119)
(cherry picked from commit 18c3456d13)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-20 14:53:08 +01:00
Grot (@grafanabot)
51344afeaf [v9.0.x] Alerting: Adds Mimir to Alertmanager data source implementation (#51109)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-20 13:14:09 +02:00
Grot (@grafanabot)
35d6b46cc8 Alerting: Add ErrImagesDone to return from withStoredImages (#51098) (#51104)
(cherry picked from commit 62c2b1ec78)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-20 11:11:25 +01:00
Grot (@grafanabot)
828c4d4926 Alerting: Update test funcs for notifications (#51013) (#51095)
(cherry picked from commit 2dbaf259a7)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-20 09:30:32 +01:00
Grot (@grafanabot)
49aaa5c955 Search: fix anonymous user access (#51045) (#51055)
(cherry picked from commit 40b152e813)

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-06-17 18:53:38 +02:00
Grot (@grafanabot)
a24941f718 Alerting: Create algorithm to process receiver changes and keep them consistent internally (#50738) (#51050)
* Algorithm to fix up receivers

* Extract for tests

* Add tests, fix bug

* Add test which demonstrates how it fixes up broken groups

* Fix package prefix

(cherry picked from commit 9bbfeedadf)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-06-17 10:31:41 -05:00
Grot (@grafanabot)
75501eac48 Previews: use ETag header (#51008) (#51041)
* use etag header for previews

* use unix millis rather than tz-dependant string

(cherry picked from commit 644503f5e6)

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-06-17 16:16:24 +02:00
Grot (@grafanabot)
ffb381144c loki: fix bug in labels framing (#51015) (#51029)
(cherry picked from commit fd63ed540f)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-06-17 13:09:06 +02:00
Grot (@grafanabot)
78804d8661 loki: add type=instant tests (#51007) (#51016)
(cherry picked from commit 109bc7e940)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-06-17 10:05:26 +02:00
Gábor Farkas
f12b86f7ec Loki: Handle data source configs with path in the url (#50971) (#51006)
* loki: fixed param-name

* loki: handle datasource configs with path in the url

* lint fix

(cherry picked from commit ccc587dc0f)
2022-06-17 08:22:42 +02:00
Grot (@grafanabot)
50c729c23e Bug: Fix delete dashboard snapshot for deleted dashboards (#50919) (#50937)
* Bug: Fix delete dashboard snapshot for deleted dashboards

* Fix lint and make it work for all the errors

* Fix lint

(cherry picked from commit 8ab8ce609b)

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
2022-06-16 13:27:16 +02:00
Ashley Harrison
87a325e6df Chore: Remove newNavigation feature toggle and old navbar code (#50872) (#50932)
* Remove newNavigation feature toggle + old code

* fix unit tests

* remove buildCreateNavLinks

(cherry picked from commit d0fa326798)
2022-06-16 11:26:46 +01:00
Grot (@grafanabot)
1bca3be52f Prometheus: Fix body not being included in resource calls if they are POST (#50833) (#50886)
* Pass on request body

* Fix GETs and add tests

* Fix err handling

* Add comments

* Close response body

* Fix lint maybe

* Fix test

(cherry picked from commit 07be95a001)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-06-16 10:52:50 +02:00
Marcus Efraimsson
e0d1f9aedc CLI: Allow relative symlinks in zip archives when installing plugins (#50537) (#50877)
Earlier we only allowed symlinks in plugins starting with grafana- in zip archives when
installing plugins using the grafana-cli. This changes so that symlinks in zip archives
containing relative links to files in the zip archive are always allowed when installing
plugins. The reasoning behind this is that Grafana per default doesn't load a plugin
that has an invalid plugin signature meaning that any symlink must be included in
the plugin signature manifest.

Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
(cherry picked from commit b47ec36d0d)
2022-06-15 17:06:08 +02:00
Grot (@grafanabot)
efc29caf67 Alerting: Add support for images in SensuGo alerts (#50718) (#50853) 2022-06-15 11:30:35 +02:00
Dimitris Sotirakis
d543bb242f Grafana 9: Sync release-v9.0.0 branch to v9.0.x (#50844)
* Docs: Manual backport of alert list panel docs rewrite (#50512)

* Updating migration docs to include most relevant breaking changes (#50356) (#50515)

(cherry picked from commit cd01eb541a)

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>

* ReleaseNotes: Updated changelog and release notes for 9.0.0-beta2 (#50398) (#50521)

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
(cherry picked from commit a6943cb399)

* Alerting: Fix force_migration when alerting is disabled (#50431) (#50481) (#50565)

This pull request fixes a bug where force_migration must be set to true when both unified and legacy alerting is disabled.

(cherry picked from commit c312188cb2)

* [release-v9.0.0] Grafana UI: Fix nonexistent indexof module for plugin tests (#50573)

* Grafana UI: Fix nonexistent indexof module for plugin tests (#50529)

* fix(grafana-ui): prevent module resolution failure where component-indexof appears as indexof

* chore(grafana-ui): update comment explaining need for alias plugin

(cherry picked from commit 6a4906ef7e)

* chore: refresh yarn.lock

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* [release-v9.0.0] Grafana UI: Put back production build in rollup config (#50581)

* Grafana UI: Put back production build in rollup config (#50575)

(cherry picked from commit 2d1ab27636)

* chore: refresh yarn.lock

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* [release-v9.0.0] Alerting: use "find" to wait for expression editor to load (#50604)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>

* Docs: Backport 49739 to v9.0.x (#50123) (#50614)

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 49b20ad76c)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* Alerting: improve provisioning docs (#50347) (#50619)

* Alerting: improve provisioning docs

* add new provisioning page

* add api docs

* fix formatting and add better descriptions

* fix typo

(cherry picked from commit 862f51216b)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>

* Backport docs changes for Grafana Alerting (#50620)

* doc fix (#50624) (#50627)

(cherry picked from commit 336c9fd513)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>

* RBAC: Inheritance permission migration should handle empty managed roles (#50611) (#50622)

* Make inheritance permission migration more robust

* Better fix

* Add more tests to the migration

* Add removed test case

* Add test case for empty role in empty org

* Handling the role.ID 0 case with a log

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
(cherry picked from commit 307a0d4538)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* "Release: Updated versions in package to 9.0.0" (#369)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-06-15 12:13:14 +03:00
Grot (@grafanabot)
8ef7fd3859 backend: add PlaylistUIDs to Playlist; remove playlist IDs from API (#49609) (#50828)
* backend/api: refactor PlaylistId to PlaylistUid
* Add org_id to Get and Update playlist functions
Fix migration - no longer pad the uid; fix mysql syntax

The relevant tests are passing using postgres, mysql and the default sqllite backends, but there are a number of other failing tests when using postgres and myself so I'm not entirely confident with those results.

* fix bad query in GetPlaylistItem and add a test that would have caught the mistake in the first place. Reverted the playlist_uid column addition in playlist_item; it became unnecessary after this PR.

Added default value to the new UID column based on PR feedback.

* break this PRs migration into its own function

* Playlists: Update UI to use the updated API

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
(cherry picked from commit a33a023629)

Co-authored-by: Kristin Laemmert <mildwonkey@users.noreply.github.com>
2022-06-14 15:48:44 -04:00
Grot (@grafanabot)
57300f6b6d Metrics: Expose functions to initialize counters at zero (#50122) (#50750)
(cherry picked from commit 97baa6911d)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2022-06-14 18:07:35 +02:00
Grot (@grafanabot)
88188d63c8 rm debug log when publishing live message (#50774) (#50779)
(cherry picked from commit c581f6d945)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2022-06-14 14:27:11 +02:00
Grot (@grafanabot)
6ac398763a Heatmap: Remove alpha flag from new heatmap panel (#50733) (#50742)
(cherry picked from commit b75cc7a86c)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-14 09:56:45 +02:00
Grot (@grafanabot)
e235af676b Instrumentation: Define handlers for requests that are not handled with named handlers (#50613) (#50744)
Signed-off-by: bergquist <carl.bergquist@gmail.com>

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
(cherry picked from commit b8b6d0e1a1)

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2022-06-14 08:10:23 +02:00
Grot (@grafanabot)
c62ccbd988 Alerting: Fix rendering issues in OpenAPI docs (#50630) (#50725)
* Clean up status codes

* Missing consumes tag

* Regenerate

* Fix incorrect documented responses and missing UI elements

* Fix response docs

* Fix wrong response copy paste

* Regenerate

* Temporarily revert

(cherry picked from commit 17e76b06ff)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-06-13 15:05:59 -05:00
Grot (@grafanabot)
da9dca03ea Alerting: add right provenance when creating mute timings (#50707) (#50714)
(cherry picked from commit 1ed7280363)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-13 18:18:10 +02:00
Grot (@grafanabot)
d5eb7cc42a Alerting: remove unused function in alert rule store (#50696) (#50705)
(cherry picked from commit ed6a887737)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-13 18:06:47 +02:00
Grot (@grafanabot)
de0b107188 Never set gridPos to null (#50400) (#50709)
(cherry picked from commit 759e3ec4fa)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-13 17:55:47 +02:00
Grot (@grafanabot)
5c3bac348c OAuth: Redirect to login if no oauth module is found or if module is not configured (#50661) (#50702)
* OAuth: Redirect to login if no oauth module is found or if module is not
configured

* OAuth: Update test to check for location header

(cherry picked from commit 95a4c4a4d6)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-06-13 17:14:49 +02:00
Carl Bergquist
001f3709ae Instrumentation: Add feature toggle for logging requests instrumented as unknown (#50566) (#50670)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
(cherry picked from commit 2d6e69226b)
2022-06-13 15:19:07 +02:00
Grot (@grafanabot)
4eeb6750f0 add missing return (#50667) (#50675)
(cherry picked from commit 8da9b4f2b5)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-06-13 14:27:45 +02:00
Dan Cech
bc2f941004 clean up duplicated user creation code (#50178) (#50327)
* clean up duplicated user creation code

* remove unused duplicate getOrCreateOrg function

* fix up tests

(cherry picked from commit 9350ab781c)
2022-06-13 07:12:00 -04:00
Grot (@grafanabot)
d301b6611f SearchV2: move search parameters to a nested object (#50561) (#50635)
(cherry picked from commit b6f97e8101)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-10 14:31:47 -07:00
Grot (@grafanabot)
d32ca6a159 RBAC: Inheritance permission migration should handle empty managed roles (#50611) (#50621)
* Make inheritance permission migration more robust

* Better fix

* Add more tests to the migration

* Add removed test case

* Add test case for empty role in empty org

* Handling the role.ID 0 case with a log

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
(cherry picked from commit 307a0d4538)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-06-10 17:34:17 +02:00
Grot (@grafanabot)
fd33095837 Alerting: improve provisioning docs (#50347) (#50618)
* Alerting: improve provisioning docs

* add new provisioning page

* add api docs

* fix formatting and add better descriptions

* fix typo

(cherry picked from commit 862f51216b)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-10 16:41:55 +02:00
Grot (@grafanabot)
83956baf2b Prometheus: Templating queries should pass on custom headers (#50344) (#50408)
* pass on all headers except for accept headers

* touch up and testing

* add custom header values to resource queries

* remove my picture. oops

* handle gzip responses as well

* fix linting issues

* add my space

* no lint

* removed cookies from being proxied

* clean up and handle errors from io.reader.Close() calls

(cherry picked from commit 49dc9da9c1)

Co-authored-by: Stephanie Closson <srclosson@gmail.com>
2022-06-10 08:51:26 -03:00
Grot (@grafanabot)
e760ffab0a Alerting: Invalid setting of enabled for unified alerting should return error (#49876) (#50569)
(cherry picked from commit bda47df4ad)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-10 09:15:46 +01:00