Compare commits

..

409 Commits

Author SHA1 Message Date
George Robinson
fe17b64445 Backport Fix XSS in runbook URL (#681) to v9.2.x (#683)
(cherry picked from commit db1548c1491c2f5b522e3c0ceb1832b914a4b2f0)
(cherry picked from commit 3135a81edf0ebeb575c95560dd548f9589c14d02)
2022-11-29 17:51:34 +01:00
Grot (@grafanabot)
c98714f77f [v9.2.x] Docs: Add docs for labels with dots (#59486)
Docs: Add docs for labels with dots (#59352)

(cherry picked from commit c8c1499cd0)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-11-29 13:38:16 +00:00
Grot (@grafanabot)
ac9819bfa5 [v9.2.x] Fix: Allow creating snapshot with no dashboard id (#59465)
Fix: Allow creating snapshot with no dashboard id (#58669)

(cherry picked from commit d279b6d7b0)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-11-29 10:09:08 +01:00
Grot (@grafanabot)
6b4394d8e6 [v9.2.x] SQL Datasources: Fix annotation migration (#59454)
SQL Datasources: Fix annotation migration (#59438)

(cherry picked from commit 71e4a8261d)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-11-29 01:25:25 -06:00
Marcus Efraimsson
9b7ad3d663 [v9.2.x] SSE: Make sure to forward headers, user and cookies/OAuth token (#58897) (#59430)
SSE: Make sure to forward headers, user and cookies/OAuth token (#58897)

Fixes #58793 and Fixes https://github.com/grafana/azure-data-explorer-datasource/issues/513

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
(cherry picked from commit 5623b5afaf)

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2022-11-28 19:06:59 +01:00
George Robinson
8bb5b17692 Docs: Improve docs for images in notifications (#59033) (#59404)
(cherry picked from commit 0af3515e95)
2022-11-28 19:06:41 +01:00
Grot (@grafanabot)
12fc64b389 [v9.2.x] BarChart: fix hover overlay for hz stacked (#59397)
BarChart: fix hover overlay for hz stacked (#59359)

(cherry picked from commit 13d5ad2ce2)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-11-28 09:00:33 -05:00
Grot (@grafanabot)
052fd5713d [v9.2.x] Navigation: Fix crash when Help is disabled (#59375)
Navigation: Set navtree to  an empty array instead of null (#58919)

set navtree to  an empty array instead of null

(cherry picked from commit 4aa5dea96b)

Co-authored-by: Leo <108552997+lpskdl@users.noreply.github.com>
2022-11-28 06:54:07 -05:00
Ieva
6b64e4d192 Access Control: Clear user's permission cache after resource creation (#59318)
resolve merge conflicts
2022-11-24 18:10:56 +01:00
Grot (@grafanabot)
c89876323c [v9.2.x] TimeseriesPanel: Preserve string fields for data link interpolation (#59296)
TimeseriesPanel: Preserve string fields for data link interpolation (#58424)

* TimeseriesPanel: Preserve string fields for data link interpolation

* clean code

* Modify tests so that string fields are allowed only when a valid time/number dataframe exists

* performance mods

* fix wrong length

* remove console.log

* Check if aligned dataframe has links

(cherry picked from commit 0da77201bf)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-11-24 08:15:06 -05:00
Grot (@grafanabot)
24659cc117 [v9.2.x] PostgreSQL: Fix missing CA field from configuration (#59285)
PostgreSQL: Fix missing CA field from configuration (#59280)

* PostgreSQL: Fix missing CA field from configuration

(cherry picked from commit be73418d00)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2022-11-24 13:33:20 +01:00
Grot (@grafanabot)
9fef15403c [v9.2.x] Azure Monitor: Fix empty/errored responses for Logs variables (#59277)
Azure Monitor: Fix empty/errored responses for Logs variables (#59240)

(cherry picked from commit 276b54fe9d)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-11-24 05:42:12 -05:00
Grot (@grafanabot)
6fbdc2ed89 [v9.2.x] Heatmap: Fix blurry text & rendering (#59261)
Heatmap: Fix blurry text & rendering (#59260)

(cherry picked from commit 6f00bc5674)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-11-23 23:12:12 -05:00
Grot (@grafanabot)
09308c77d8 Release: Bump version to 9.2.7 (#59245)
"Release: Updated versions in package to 9.2.7"
2022-11-23 11:07:57 -06:00
owensmallwood
29f26b5a02 Changelog: Updated changelog for 9.2.6 (#59232) (#59244)
(cherry picked from commit ae508c12f3)

# Conflicts:
#	CHANGELOG.md

Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
2022-11-23 10:53:48 -06:00
Sven Grossmann
e6a7b53703 [9.2.x] Fix #58598 X-ID-Token header missing on Loki Datasource (#58784) (#59196)
* Fix #58598 X-ID-Token header missing on Loki Datasource (#58784)

* Fix #58598 X-ID-Token header missing on Loki Datasource

* Remove unecessary continue statements

* Add getAuthHeadersForCallResource unit tests

* Fix test and switch statement issues introduced during merge

(cherry picked from commit f1ef63791a)

* update test

* missed linting

Co-authored-by: Yann Vigara <yvigara@users.noreply.github.com>
2022-11-23 12:52:35 +01:00
Zoltán Bedi
37236d6ab6 [v9.2.x] SQL: Fix code editor for SQL datasources (#59189)
SQL: Fix code editor for SQL datasources (#58116)

* SQL: Fix code editor for sql datasources

* Fix: mysql completion with defaultdb

(cherry picked from commit 75097b99fb)
2022-11-23 05:28:32 -05:00
Grot (@grafanabot)
a47cfa9b28 [v9.2.x] Azure Monitor: Fix resource picker selection for subresources (#59136)
Azure Monitor: Fix resource picker selection for subresources (#56392)

(cherry picked from commit 5b1ff83ee9)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-11-22 10:55:30 -05:00
Zoltán Bedi
8ba6f0f1a8 [v9.2.x] MS/My/PostgresSQL: Migrate annotation query (#58847) (#59072)
MS/My/PostgresSQL: Migrate annotation query (#58847)

(cherry picked from commit 38f25a0bf5)
2022-11-22 10:10:38 +01:00
Grot (@grafanabot)
5d1bed9b64 [v9.2.x] Alerting: Support Prometheus durations in Provisioning API (#59066)
Alerting: Support Prometheus durations in Provisioning API (#58293)

Provisioning API should support Prometheus durations

(cherry picked from commit 57d6adbc7c)

Co-authored-by: Bart Peeters <birtpeeters@hotmail.com>
2022-11-21 19:17:54 +00:00
Grot (@grafanabot)
a688a916dc [v9.2.x] Prometheus: fix Heatmap y buckets when legendFormat: auto (#59064)
Prometheus: fix Heatmap y buckets when legendFormat: auto (#59053)

(cherry picked from commit 1f4834a144)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-11-21 12:45:01 -05:00
Grot (@grafanabot)
1136d8c3a9 [v9.2.x] Alerting: Add Troubleshooting to Images in notifications docs (#59025)
Alerting: Add Troubleshooting to Images in notifications docs (#58955)

(cherry picked from commit 2f878acd9d)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-11-21 11:36:29 +00:00
Christopher Moyer
15c0ba7af0 resolves merge conflict (#58997) 2022-11-18 16:10:30 -06:00
Grot (@grafanabot)
4adfebb4c7 [v9.2.x] Docs: adds permission validation setting (#58987)
Docs: adds permission validation setting (#58970)

* adds permission validation setting

* Update docs/sources/administration/roles-and-permissions/access-control/configure-rbac/index.md

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>

* makes prettier

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
(cherry picked from commit 780efa5791)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-11-18 12:42:45 -06:00
Grot (@grafanabot)
b2d04ac317 [v9.2.x] Docs: adjusts link to kms integration (#58982)
Docs: adjusts link to kms integration (#58981)

adjusts link to kms integration

(cherry picked from commit e7b5bd34bd)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-11-18 10:58:18 -06:00
Grot (@grafanabot)
7428dbd10e [v9.2.x] Alerting: Fix metric in Images in Notifications docs (#58978)
Alerting: Fix metric in Images in Notifications docs (#58954)

(cherry picked from commit 4da97aef7d)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-11-18 16:46:29 +00:00
Grot (@grafanabot)
17efc62c04 [v9.2.x] Chore: Extract server lock error so it can be used with errors.As (#58905)
Chore: Extract server lock error so it can be used with errors.As (#58899)

chore: extract server lock Error so it can be used with error.As
(cherry picked from commit 7e9d94cfda)

Co-authored-by: Jo <joao.guerreiro@grafana.com>
2022-11-17 15:30:05 +01:00
lean.dev
f4b75c8db1 [v9.2.x] Changelog: Updated changelog for 9.2.5 (#58856) (#58862)
* Changelog: Updated changelog for 9.2.5 (#58856)
(cherry picked from commit df27164b8e)
2022-11-17 12:47:59 +01:00
Grot (@grafanabot)
c05db1f2f8 [v9.2.x] Transformations: Make Card Descriptions Clickable (#58733)
Transformations: Make Card Descriptions Clickable (#58717)

replace Card Meta w Card Description

(cherry picked from commit 16aa4376ac)

Co-authored-by: matt abrams <37156449+zuchka@users.noreply.github.com>
2022-11-17 10:00:27 +01:00
Grot (@grafanabot)
2f3c46b4dd Release: Bump version to 9.2.6 (#58857)
"Release: Updated versions in package to 9.2.6"
2022-11-16 15:23:46 -03:00
Grot (@grafanabot)
ae1fccc1df [v9.2.x] SSE: Keep value name from numeric table (#58850)
SSE: Keep value name from numeric table (#58831)

fixes #48868

(cherry picked from commit 1953d473c0)

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2022-11-16 10:52:49 -05:00
Dimitris Sotirakis
042e4d216b [v9.2.x] CI: Remove base and arch args (#58209) (#58713)
Remove base and arch args (#58209)

(cherry picked from commit 9c1c10ab9a)

# Conflicts:
#	.drone.yml

# Conflicts:
#	.drone.yml
2022-11-16 08:13:14 +00:00
Grot (@grafanabot)
72900d81d8 [v9.2.x] Search: Fixes issue with Recent/Starred section always displaying "General" folder (#58749) 2022-11-15 14:26:01 +01:00
Grot (@grafanabot)
bc708d3543 [v9.2.x] Use relref resolved from nearest section (#58721)
Use relref resolved from nearest section (#58718)

As image-rendering is a branch bundle, it is considered a section by
Hugo and relrefs should be resolved from there even for child pages.

The behavior that worked in `next` but not `latest` could be explained
by the lenient but potentially ambiguous relref resolution algorithm
Hugo uses. However, I have not determined the exact difference between
the two sets of content that causes `next` to work but `latest` not to.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

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

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2022-11-14 17:13:05 -04:00
Grot (@grafanabot)
a8ceec0ed9 [v9.2.x] Snapshots: Allow user with viewer permissions to delete own snapshots (#58715)
Snapshots: Allow user with viewer permissions to delete own snapshots (#58572)

(cherry picked from commit 59d2cf2ff7)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-11-14 14:25:41 -05:00
Grot (@grafanabot)
62f4012590 [v9.2.x] Docs: corrects relrefs (#58709)
Docs: corrects relrefs (#58706)

corrects relrefs

(cherry picked from commit a9458c8c00)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-11-14 09:49:20 -06:00
Grot (@grafanabot)
0c9e3abc52 [v9.2.x] SQL: Fix issue where testing the datasource would always be successful if the datasourceQueryMultiStatus feature was enabled (#58685)
SQL: Fix issue where testing the datasource would always be successful if the `datasourceQueryMultiStatus` feature was enabled (#58671)

SQL Datasources: fix issue where testing the datasource connection would show success even when there was an error.

Co-authored-by: Victor Marin <victor.marin@grafana.com>
(cherry picked from commit 75e435fb00)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2022-11-14 15:53:14 +01:00
malcolmholmes
1cf016c9b2 CI: Make build and store storybook trigger in the release process (#58686) (#58704)
Make storybook trigger conditional

(cherry picked from commit 09c3ead945)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-11-14 16:15:23 +02:00
Jo
15179a6abb Fix: Email and username trimming and invitation validation (#58446)
* Trim leading and trailing whitespaces from email and username on signup

* Check whether the provided email address is the same as where the invitation sent

Co-authored-by: Mihaly Gyongyosi <mgyongyosi@users.noreply.github.com>
2022-11-14 13:10:15 +01:00
Garrett Guillotte
d26b6aae07 [v9.2.x] Docs: Add document for jsondata field alertmanagerUid (#57121)
* Add document for jsondata field `alertmanagerUid` (#52895)

alertmanagerUid can be used to specify Alert Manager for a particular Prometheus/Loki data source.

Co-authored-by: Garrett Guillotte <garrett.guillotte@grafana.com>

* Docs: Fix provisioning table formatting (#57042)

Co-authored-by: Vũ Quốc Phong <phong.vq.198@gmail.com>
Co-authored-by: Daniel Lee <dan.limerick@gmail.com>
2022-11-14 11:04:38 +01:00
Grot (@grafanabot)
d074471557 [v9.2.x] Toolkit: Fix compilation loop when watching plugins for changes (#58695)
Toolkit: Fix compilation loop when watching plugins for changes (#58167)

* fix(toolkit): ignore node_modules and dist directories when watching for changes to plugin

* fix(toolkit): move watchOptions.ignored config to pluginDev watch call

(cherry picked from commit ce50400740)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-11-14 09:54:58 +01:00
Karl Persson
0f0211f400 [v9.2.x] Omit error from http response (#58445) 2022-11-14 09:42:45 +01:00
Grot (@grafanabot)
47f8928be1 [v9.2.x] StateTimelinePanel: Fix duration on merged values (#58679)
StateTimelinePanel: Fix duration on merged values (#58561)

Fix stateTimeline duration

(cherry picked from commit 79142340e0)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-11-11 13:33:48 -05:00
ismail simsek
1e97806819 Prometheus: Handle errors and warnings in buffered client (#58657)
Prometheus: Handle errors in buffered client (#58504)

* Handle prometheus errors in buffered client

* Handle prometheus warnings

* Fix tests

* Add unit test for warnings

(cherry picked from commit 8edeb1aa22)
2022-11-11 16:30:55 +01:00
Timur Olzhabayev
d6d6db54f9 Bumping msw and xmldom to mitigate xmldom vulnerability (#58632) 2022-11-11 16:12:55 +01:00
Grot (@grafanabot)
a01d5a10f5 [v9.2.x] Tempo: Fix search removing service name from query (#58633)
Tempo: Fix search removing service name from query (#58630)

* Fix handleOnChange deps

* Remove eslint disable

(cherry picked from commit c76183a961)

Co-authored-by: Joey Tawadrous <90795735+joey-grafana@users.noreply.github.com>
2022-11-11 10:59:05 +00:00
Grot (@grafanabot)
a151924ed3 [v9.2.x] Chore: Upgrade go-sqlite3 to v1.14.16 (#58588)
(cherry picked from commit 990d8cd22e)

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-11-11 11:31:33 +01:00
Grot (@grafanabot)
65bd73f5cc [v9.2.x] Docs: Add feature flag example to override configuration with environment variables (#58615)
Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com>
2022-11-10 16:42:06 -05:00
Grot (@grafanabot)
2c28ae5e70 [v9.2.x] Canvas: Improve disabled inline editing UX (#58614)
Canvas: Improve disabled inline editing UX (#58610)

(cherry picked from commit fd6edbf8c5)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-11-10 16:17:41 -05:00
Grot (@grafanabot)
707800cd6c Canvas: Fix setting icon from field data #58499 (#58604)
(cherry picked from commit 47055561ec)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-11-10 14:10:24 -05:00
George Robinson
cc2560b96f Alerting: Fix logging pointer address of DashboardUID and PanelID variables (#58539) (#58565)
(cherry picked from commit c5ae1bcfe0)
2022-11-10 13:45:20 +00:00
Grot (@grafanabot)
4e687bf869 Plugins: CallResource: Use canonical MIME headers when writing response (#58506) (#58567)
* Plugins: CallResource: use canonical MIME headers when writing response

* Plugins: add tests for canonical mime headers and Set-Cookie filter

* Removed extra new line

(cherry picked from commit 33f02839f0)

Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
2022-11-10 13:38:46 +01:00
George Robinson
b372406a61 Alerting: Log when alert rule cannot be screenshot to help debugging (#58537) (#58563)
(cherry picked from commit 68600c224b)
2022-11-10 11:06:50 +00:00
Ashley Harrison
b689ec5d43 Navigation: Expose new props to extend Page/PluginPage (#58465) (#58562)
* add extensions and customisation to `Page`

* adjust alignment

(cherry picked from commit b3c761aaa7)
2022-11-10 10:05:45 +00:00
Grot (@grafanabot)
bcb1e94784 Linux repositories: Document apt|rpm.grafana.com (#57527) (#58475)
* Linux repositories: Document `apt|rpm.grafana.com`
We'll be moving off packages.grafana.com (it will be linked to the new repositories)
The new package repositories are easier to use, so let's document them instead

Question: Are the scripts in `scripts/build/update_repo` and `scripts/verify-repo-update` still used? They seem very old, and seem like the generation of scripts before grabpl was created

* Shorter RPM docs. No need to copy the same snippet twice

* Add warning about repository migration

* oops

(cherry picked from commit f1f401147f)

Co-authored-by: Julien Duchesne <julien.duchesne@grafana.com>
2022-11-10 11:01:25 +01:00
Grot (@grafanabot)
b2b673ab16 Prometheus: Query builder label filters dropdown UI overload fix (#58266) (#58546)
* WIP: try to support removing series endpoint for supported clients

* add other filter variables to match param for label values query against filter values, in order to resolve bug in which filter value options would display that aren't relevant in the current query editor context, i.e. options would display that upon select would display no data

* clean up console logs

* refactor and comment

* expanding current unit test coverage to cover calls to new API

* fix unit test

* whitespace

* prettier

* WIP: need to merge in other PR

* WIP giving up and trying again

* WIP: most functionality is working, split out shared loki/prom code

* fix bug in which search results wouldn't take other label context into the query

* Fix bug in which the previously selected value would conflict with the async search

* interpolate the label name string instead of the match promql expression

* remove type assertions

* remove type assertion

* clean up generic confusing types, and add back in a type assertion

* remove generic type

* make sure to interpolate label names

* fix bugs with variables not interpolating before query

* remove debug

* assert partial properties on QueryBuilderLabelFilter

* Force update betterer results :(

* update regex so dropdown UX more closely matches current behavior

* add eslint ignore

* add eslint ignore and update betterer

(cherry picked from commit ee7348afee)

Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
2022-11-09 15:15:17 -05:00
Grot (@grafanabot)
b333b2bc97 adjusts the stem sentence (#58538) (#58541)
(cherry picked from commit ad374efcbd)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-11-09 11:33:06 -06:00
George Robinson
a2f412e21f Alerting: Small improvements to staleResultsHandler (#58007) (#58513)
(cherry picked from commit 1290951b65)
2022-11-09 17:15:09 +00:00
Grot (@grafanabot)
40ad7fe358 Alerting: Fix images cached on rule instead of dashboard panel signature (#58510) (#58536)
(cherry picked from commit 7e852720e3)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-11-09 17:14:16 +00:00
Grot (@grafanabot)
c48d42177f Add new PageInfo component (#58421) (#58534)
(cherry picked from commit 831ecb467c)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-09 11:59:50 -05:00
Grot (@grafanabot)
18e8f6dc65 Alerting: Improve debug logs in image service (#58507) (#58533)
(cherry picked from commit b92a0223e3)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-11-09 16:48:59 +00:00
Grot (@grafanabot)
b123e396ec Docs: adjusts topics to align with task templates (#58478) (#58531)
* updates topic to align with multiple task template

* updates goal intro

* aligns formatting with single task topic template

* Update docs/sources/administration/team-management/index.md

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

* adds permissions requirements to two tasks

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
(cherry picked from commit 2dfe0a4060)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-11-09 10:20:01 -06:00
Grot (@grafanabot)
725618e1d1 Elasticsearch: fix typo (#58519) (#58523)
(cherry picked from commit fa5a304de8)

Co-authored-by: Gareth Dawson <gareth.dawson@grafana.com>
2022-11-09 15:39:31 +00:00
Grot (@grafanabot)
8f06aa45ac Tempo: Fix dropdown issue on tag field focus (#57616) (#57883)
(cherry picked from commit 77be89eb1c)

Co-authored-by: xiyu95 <112968312+xiyu95@users.noreply.github.com>
Co-authored-by: Will Browne <will.browne@grafana.com>
2022-11-09 11:10:33 +01:00
Grot (@grafanabot)
bc7d29b3d6 Dashboards: Provide better error messages in SaveDashboardAsForm (#57866) (#58432)
The existing code uses `instanceof Error` to check for a `message` field on the thrown object. The objects that are thrown are never instances of the error interface. This change introduces a new type that extends Error so that the check works properly and displays a meaningful error message in the UI.

(cherry picked from commit f07da85d8b)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-11-09 13:04:51 +08:00
George Robinson
749d9c2cba Alerting: Fix screenshots were not cached (#58493) (#58494)
(cherry picked from commit c646ff0ce3)
2022-11-09 10:43:00 +08:00
Grot (@grafanabot)
a54d45fa90 Alerting: Use hash of opts in singleflight (#58474) (#58488)
(cherry picked from commit ad9ac85ee0)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-11-08 22:52:49 +00:00
Grot (@grafanabot)
91d4141cf9 Use fnv64 for InmemCacheService (#58468) (#58487)
(cherry picked from commit 72275e97d2)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-11-08 22:18:39 +00:00
Grot (@grafanabot)
00bede823f Tooltips: Make tooltips in FormField and FormLabel interactive and keyboard friendly (#57706) (#58471)
* Tooltips: add tabindex and interactive

A couple tooltips used in configuration of datasources like ADX were not
clickable or didn't show on keyboard focus.

- fixes #56561
- Same solution as #47137

* test: add test around tabbing to tooltips

(cherry picked from commit 3e92a2dc77)

Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2022-11-08 12:11:34 -05:00
Grot (@grafanabot)
4d00a510d1 pkg/web: avoid shared middleware slice (#58458) (#58463)
(cherry picked from commit 75701695d8)

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-11-08 11:13:05 -05:00
Grot (@grafanabot)
68882a861a properly format new .drone.yml in verify-drone (#58436) (#58452)
(cherry picked from commit d593aede3d)

Co-authored-by: Dan Cech <dcech@grafana.com>
2022-11-08 10:41:52 -05:00
Grot (@grafanabot)
a6faa45073 Prometheus: remove /series endpoint calls in query builder label names and values for supported clients (#58087) (#58438)
* add other filter variables to match param for label values query against filter values, in order to resolve bug in which filter value options would display that aren't relevant in the current query editor context, i.e. options would display that upon select would display no data

* expanding current unit test coverage to cover calls to new API

* interpolate the label name string instead of the match promql expression

(cherry picked from commit 9281746914)

Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
2022-11-08 08:56:35 -06:00
Grot (@grafanabot)
d9a6bf92d7 "Release: Updated versions in package to 9.2.5" (#58430) 2022-11-08 14:11:37 +00:00
Grot (@grafanabot)
c845bfd9ac Changelog: Updated changelog for 9.2.4 (#58429) (#58431)
(cherry picked from commit 94573d3e61)
2022-11-08 09:03:10 -05:00
Grot (@grafanabot)
1049636ef6 Grafana Enterprise Packaging: Set to conflict with grafana, not replace (#58189) (#58418)
* Grafana Enterprise Packaging: Set to conflict with `grafana`, not replace
When `grafana` and `grafana-enterprise` are in the same RPM repository, grafana-enterprise takes precedence over Grafana
This is not what we want. Users should be able to install either OSS or Enterprise

* Set it only one way. It's how it's currently tested

(cherry picked from commit 786c7faff2)

Co-authored-by: Julien Duchesne <julien.duchesne@grafana.com>
2022-11-08 08:11:54 -05:00
Marcus Efraimsson
0e5a094447 Prometheus: Upgrades http client to v1.13.1 (#58363) (#58395)
(cherry picked from commit faa0fda6eb)
2022-11-08 12:37:59 +01:00
Grot (@grafanabot)
b82d26e130 CallResource: don't set Content-Type header if status is 204 (#50780) (#58362)
Grafana's HTTPServer ensures that the Content-Type header is always set
in the response to a CallResource call, but when the status code is
204 No Content this shouldn't be done; the body should be empty and no
Content-Type header should be set.

We ran into this in the Grafana ML plugin where we were sending an empty
response with status 204, but the frontend client saw that the content
type was JSON and tried to parse it, resulting in an error that made it
to the JS console.

(cherry picked from commit 480277f612)

Co-authored-by: Ben Sully <ben.sully@grafana.com>
2022-11-08 12:31:45 +01:00
Grot (@grafanabot)
945c3fafe7 Alerting: Remove duplicate Slack notification title (#58107) (#58256)
Move mentions to a markdown-formatted pretext field
to prevent issues mixing blocks and legacy-attachment content.

(cherry picked from commit d581b368bd)

Co-authored-by: Will Jordan <wjordan@users.noreply.github.com>
2022-11-08 11:41:35 +01:00
Grot (@grafanabot)
164fb230cb Docs: corrects outer join example (#58348) (#58366)
* corrects outer join example

* Update docs/sources/panels-visualizations/query-transform-data/transform-data/index.md

* adds query tables back in

(cherry picked from commit 0315f6317e)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-11-07 13:53:18 -06:00
Dimitris Sotirakis
7382b1be90 [v9.2.x] CI: Use full dockerhub repository name (#57979) (#57983)
* CI: Use full `dockerhub` repository name (#57979)

* Add full dockerhub repo name

* Update grabpl version

(cherry picked from commit 57ee0e4a4b)

* sign drone.yml

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-11-07 18:23:44 +01:00
George Robinson
d38ac63f22 Alerting: Append org ID to alert notification URLs (#57123) (#58349)
(cherry picked from commit db1fd10ff1)

Co-authored-by: Neel <47709856+neel1996@users.noreply.github.com>
2022-11-07 17:07:07 +00:00
Grot (@grafanabot)
67f503b820 Alerting: Fix test fails in some environments (#58251) (#58356)
(cherry picked from commit 8353f307aa)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-11-07 16:54:39 +00:00
Zoltán Bedi
4ec37fb058 MSSql/Postgres: Fix visual query editor filter disappearing (#58248) (#58354)
(cherry picked from commit b472306239)
2022-11-07 17:35:49 +01:00
Grot (@grafanabot)
4fee0645a1 Datasource Loki: preserve header X-ID-Token (#57878) (#58346)
(cherry picked from commit bc280d0749)

Co-authored-by: Si Mon <85333972+siiimooon@users.noreply.github.com>
2022-11-07 11:11:10 -05:00
Emil Tullstedt
b03e28fc60 Chore: Upgrade Go to 1.19.3 (v9.2) (#58339) 2022-11-07 16:52:15 +01:00
Grot (@grafanabot)
db55065687 fix thanos semver string (#58335) (#58344)
(cherry picked from commit 6bc8ec0f9b)

Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
2022-11-07 09:46:37 -06:00
Grot (@grafanabot)
7ca5c227dd Toolkit: Fix Webpack less-loader config (#57950) (#58175)
(cherry picked from commit b799be3052)

Co-authored-by: dessen-xu <1805680163@qq.com>
2022-11-07 16:16:58 +01:00
Grot (@grafanabot)
3dc8434cf4 @grafana/e2e: Fix addPanel for small screen size (#57398) (#58314)
(cherry picked from commit d001a1b035)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-11-07 07:06:23 -05:00
Grot (@grafanabot)
8cb58c1560 Chore: Disable dashboard-time-zone e2e tests (#58320) (#58323)
(cherry picked from commit d4e3d47f56)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-11-07 06:47:43 -05:00
Grot (@grafanabot)
63f6207a1f Auth: Check for OrgUsersAdd on frontend to display pending invites (#58217) (#58225)
(cherry picked from commit 9ff2765bb9)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-11-07 06:28:57 -05:00
Grot (@grafanabot)
97ee2cf918 MySQL: make it possible to add CA cert without using tlsAuth (#58226) (#58308)
(cherry picked from commit b1bfae0350)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2022-11-07 03:54:50 -05:00
Grot (@grafanabot)
b642a797fd Timeseries: Fix null pointer when matching fill below to field (#58030) (#58298)
* Fix timeseries fill below to error

* wip

* modifications

* add tests for fillBelowTo option

(cherry picked from commit d673c8809b)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-11-06 09:35:06 -05:00
Eric Leijonmarck
9b07bc7e98 merge complete (#58274)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-11-04 15:03:07 -07:00
Eric Leijonmarck
94594d61e6 followup fix for backport (#58273) 2022-11-04 21:20:20 +00:00
Eric Leijonmarck
0026764f04 merge complete (#58272) 2022-11-04 20:45:38 +00:00
Grot (@grafanabot)
a09a23c8bf Search: Fixes searching by current folder when opened by clicking dashboard folder name (#57716) (#57949)
* Search: Read from url on mount no on app boot

* Fixed tests

* Remove unused type

(cherry picked from commit 3991be4c1d)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-11-04 12:57:39 -04:00
Grot (@grafanabot)
e4af9fba96 Build: add explicit build step for go codeql (#58195) (#58243)
* add explicit build step for go codeql

* support workflow_dispatch for codeql checks

* syntax fix

* enable on push to codeql-go branch

* test

* use go version from go.mod

* explicitly set go version

* tidy up, add workflow_dispatch support to all codeql actions

(cherry picked from commit da9c646f24)

Co-authored-by: Dan Cech <dcech@grafana.com>
2022-11-04 11:40:40 -04:00
Grot (@grafanabot)
f70d51c2c6 [v9.2.x] Alerting: Encode path separators to side-step proxies (#58222)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-11-04 07:13:53 -04:00
Grot (@grafanabot)
b8835eba17 fixes typo (#58159) (#58194)
(cherry picked from commit 1722000309)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-11-03 13:55:51 -05:00
Grot (@grafanabot)
4e2d4c42f0 fixed explain handlers for label- and lineformat (#58135) (#58151)
(cherry picked from commit 4b1ddba0a8)

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2022-11-03 10:09:47 -04:00
Grot (@grafanabot)
ac66ba77da TimeSeries: more thorough detection of negative values for stacking dir (#57863) (#58147)
(cherry picked from commit 4d88e2b542)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-11-03 09:38:19 -04:00
Grot (@grafanabot)
afab41a9c4 reduce the number of requests in folder section (#55876) (#58145)
(cherry picked from commit 372ba83534)

Co-authored-by: Marcos Vinicius <marcos.vinicius.wz@gmail.com>
2022-11-03 09:35:39 -04:00
Piotr Jamróz
72cf8605c0 [v9.2.x] Explore: Track data links usage (#56868) (#58037)
* Explore: Track data links usage (#56868)

* Add tracking for data links in explore

* Add tracking for data links in explore

* Fix tests

* Retrigger build

(cherry picked from commit dd5e3a0818)

# Conflicts:
#	public/app/features/explore/Explore.tsx
#	public/app/features/explore/LogsContainer.tsx

* Post-merge fixes

Remove unused import
2022-11-03 14:22:40 +01:00
Grot (@grafanabot)
7ba1e9e258 Tempo: Make usage of time range for TraceID query optional (#58057) (#58128)
* Added switch to toggle the TraceID query time shift

* Fix and improve tests

(cherry picked from commit 90ac300d10)

Co-authored-by: Andre Pereira <adrapereira@gmail.com>
2022-11-03 07:18:12 -04:00
Grot (@grafanabot)
f07841db8a increase select placeholder contrast to be WCAG AA compliant (#58034) (#58125)
(cherry picked from commit c3206167a6)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-03 07:00:45 -04:00
Eric Leijonmarck
797dd2dd58 fix: migration of alert_rules fix (#58123) 2022-11-03 10:37:22 +00:00
George Robinson
ab3718afba Alerting: Fix screenshot is not taken for stale series (#57982) (#58102)
(cherry picked from commit 215ffee437)
2022-11-03 10:17:01 +00:00
Grot (@grafanabot)
d1df696c31 Alerting: Fix feedback (#57922) (#58104)
(cherry picked from commit f2e4cb7c4e)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-11-02 18:49:29 -04:00
Grot (@grafanabot)
dfeb978e3b remove unneeded package updates (#58005) (#58068)
(cherry picked from commit 6a4a10fa92)

Co-authored-by: Dan Cech <dcech@grafana.com>
2022-11-02 18:31:43 +00:00
Torkel Ödegaard
8b7664294c LibrayPanels: Fix unlinking libray panel (#57825) (#58042) 2022-11-02 16:19:53 +01:00
Grot (@grafanabot)
5895100beb Alerting: Fix response is not returned for invalid Duration in Provisioning API (#58046) (#58049)
(cherry picked from commit 4c581b5f85)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-11-02 13:06:58 +00:00
Grot (@grafanabot)
844b08962d chore: bump code coverage action version (#56710) (#58040)
(cherry picked from commit e3e32c7d04)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-11-02 12:18:01 +00:00
Dimitris Sotirakis
551c4aa562 Linux Packages: Handle publish to beta (#57528) (#58044)
Uses the feature added here: https://github.com/grafana/deployment_tools/pull/46301
When a version is named "beta", it will be distributed in the beta distribution, rather than in stable

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
(cherry picked from commit c46a4a0b26)

Co-authored-by: Julien Duchesne <julien.duchesne@grafana.com>
2022-11-02 14:17:44 +02:00
Andres Martinez Gotor
1ac0c03a1d [v9.2.x] Google Cloud Monitoring: Set frame interval to draw null values (#57914) 2022-11-02 12:14:30 +01:00
Grot (@grafanabot)
484b098a20 Alerting: Fix flaky test in notifiers (#57927) (#57993)
* Alerting: Fix flaky test in notifiers

* remove TODO comment

(cherry picked from commit a3f828de8a)

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-11-01 12:29:24 -03:00
Grot (@grafanabot)
ca73c43b56 metrics: expose when the binary was built as an gauge (#57951) (#57969)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
(cherry picked from commit 3188af9be3)
2022-11-01 08:14:17 -04:00
Grot (@grafanabot)
6c027ccf6a "Release: Updated versions in package to 9.2.4" (#57958) 2022-11-01 06:50:30 -04:00
Grot (@grafanabot)
0275f11785 Changelog: Updated changelog for 9.2.3 (#57955) (#57957)
(cherry picked from commit 02add89b53)
2022-11-01 06:39:10 -04:00
Dimitris Sotirakis
3274e8727e Add GCP_KEY to publish-grafanacom step (#57910) (#57948)
(cherry picked from commit 1eaf7cbfc0)
2022-11-01 09:07:44 +00:00
Grot (@grafanabot)
522a819e9e CloudWatch: Fix all-log-groups endpoint when called without logGroupNamePrefix (#57483) (#57945)
(cherry picked from commit 1f7c84f125)

Co-authored-by: Lion Ralfs <lion.ralfs@gmail.com>
2022-11-01 09:14:36 +01:00
Grot (@grafanabot)
f6abf640eb TimeSeries: Render null-bounded points at data edges (#57798) (#57938)
(cherry picked from commit 45234e76eb)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-31 19:06:43 -04:00
Grot (@grafanabot)
47b635270e BarChart: Fix stacked hover (#57711) (#57937)
(cherry picked from commit fbfd0fd51b)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-31 17:58:45 -04:00
Grot (@grafanabot)
36bfb144b7 removes CTAs (#57931) (#57935)
(cherry picked from commit 6aa3003a54)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-10-31 16:39:58 -05:00
Grot (@grafanabot)
fade9fb6ae [v9.2.x] Alerting: fix filtering in notification policies (#57925)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-10-31 13:53:33 -04:00
Grot (@grafanabot)
ad2ea44977 Attempt to preserve UID from migrated channel (#57639) (#57919)
(cherry picked from commit 0dfd78c88c)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-10-31 12:17:48 -05:00
Grot (@grafanabot)
924180a25b Alerting: Add debug logs in validateAndGetPrefix (#57002) (#57923)
(cherry picked from commit b0a927b138)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-10-31 17:12:19 +00:00
Grot (@grafanabot)
76ed60064d change json command parameter names from userID to userId and teamID to teamId (#57902) (#57913)
(cherry picked from commit 5c1a1c8318)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-10-31 15:33:39 +00:00
Grot (@grafanabot)
e09307c078 add an endpoint for updating several managed permissions with one call (#57893) (#57898)
(cherry picked from commit 2546437e20)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-10-31 14:31:34 +00:00
Grot (@grafanabot)
ec9c2ed029 Google Cloud Monitoring: Ensure selectors fit in the screen (#57817) (#57899)
(cherry picked from commit ce38840f29)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-10-31 13:36:07 +01:00
Grot (@grafanabot)
92b10cc965 Chore: Update footer changelog link to github (#57871) (#57895)
(cherry picked from commit fd5c147574)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-10-31 08:33:25 -04:00
Grot (@grafanabot)
3be1ddc56a CloudWatch: Fix broken test (#57879) (#57900)
* mock date.now

* fix broken test

(cherry picked from commit 92ed9a4f2f)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-10-31 08:16:12 -04:00
Grot (@grafanabot)
dac165a7fc RBAC: Allow to list users for dashboard / folder admins (#57080) (#57252)
* RBAC: Use query struct in tests

* RBAC: If access control enforcement is disabled don't filter out users
when fetching permissions

(cherry picked from commit 9adaf1565c)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-10-31 07:31:43 -04:00
Grot (@grafanabot)
44655b96cb docs(config): Include admin_email documentation (#55789) (#57725)
(cherry picked from commit 1340c2c358)

Co-authored-by: Pepe Fagoaga <pepe@verica.io>
2022-10-31 11:39:48 +01:00
Grot (@grafanabot)
79104ef556 Access Control: documentation for RBAC provisioning with Terraform (#57747) (#57882)
* add docs for RBAC provisioning with Terraform

* remove unnecessary bit

* shuffle the structure around, as docs can't go more than four levels deep

* Update index.md

* Update index.md

(cherry picked from commit 7e62352aea)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-10-31 10:36:13 +00:00
Grot (@grafanabot)
95189820fe Docs: Add information about DB version support to upgrade guide. (#57643) (#57868)
In v9.2 Grafana added an official DB version support policy. That change
is now noted in the upgrade guide.

(cherry picked from commit 89d917b196)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-10-31 09:27:30 +01:00
Grot (@grafanabot)
68d7dadaec Dashboards: Add workaround for react-grid-layout rearrange bug (#57832) (#57836)
(cherry picked from commit e4d1d8d70c)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-10-29 23:46:57 +01:00
Grot (@grafanabot)
2bfc106473 Dashboards: Add workaround for react-grid-layout rearrange bug (#57832) (#57836)
(cherry picked from commit e4d1d8d70c)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-10-29 23:46:46 +01:00
Christopher Moyer
82430165ee resolves merge conflicts (#57840) 2022-10-28 13:57:12 -05:00
Grot (@grafanabot)
85f1aab363 Prometheus: Chore - Remove incorrect FrameType from exemplar frame (#57695) (#57828)
(cherry picked from commit 2cd9cbd359)

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2022-10-28 10:53:36 -04:00
Grot (@grafanabot)
3df51bf025 Prometheus: Do not drop errors in streaming parser (#57698) (#57835)
- Fixes #57692
- and also takes care of #42776 when using the streaming parser, not an ideal fix for #42776 but makes explore work better I think. https://github.com/grafana/grafana/issues/57365 might be a better longer term solution

(cherry picked from commit 6126f56ef0)

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2022-10-28 10:52:36 -04:00
Grot (@grafanabot)
b1d914bceb Remove Sensu from docs (#57812) (#57823)
We do not support Sensu in Grafana Alerting, only Sensu Go.

(cherry picked from commit ee7adc081b)

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
2022-10-28 13:59:15 +02:00
Marcus Andersson
e0e74ea6d2 [v9.2.x] Chore: Fix vulnerabilities in webpack loader-utils (#57753)
* chore: remove unused webpack loaders from core and toolkit

* chore: refresh yarn.lock file

* getting there...I hope..

* making sure we are not using naughty loader-utils.

* fixed storybook.
2022-10-28 13:00:04 +02:00
Grot (@grafanabot)
b94c64ef48 CI: Add CreateTempDir func and use it in publish packages logic (#57171) (#57261)
* Add CreateTempDir func and use it in publish packages logic

* Fill err return in defer func

(cherry picked from commit e829b50149)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-10-28 05:43:05 -04:00
Grot (@grafanabot)
43d3f21ff0 Only provide version ot build-frontend-packages if it's a valid semver (has 2 digits) (#57808) (#57810)
(cherry picked from commit fd16cad7da)

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2022-10-28 11:26:22 +02:00
emerson_gong
a62cb4e6c1 Security: Upgrade x/text to version unaffected by CVE-2022-32149 (#57797) 2022-10-28 09:07:27 +02:00
Grot (@grafanabot)
23b791c234 TimeseriesPanel: Fill below to override works with name override (#57728) (#57800)
(cherry picked from commit 953fdfe76f)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-28 02:46:35 -04:00
Grot (@grafanabot)
0b27b6a8c2 Candlestick: Maintain candle width at different display resolutions (#57709) (#57794)
(cherry picked from commit 7d020d3f6e)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-27 19:45:58 -05:00
ismail simsek
e71e6ae07e Prometheus: fix Raw query is not updated when label op change. (#57492) (#57493) (#57780)
(cherry picked from commit 9aac0d32f9)

Co-authored-by: yinjialu <37073056+yinjialu@users.noreply.github.com>
2022-10-27 14:24:07 -04:00
Grot (@grafanabot)
2576f05029 Alerting: Fix "Not Implemented" responses (#57710) (#57712) 2022-10-27 14:48:54 -03:00
Grot (@grafanabot)
e8cff14164 [v9.2.x] Alerting: Fall back to "range" query type for unified alerting when "both" is specified (#57765)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-10-27 11:36:36 -04:00
Jo
a162fdf32f fix GF_AUTH_JWT_URL_LOGIN not working (#57689) (#57761)
(cherry picked from commit cae900c6f9)
2022-10-27 10:44:50 -04:00
Grot (@grafanabot)
99f6606285 Fix: Unlock new button based on user permissions (#57733) (#57760)
(cherry picked from commit 4d380978d3)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-10-27 16:03:20 +02:00
Grot (@grafanabot)
d2f721c18e Docs: (Whats new 9.2) Prom Stream Parser (#57603) (#57693)
* Docs: (Whats new 9.2) Prom Stream Parser

* Update docs/sources/whatsnew/whats-new-in-v9-2.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
(cherry picked from commit dfdc9bcbc1)

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2022-10-26 13:26:48 -04:00
Grot (@grafanabot)
efd139ecf3 Prometheus query builder: Replace select with AsyncSelect to support high cardinality prometheus instances (#57300) (#57630)
* Replace current select with AsyncSelect component to facilitate autocomplete via prometheus server instead of client application
Co-authored-by: Kyle Brandt <kyle@grafana.com>

(cherry picked from commit c27aac0d38)

Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
2022-10-26 08:10:30 -05:00
Galen Kistler
5647a981ed Prometheus: Flavor/version configuration (#57554) (#57563)
* Backport PR for: Prometheus: Flavor/version configuration (#57554), and /label match parameter support #56510

* Revert "Revert "Prometheus: Type and flavor configuration (#56496)" (#57552)"
This reverts commit 2432ce619a.
* Adds new fields and documentation for Prometheus datasource configuration: prometheus type, and version

(cherry picked from commit f93c3acc51)

* Revert "Revert "Prometheus: Provide label values match parameter API when supported prometheus instance is configured (#56510)" (#57551)" (#57553) (#57564)

This reverts commit e7671bf909.
(cherry picked from commit e59ddd6bc5)
Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>

Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
2022-10-26 08:10:05 -05:00
Grot (@grafanabot)
d6f248c14e move data source permission model to enterprise repo (#57615) (#57659)
(cherry picked from commit 92531c5596)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-10-26 13:30:20 +01:00
Grot (@grafanabot)
f58d6107e1 [v9.2.x] Alerting: Always allow configuring AM configuration (#57614)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-10-25 11:11:05 -04:00
Grot (@grafanabot)
b3a46212df "Release: Updated versions in package to 9.2.3" (#57605) 2022-10-25 15:08:27 +02:00
Grot (@grafanabot)
3289770198 Changelog: Updated changelog for 9.2.2 (#57601) (#57604)
(cherry picked from commit f64b0e1fae)
2022-10-25 14:45:07 +02:00
Grot (@grafanabot)
8d7c3f19ee live: explicitely reply with http 200 (#57428) (#57592)
`pkg/web` triggers a panic when a http handler chain does not return any
response to the client.
This has been put in place, because it usually means a middleware along
the way did not call the next one.

In this specific case however, the handlers meant to return 200, but did
not do so explicitely, instead relying on the default behavior of `net/http`

(cherry picked from commit beaaabd770)

Co-authored-by: sh0rez <me@shorez.de>
2022-10-25 06:02:15 -04:00
Grot (@grafanabot)
68c8987152 TablePanel: Fix updating footer values on data change (#57518) (#57581)
* TablePanel: Fix updating footer values on data change

* tests

(cherry picked from commit c30716a073)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-25 02:56:58 -04:00
Grot (@grafanabot)
7832a7579f Storage: Fix initialization on windows (#57504) (#57577)
(cherry picked from commit 749b3b6263)

Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
2022-10-24 21:45:55 -04:00
Grot (@grafanabot)
92fa1aba00 Canvas: Improve resource picker initialization (#57319) (#57566)
(cherry picked from commit 9d857f4d61)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-10-24 16:52:40 -04:00
Grot (@grafanabot)
8ea7a8cff3 Docs: Database encryption corrections (#57503) (#57559)
* Docs: Database encryption corrections

* Fix relref links

* Additional corrections

(cherry picked from commit 5d18b41857)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2022-10-24 13:07:20 -07:00
Adela Almasan
13e306bbfb Canvas: Button element (alpha) (#57491) (#57557)
(cherry picked from commit 73c215ae41)
2022-10-24 14:00:38 -04:00
Erik Sundell
e69568fec8 fix merge conflict (#57546)
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-10-24 19:53:13 +02:00
Grot (@grafanabot)
509cb77bca RBAC: Allow access to /dashboards when user has dashboards create (#56712) (#57153)
* RBAC: Allow access to dashboards when user has dashboards create

* Remove eval any that I didn't add on purpose

(cherry picked from commit 3963ed3754)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-10-24 15:57:55 +02:00
Grot (@grafanabot)
1573285f21 NodeGraph: Fix rendering issues when values of arc are over 1 (#57460) (#57513)
(cherry picked from commit 67aa99af78)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-10-24 14:59:20 +02:00
Grot (@grafanabot)
06780e2c41 Clarify notification policies. (#57465) (#57507) 2022-10-24 11:47:24 +02:00
Grot (@grafanabot)
201c7e123d Fix broken image links (#57480) (#57487)
(cherry picked from commit 4053cbea38)

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2022-10-22 11:49:28 -07:00
Grot (@grafanabot)
c4233171f2 TimeSeries: fix negative stacked percent y-axis range (#57470) (#57478)
(cherry picked from commit 45707ccf99)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-21 16:41:45 -06:00
Grot (@grafanabot)
a318b15cab TimeSeries: Fix stacking when first value is negative zero (#57257) (#57472)
* TimeSeries: Fix stacking when first value is negative zero

* More test + refactor

(cherry picked from commit 7f3b567657)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-10-21 15:12:16 -04:00
Andre Pereira
559ef42767 Tempo: Add start time and end time parameters while querying traces (#48068) (#57459)
* Add start time and end time parameters while querying tempo traces

* Added configurable time shift to query by trace id

* Test that the URL is formatted correctly

* Added test to check for time shift

* Improved label and tooltip of new time shift settings

Co-authored-by: André Pereira <adrapereira@gmail.com>
(cherry picked from commit 98053cfde8)

Co-authored-by: bikashmishra100 <bikashprakash@gmail.com>
2022-10-21 16:51:48 +01:00
Grot (@grafanabot)
aff8e62b8c use inherited colors on svg (#57427) (#57447)
(cherry picked from commit 842b629cd1)

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2022-10-21 17:05:31 +02:00
Grot (@grafanabot)
263e3142a1 Use resource call query_result query (#57232) (#57453)
(cherry picked from commit 47eb7f785d)

Co-authored-by: Sergey Kostrukov <sekost@microsoft.com>
2022-10-21 09:21:23 -05:00
Grot (@grafanabot)
e67669b250 Dashboard: Alerts user to incorrect tag format for JSON import (#54657) (#57277)
* Dashboard: Alerts user to incorrect tag format for JSON import

Fixes #54285: Malformed tags cause hidden title and settings page crash

* Update public/app/features/manage-dashboards/utils/validation.ts

Co-authored-by: Polina Boneva <13227501+polibb@users.noreply.github.com>

* Included Suggestions

- Removed Comments
- Updated Code Block accordingly
- Updated Tests to camelCase over snake_case

* Updates per comments

- Re-wrapped function in try{}, catch{} as I appear to have overlooked including it in the initial refactor
- Re-worded errors to align with initial error
- Added a test case for invalid json

* Update validation.ts

Updated errors to read correctly to the root cause.
Updated dashboard variable as const.

* Update actions.test.ts

Fix tests according to error output rewording

* Update validation.ts

- Included test for an empty string of non-array

* Update actions.test.ts

-- Commented incorrect commit for validation.ts, update:
- Refactored code to better align and separate from generic JSON package tests followed by our manual checks of (1) Is array, and (2) if array, is of strings

- Test cases now include a check for non-array empty string in the tag property

Co-authored-by: Polina Boneva <13227501+polibb@users.noreply.github.com>
(cherry picked from commit 5285d34cc0)

Co-authored-by: AJ Tomko <andrew.j.tomko@gmail.com>
2022-10-21 09:54:00 -04:00
Grot (@grafanabot)
9b2d3e3cac fix: add alerting enabled condition FOR adding alerting tab in folder view (#57434) (#57448)
(cherry picked from commit cd0e0fcc53)

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
2022-10-21 15:50:42 +02:00
Grot (@grafanabot)
72d97eb375 E2E: Remove time zone scenario flackyness (#55458) (#57442)
Co-authored-by: polinaboneva <polina.boneva@grafana.com>
(cherry picked from commit 7fd613ec0d)

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2022-10-21 16:31:21 +03:00
Grot (@grafanabot)
868e560006 OutsideRangePlugin: Exclude leading and trailing null values when checking limits (#57335) (#57433)
* OutsideRangePlugin: Exclude null limit values from calculation

* refactor

* Update OutsideRangePlugin.tsx

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
(cherry picked from commit f161c5407a)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-21 08:46:36 -04:00
Jo
b6a91429c9 Swap order of login fields (#57426)
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
2022-10-21 14:15:59 +02:00
Marcus Efraimsson
d2fe4b4813 [v9.2.x] Plugin fixes (#57401)
* Plugins: Remove support for V1 manifests

* Plugins: Make proxy endpoints not leak sensitive HTTP headers

* Security: Fix do not forward login cookie in outgoing requests

(cherry picked from commit 4539c33fce)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-10-21 13:55:35 +02:00
Grot (@grafanabot)
46f2243f02 Docs: fixes silences typo (#57418) (#57423)
(cherry picked from commit af17123b5f)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-21 07:52:41 -04:00
Grot (@grafanabot)
fcfbb2415f Canvas: Improve text element readability (#57371) (#57375)
(cherry picked from commit 5128659d19)

Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
2022-10-20 16:19:08 -04:00
Grot (@grafanabot)
a3bccbbdeb User: Fix externalUserId not being populated (#57341) (#57370)
(cherry picked from commit 8cebaf345d)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-10-20 14:53:17 -04:00
Grot (@grafanabot)
188792428d GoogleOAuth: Unlock UI (#57350) (#57355)
(cherry picked from commit f184f9211c)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-10-20 09:05:52 -04:00
Grot (@grafanabot)
15557bf4af StateTimeline: fix hover overlays when browser-zoomed (#57224) (#57351)
(cherry picked from commit 79afad3888)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-20 08:14:13 -04:00
Grot (@grafanabot)
7582c92f0d Docs: fixes endpoint for mimir (#57330) (#57333)
(cherry picked from commit ee6ff18122)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-20 04:42:12 -04:00
Grot (@grafanabot)
d8c11cdd7a StatuHistoryPanel: Fix zoom not working (#57240) (#57324)
(cherry picked from commit 0dd721d4ce)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-20 02:42:21 -04:00
Grot (@grafanabot)
3752197643 MSSQL: Support tables from all schemas (#53099) (#57287)
(cherry picked from commit 09ab156480)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-10-20 08:30:10 +02:00
Grot (@grafanabot)
0d93b268f2 add correct overscroll-behavior to context modals (#56070) (#57322)
(cherry picked from commit 0c1e4979af)

Co-authored-by: Sven Grossmann <Svennergr@gmail.com>
2022-10-20 01:41:41 -04:00
Grot (@grafanabot)
09eb30b9a3 Docs: Fix reference to Enterprise licensing restrictions (#57230) (#57301)
(cherry picked from commit c70bb592fe)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-19 13:29:01 -07:00
Grot (@grafanabot)
1547e41ce0 Routing: an unexpected spelling error happened (#57295) (#57305)
(cherry picked from commit bdb97496ec)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-19 14:24:27 -06:00
Grot (@grafanabot)
1559344944 Alerting: Change severity level of fetcher log messages (#57299) (#57304)
(cherry picked from commit 3e6bc28de5)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-10-19 16:19:13 -04:00
Grot (@grafanabot)
0cc1c86015 Docs: Add missing alias for field options (#57234) (#57297)
(cherry picked from commit a0d83e7db7)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-19 14:16:09 -04:00
Grot (@grafanabot)
fc99833cfb Docs: Fix links in old What's New docs (#57231) (#57283)
* Docs: Fix placeholder URL in release notes link

* Docs: Fix link to refactored docs and add missing alias

* Docs: Fix malformed links

* Docs: Fix alias with correct path

(cherry picked from commit 9680249066)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-19 11:14:58 -07:00
Grot (@grafanabot)
963a71ba34 Tempo: Fix Node Graph visualization type in dashboard (#56931) (#57269)
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
(cherry picked from commit f50ab457bd)

Co-authored-by: Hamas Shafiq <hamas.shafiq@grafana.com>
2022-10-19 18:04:19 +01:00
Grot (@grafanabot)
613d3b5e17 Loki: Fix adding of adhoc filters to stream selector when query with empty stream selector (#57280) (#57286)
* disable double stringify

* Refactor test for addLabelToQuery

* Add tests (TDD for expected behaviour)

* Fix adding ad hoc filters to correct place when no stream selector

* Update

* Update comment

* Fix getAllPositionsInNodeByType

Co-authored-by: Sven Grossmann <svennergr@gmail.com>
(cherry picked from commit 7928f170ce)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-10-19 17:50:15 +02:00
Grot (@grafanabot)
a991be81da [v9.2.x] Docs: Fix broken InfluxDB starting guide links (#57282)
* Docs: Fix broken InfluxDB starting guide links (#57235)

* Docs: Fix broken InfluxDB starting guide links

* Docs: Fix another link to panel adding docs

(cherry picked from commit e14ef50d02)

* Update docs/sources/getting-started/get-started-grafana-influxdb.md

* Update docs/sources/getting-started/get-started-grafana-influxdb.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-19 10:58:00 -04:00
Grot (@grafanabot)
85e2b028de Docs: Fix links in panels and vis docs (#57233) (#57275)
(cherry picked from commit e52c98ba99)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-19 07:30:55 -07:00
Grot (@grafanabot)
a8a1bcc58c Fix typo (#57223) (#57229)
(cherry picked from commit cc6245df8e)

Co-authored-by: Sobuno <jesper@sobuno.dk>
2022-10-19 07:29:30 -07:00
Grot (@grafanabot)
7cda7094c5 Cloudwatch: Fix issue where selected log groups clear from dashboards if there are more than 50 results (#57196) (#57210)
(cherry picked from commit b2e2879b07)

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
2022-10-19 09:11:58 -04:00
Grot (@grafanabot)
880452931b CloudWatch: Make sure adoption tracking is done on valid, migrated queries (#56872) (#57241)
* make sure adoption tracking is done on valid, migrated queries

* ignore hidden queries

* fix test

* remove obsolete test

(cherry picked from commit a30885c523)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-10-19 12:38:16 +02:00
Grot (@grafanabot)
29a03139dd disable double stringify (#57243) (#57254)
(cherry picked from commit 598da14d88)

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2022-10-19 06:13:42 -04:00
Grot (@grafanabot)
f03d0facc5 Loki: Fix explain section about $__interval variable (#57188) (#57255)
* Loki: Update  explain section

* Update

* Update public/app/plugins/datasource/loki/querybuilder/operationUtils.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

Co-authored-by: Matias Chomicki <matyax@gmail.com>
(cherry picked from commit b4a03d0cff)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-10-19 06:12:51 -04:00
Grot (@grafanabot)
00b1a285ad elastic: backend-mode: fix trimEdges functionality (#56985) (#57253)
(cherry picked from commit 0491c19712)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-10-19 06:08:40 -04:00
Grot (@grafanabot)
c4fdc3d7c6 Replace json decoder with io.ReadAll (#57178) (#57251)
(cherry picked from commit 0b72c36527)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-10-19 06:03:47 -04:00
Grot (@grafanabot)
9f8bee7187 Loki: Remove already selected options from next label filter options in builder (#57187) (#57250)
* Loki: Filter out duplicated options in loki query builder label name options

* Update test

(cherry picked from commit b997bc4200)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-10-19 05:57:44 -04:00
Grot (@grafanabot)
ba1942febb Elasticsearch: Fix calculation of trimEdges (#56148) (#57249)
* Elasticsearch: Fix calculation of trimEdges

When a value of trimEdges is set greater than 1 we need to drop both the
first and last sample of the data from the response.

* Elasticsearch: Fix reading trimEdges from the query settings

Currently the trimEdges property in the JSON panel is stored as a string
and not directly as a number.

This caused that the reading of the value failed in the go backend
because the simplejson.Int() method doesn't properly handle this case.
This failure when decoding the value goes unnoticed because of the early
return causing the trimEdges configuration to be ignored.

* Refactor castToInt to also return an error

Add a new test case that sets the `trimEdges` property as a quoted
number.

(cherry picked from commit e4f2006cce)

Co-authored-by: Jorge Luis Betancourt <jorge-luis.betancourt@trivago.com>
2022-10-19 05:18:59 -04:00
Dimitris Sotirakis
7593d5880f Add token to init-enterprise (#57246) (#57248)
(cherry picked from commit f0b882ebad)
2022-10-19 04:37:36 -04:00
Grot (@grafanabot)
cce767fee4 Alerting: Add support for wecom apiapp (#55991) (#57238)
This change adds new functionality to the wecom alerting contact point. In addition to a webhook address, you can now send alerts to the wecom apiapp endpoint.

Based on https://github.com/grafana/grafana/discussions/55883

Signed-off-by: aimuz <mr.imuz@gmail.com>
(cherry picked from commit c0cc85b5f1)

Co-authored-by: aimuz <mr.imuz@gmail.com>
2022-10-19 13:14:32 +08:00
Grot (@grafanabot)
29baf812cf fix swagger spec for receivers API response (#57124) (#57128)
(cherry picked from commit 6ad405e256)

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-10-18 12:50:54 -03:00
Grot (@grafanabot)
484df7d682 [v9.2.x] Alerting: Use correct response body for silence post API (#57126)
Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-10-18 11:35:13 -04:00
juanicabanas
b9cce07b10 PublicDashboards: Fix hidden queries execution (#57004) (#57194)
PublicDashboards: Fix hidden queries execution
2022-10-18 10:57:58 -04:00
Grot (@grafanabot)
9c6d358d7f Fix NumberInput empty values (#57142) (#57190)
* Fix NumberInput empty values

* tests

* tests

(cherry picked from commit e91135cf19)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-18 10:13:19 -04:00
Grot (@grafanabot)
0905058657 Revert data links code for sorted vector case (#57175) (#57183)
(cherry picked from commit 9c514748f7)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-18 09:13:31 -04:00
Grot (@grafanabot)
02b1030662 "Release: Updated versions in package to 9.2.2" (#57181) 2022-10-18 15:07:12 +02:00
Grot (@grafanabot)
a395671237 Changelog: Updated changelog for 9.2.1 (#57176) (#57180)
(cherry picked from commit 4cee910971)
2022-10-18 08:48:17 -04:00
Dimitris Sotirakis
9617d2a14f Publish Linux Packages: Fix bad secret name (#56708) (#57174)
🤦

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
(cherry picked from commit 72b9555487)

Co-authored-by: Julien Duchesne <julien.duchesne@grafana.com>
2022-10-18 08:28:48 -04:00
Grot (@grafanabot)
f2fa4eb197 TimeseriesPanel: Fix variables in data links (#56729) (#57163)
* TimeseriesPanel: Fix variables in data links

* Refactor variable fix for all Timeseries panels

* cr mods

(cherry picked from commit 76d6e3c075)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-18 08:00:29 -04:00
Grot (@grafanabot)
38458c40d2 Quota(fix): remove service accounts from quota count (#56700) (#57167)
(cherry picked from commit fa45742abc)

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
2022-10-18 13:00:06 +01:00
Dimitris Sotirakis
04678bc1aa Add RPM package publishing (#56797) (#57162)
Just tested deb publishing, and confirmed it works. Noticed that RPM packages aren't published though
It's the exact same step, targetting the RPM files instead
Both steps will run in parallel

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
(cherry picked from commit 44ad4ec9d4)

Co-authored-by: Julien Duchesne <julien.duchesne@grafana.com>
2022-10-18 14:19:22 +03:00
Grot (@grafanabot)
ef74b7a486 Browse: Fix General folder not showing in FolderPicker (#57156) (#57158)
(cherry picked from commit 4d0dd0647e)

Co-authored-by: Laura Fernández <laura.fernandez@grafana.com>
2022-10-18 06:52:33 -04:00
Sonia Aguilar
cbdc5e59cf Fix sending RelativeTimeRange when requesting eval with resample expressions (#57076) 2022-10-18 09:11:42 +02:00
Dimitris Sotirakis
7b12482512 Update grabpl to 3.0.14 (#57144) (#57145)
(cherry picked from commit 7a71482371)
2022-10-18 10:06:33 +03:00
Artur Wierzbicki
7a91afc504 Search: Sort alphabetically in the folder view, increase the limit of the folder search from 50 to 1000 (#57078) (#57141)
* search: sort folders

* search: increase the limit for folder search to 1000

* add folder view sort test

* search: getFolderViewSort

* search: revert test

Co-authored-by: Todd Treece <todd.treece@grafana.com>
(cherry picked from commit c26cf6a517)
2022-10-18 09:50:59 +03:00
Grot (@grafanabot)
56fa39ede0 Alerting: Improve notification policies created during migration (#52071) (#57139)
* Alerting: Improve notification policies created during migration

Previously, migrated legacy alerts were connected to notification policies through
a `rule_uid` label in a 1:1 fashion. While this correctly mimicked pre-migration routing,
it didn't create a notification policy structure that is easy to view/modify. In addition,
having one policy per migrated alert is, in some ways, counter to the recommended approach of
Unified Alerting.

This change replaces `rule_uid`-based migrated notification policies with a private
label called `__contacts__`. This label stores a list of double quoted strings containing the names of
all contact points an AlertRule should route to (based on legacy notification channels). Finally,
one notification policy is created per contact point with each matching AlertRules via regex on this
`__contacts__` label.

The result is a simpler, clearer, and easier to modify notification policy structure, with the
added benefit that you can see which contact points an AlertRule is being routed to from the
AlertRule creation page.

(cherry picked from commit 0db339d82f)

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2022-10-18 01:05:47 -04:00
Grot (@grafanabot)
1980c169b9 Canvas: Text input cursor jumping (#57133) (#57135)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
(cherry picked from commit 7f5914ff05)

Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
2022-10-17 18:55:30 -04:00
Grot (@grafanabot)
9c9480dd0c Grafana UI: Export prop types for queryfield, modal and field components (#57097) (#57108)
* chore(grafana-ui): export prop types for queryfield, modal and field components

* docs(migration-guide): add notes for react peerdependencies and additional type exposure

* Update docs/sources/developers/plugins/migration-guide.md

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

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

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-10-17 15:22:14 -04:00
Grot (@grafanabot)
c639251ace CI: Move CreateTempFile - use it for rpm/deb packages (#56990) (#57102)
* Move CreateTempFile - use it for rpm/deb packages

* Fix typo

* Fix tests:

(cherry picked from commit c96b6a6ab0)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-10-17 20:45:50 +03:00
Grot (@grafanabot)
0965e3ac12 Docs: Fix broken link (#57083) (#57109)
* Docs: Fix broken link

* Update docs/sources/setup-grafana/configure-security/configure-authentication/auth-proxy.md

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit 5c2b722287)

Co-authored-by: Ahmed <hello@clivern.com>
2022-10-17 12:12:25 -04:00
Grot (@grafanabot)
1755c72670 Docs: Contextualize base64 encoding in Basic Authorization (#57046) (#57106)
(cherry picked from commit 2bed451990)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-17 09:09:59 -07:00
Grot (@grafanabot)
98dfb42cbf Toolkit: Fix Cannot use "import statement outside" error in tests (#57071) (#57094)
(cherry picked from commit fd0fcffc24)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-10-17 17:36:47 +02:00
Sonia Aguilar
3a93203a57 Show No attempts instead of OK when there is no attempt for notifier (#56494) (#57090)
(cherry picked from commit a18a3d7628)
2022-10-17 12:03:00 -03:00
Grot (@grafanabot)
b33b3ea0b6 Docs: Clarify and document dashboard URL query parameters for variables (#56055) (#57045)
(cherry picked from commit 0889c3ad07)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-17 07:41:10 -07:00
brendamuir
9795dbb401 Docs: adds terraform provisioning docs (#55660) (#57091)
* Docs: adds set up section and alertmanager

* deletes info that got copied to new file

(cherry picked from commit b7f356df31)
2022-10-17 10:23:58 -04:00
Dimitris Sotirakis
11bfb4a387 Make publish packages depend on compile-build-cmd and run from bin/build (#56713) (#57059)
(cherry picked from commit e25475b9c8)
2022-10-17 17:13:10 +03:00
Grot (@grafanabot)
bca3356661 Docs: adds modify dashboard settings docs (#56826) (#57086)
* adds modify dashboard settings docs

* Quick updates

* minor corrections

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
(cherry picked from commit de1cfc120f)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-10-17 09:11:56 -05:00
Grot (@grafanabot)
95f23777f0 BarChart: use dashboard timezone for x axis (#57047) (#57056)
(cherry picked from commit da39c7297b)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-17 07:32:23 -06:00
Grot (@grafanabot)
8ba2187115 Fix duplicated receivers in API response (#56829) (#57027)
(cherry picked from commit 3c56fd8da0)

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-10-17 15:19:28 +02:00
Grot (@grafanabot)
c2ce0e82ff Inspect: Handle JSON tab crash when the provided object is too big to stringify. (#55939) (#56770)
* fix(inspector): handle json tab crash when too much data

* message update when JSON stringify fails due to obj size

(cherry picked from commit 6edce00b1a)

Co-authored-by: Alex <TsotosA@users.noreply.github.com>
2022-10-17 06:10:54 -07:00
Dimitris Sotirakis
a3f69498f6 Update grabpl to v3.0.12 (#56823) (#56866)
(cherry picked from commit b9d449529a)
2022-10-17 12:27:29 +01:00
Grot (@grafanabot)
27f57b144d RBAC: Make uid for managed role names deterministic during migrations (#56620) (#57073)
* RBAC: Change the generate uid function to be deterministic so we can avoid collision

* RBAC: Use fmt.Errorf

* RBAC: Add comment

* RBAC: Export GenerateManagedRoleUID

(cherry picked from commit 21792fdf37)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-10-17 06:27:33 -04:00
Grot (@grafanabot)
bcc5a441bf Alerting: Missing config option in the sample (#54179) (#57064)
(cherry picked from commit 03248e9cd8)

Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
2022-10-17 11:57:43 +02:00
Konrad Lalik
4604062f80 [v9.2.x] Alerting: Fix source and rule name decoding on Find route (#56805) (#56922) 2022-10-17 11:29:25 +02:00
Grot (@grafanabot)
88194154cd GoogleCloudMonitoring: fix typo tooltip pre-processing (#57049) (#57058)
(cherry picked from commit c8402b4b50)

Co-authored-by: Labesse Kévin <kevin@labesse.me>
2022-10-17 04:39:25 -04:00
Grot (@grafanabot)
c0f54f8f58 <Documentation> Document usage of environment variables/files in GitHub Auth login (#52891) (#57035)
* Document usage of environment variables/files

* Updating Github Auth Login Documentation

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
(cherry picked from commit a46fa16b4e)

Co-authored-by: Ben Golding <60831565+bgolding355@users.noreply.github.com>
2022-10-15 09:26:10 -07:00
Santiago
5b7920fe32 Backport 56822 to v9.2.x (#57023)
* use Prometheus' format for notification attempts durations (#56822)

(cherry picked from commit 9996dbd577)

* fix merge errors
2022-10-14 18:35:17 -03:00
Grot (@grafanabot)
51d5a6031e Alerting: Add Notification error feedback on contact points view (#56225) (#57017)
* Alerting: Receivers integrations error feedback: WIP - Add notifications error at the top right on contact points view (#52390)

* Add interfaces for contact point errors

* [WIP] Create fake response for the new service to get contact point errors

* [WIP] Create action an reducer for the new service to get contact point errors

* Fetch fetchContactPointStates in Contact Points tab every 20s and when AM changes

* [WIP] Use store to get error count

* Show number of integrations errors at the contact points main view

* Add warning icon and refactor styles using getStyles

* Change lastNotify type to string instead of DateTime

* Use Stack component from experimental library when it is possible

* Alerting: Add receivers error feedback in contact point list (#52524)

* Refactor types for contact points state

* Add health column in ReceiversTable in case error state is available for this AM

* Create method for converting contact points state DTO to the FE type used in Redux store

* Update types

* Fix indexOf criteria getting integration type

* Change type name to integrationType name

* Change new components to be named functions to follow the FE style-guide

* Fix typos

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>

* Decouple ReceiversTable from Redux state

* Create private useContactPointsState hook to simplify code in ReceiversTable component

* Add tests for getIntegrationType and refactor the method to validate the name

* Add tests for contactPointsStateDtoToModel method

* Remove unnecessary check

* Use Badge compoment for health status in contact point list

* Create new method parseIntegrationName to simplify getting types and index from integration name

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>

* Alerting: Show integrations error feedback when expanding contact point in list (#52920)

* Use DynamicTable for rendering list of contact points and make them expandable if error status is available

* Render expanded content for contact points integrations

* Style and format last notify column

* Add send resolve column to the integration details

* Fix receiver id for DynamicTable row

* Update clock icon in integration state

* Fix tests

* Add PR review sugestions

* Alerting/integrations error feedback handle null dates in response 3 (#55659)

* Update fake response with lastNotify ISO8601 formatted, to be aligned with latest BE changes

* Update LastNotify in ReceiversTable component to handle null date

* Alerting/integrations error feedback handle 404 state not available (#55803)

* Create fetchContactPointsState using the future contact point url and handle 404 error

* Add contact points state tests

* Alerting/update receivers dto naming 2 (#56201)

* Update NotifierStatus naming and fix sendResolved not being updated in UI

* Return always empty ContactPointsState array when catching an error in the request response

* Fix test

* Show notification status only in notifications main view

* Calculate total error count from the final contactPointsState object, to avoid errors when duplicated entries are returned wronly in the response

* Add PR review suggestions

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
(cherry picked from commit d8d8ef1aff)

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
2022-10-14 16:20:33 -03:00
Grot (@grafanabot)
6f1af5c007 Docs: Note end of release notes publication (#57013) (#57015)
* Docs: Note cessation of release notes

* Docs: Update What's New index mention of release notes

* Docs: Update links and references to the release notes

* Docs: Fix relrefs

* Docs: Spellcheck

(cherry picked from commit 2b4d57fe60)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-14 19:28:26 +02:00
Santiago
ba9293b09d Alerting: Expose info about notification delivery errors in a new /receivers endpoint (#55429) (#56899)
* (WIP) switch to fork AM, first implementation of the API, generate spec

* get receivers avoiding race conditions

* use latest version of our forked AM, tests

* make linter happy, delete TODO comment

* update number of expected paths to += 2

* delete unused endpoint code, code review comments, tests

* Update pkg/services/ngalert/notifier/alertmanager.go

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>

* remove call to fmt.Println

* clear naming for fields

* shorter variable names in GetReceivers

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
(cherry picked from commit 09f8e026a1)
2022-10-14 12:22:33 -03:00
Grot (@grafanabot)
96ae3b7e45 Alerting: Remove blank comment (#56889) (#56984)
(cherry picked from commit 2f85172718)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-10-14 08:41:57 -04:00
Gabriel MABILLE
5a17ef9d6c AzureAD: Add option to force fetch the groups from the Graph API (#56916) (#56947)
* AzureAD: Add option to force fetch the groups from the Graph API (#56916)

* Add a new option to systematically fetch AzureAD groups from the Graph API

(cherry picked from commit 0f4d126109)

* Update docs/sources/setup-grafana/configure-security/configure-authentication/azuread.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>
2022-10-14 14:06:44 +02:00
Grot (@grafanabot)
d78f259ee8 Last Table Column Not Centered (#56047) (#56938)
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Matheus Muniz <87545749+matheusmuniz03@users.noreply.github.com>
Co-authored-by: Matheus Muniz <matheusmuniz100@hotmail.com>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>

Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Matheus Muniz <87545749+matheusmuniz03@users.noreply.github.com>
Co-authored-by: Matheus Muniz <matheusmuniz100@hotmail.com>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
(cherry picked from commit 4ecc9f42ac)

Co-authored-by: GitStart <1501599+gitstart@users.noreply.github.com>
2022-10-14 06:53:41 -04:00
Grot (@grafanabot)
c9341d5314 MSSQL/MySQL: Add correct refId when fetching variable query results (#56919) (#56925)
(cherry picked from commit b374b01260)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-14 06:19:15 -04:00
Grot (@grafanabot)
0bdc74ba39 Candlestick: re-init config when series length changes (#56913) (#56930)
(cherry picked from commit 4eea326ee8)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-14 05:31:10 -04:00
Grot (@grafanabot)
7d21e021ea Heatmap: honor dashboard timezone in x axis and fix tooltip time range (#56909) (#56928)
(cherry picked from commit 53ac77d4a5)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-14 05:30:15 -04:00
Grot (@grafanabot)
b3b72165f1 MSSQL/MySQL: Fix variable interpolation (#56879) (#56924)
* MSSQL/MySQL: Fix variable interpolation

* Escape string vars

(cherry picked from commit 902a230867)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-14 12:07:03 +03:00
Grot (@grafanabot)
53c71b486a [v9.2.x] Alerting: Fix folder picker clear action (#56915)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-10-14 09:16:28 +02:00
Grot (@grafanabot)
61f0183275 Docs: Fix Canvas doc link and add call to action for feedback (#56908) (#56911)
* Fix canvas documentation link on what's new page; add feedback CTA in canvas doc

* PORK: replace allows with enables for better language

* Fix a few more instances of allow to enable

* Move feedback above video in intro canvas section

* Revert changing link change

(cherry picked from commit 527690d19a)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-10-13 22:05:35 -04:00
Grot (@grafanabot)
928a9ebc57 Docs: Basics docs refactor (#56905) (#56906)
* renames directory

* fixes relrefs

(cherry picked from commit 385079bea7)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-10-13 16:06:41 -05:00
Grot (@grafanabot)
c74db84073 moves canvas to proper directory, corrects relref (#56902) (#56903)
(cherry picked from commit c137cf60f0)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-10-13 14:47:54 -05:00
Grot (@grafanabot)
b00bb90926 Propagate all headers on main QueryData (#56896) (#56901)
(cherry picked from commit 145b970557)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-10-13 15:33:40 -04:00
Grot (@grafanabot)
22ae442f56 Explore: Remove camel case from tracking labels (#56809) (#56856)
* refactor: remove camel case from tracking labels

* refactor: remove camel case from tracking labels

(cherry picked from commit b71e08ad59)

Co-authored-by: Laura Benz <48948963+L-M-K-B@users.noreply.github.com>
2022-10-13 13:01:34 +02:00
Grot (@grafanabot)
17e197634e Alerting: Fix email image embedding on Windows. (#56766) (#56839)
The email notifier was incorrectly handling Windows filepaths. This is
fixed by using the `path/filepath` package.

(cherry picked from commit c7c640d903)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-10-13 11:21:20 +08:00
Grot (@grafanabot)
da5186b07a Canvas: Clear current selection in dashboard mode (#56830) (#56831)
(cherry picked from commit 254bb0c99e)

Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
2022-10-12 17:37:23 -04:00
Grot (@grafanabot)
e238b9f9c1 Alerting: Fix mathexp.NoData for ConditionsCmd (#56816) (#56820)
(cherry picked from commit 004bb7689d)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-10-12 12:48:18 -04:00
Grot (@grafanabot)
1d2037a766 fix typo (#56802) (#56804)
(cherry picked from commit 26e7228cd9)

Co-authored-by: Michael Mandrus <41969079+mmandrus@users.noreply.github.com>
2022-10-12 09:47:36 -04:00
Grot (@grafanabot)
e20953e4f8 LDAP: log that organization mapping is skipped (#56796) (#56798)
(cherry picked from commit 5fcec05695)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-10-12 15:03:10 +02:00
Grot (@grafanabot)
f01526e35b LDAP: Add skip_org_role_sync configuration option (#56679) (#56792)
* LDAP: Add skip_org_role_sync option

* Document the new config option

* Nit on docs

* Update docs/sources/setup-grafana/configure-security/configure-authentication/ldap.md

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

* Docs suggestions

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

* Add test, Fix disabled user when no role

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
(cherry picked from commit 10c080dad1)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-10-12 13:57:20 +02:00
Grot (@grafanabot)
7033623093 Alerting: Add doc comments to classic.go (#56724) (#56785)
(cherry picked from commit 67d93ceea0)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-10-12 06:14:06 -04:00
Grot (@grafanabot)
ffa67c888b Fixes 48972 - Exposes channels.WebhookMessage (#56140) (#56778)
(cherry picked from commit 26bb139470)

Co-authored-by: Matt <cadnce@users.noreply.github.com>
2022-10-12 05:02:57 -04:00
Victor Marin
794f9dbb05 TablePanel: Footer now updates values on column filtering (#56354) (#56768)
* Table footer now updates values on column filtering

* Backwards compatibility

(cherry picked from commit 48c27872af)
2022-10-12 10:46:32 +03:00
Konrad Lalik
91c78ce784 Alerting: Alert list performance improvements (#56247) (#56742)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
(cherry picked from commit 5ddf7b85df)
2022-10-12 09:08:34 +02:00
Dimitris Sotirakis
0cf8f9fab6 [v9.2.x] CI: Split release test pipelines (#56670)
* CI: Split release test pipelines (#56655)

* Split test release pipelines

* Add missing dependencies

* Add release branch case when naming pipeline

(cherry picked from commit 75c5845749)

* Add clone-enterprise and init-enterprise steps (#56662)

(cherry picked from commit eb077db2b0)

* Add dependencies (#56666)

(cherry picked from commit 811f6054c8)

* Fix release test pipelines dependencies (#56671)

(cherry picked from commit 668cb25b82)

* Remove build-frontend-packages step from docs pipelines (#56686)

(cherry picked from commit efc8f985cb)

* Remove grabpl dependency from yarn-install (#56692)

* Sign drone
2022-10-12 09:44:12 +03:00
Grot (@grafanabot)
d02b7fc0ba Alerting: Fix duration calculation when testing a rule (#56616) (#56705)
When testing a rule within the legacy alerting the `timeMs` field could
sometimes show negative (and/or wrongly calculated) durations. This happens if the alert evaluation crosses a second boundary. This change uses the full timestamp to compute the eval duration.

(cherry picked from commit 95b9fa3346)

Co-authored-by: Jorge Luis Betancourt <jorge-luis.betancourt@trivago.com>
2022-10-12 11:38:33 +08:00
Grot (@grafanabot)
bd81793292 Docs: Fix what's new canvas doc video file reference #56754 (#56761)
(cherry picked from commit 17433f2166)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-10-11 19:00:57 -04:00
Grot (@grafanabot)
0383c57a2f Docs: Add missing documentation for enterprise features (#56753) (#56760)
* add documentation about protected roles

* add section about sync debug

* add link to recorded queries to main enterprise pages

* Update docs/sources/setup-grafana/configure-security/configure-authentication/ldap.md

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>

* fixes from pr review

* add missing char

* Apply suggestions from code review

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>

* fix other incorrect lines to match review

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>
(cherry picked from commit 6827ca01a0)

Co-authored-by: Michael Mandrus <41969079+mmandrus@users.noreply.github.com>
2022-10-11 19:00:46 -04:00
Christopher Moyer
e926018407 removes add-organize-panels (#56756) 2022-10-11 17:13:31 -05:00
Grot (@grafanabot)
18e3d9d209 Docs: Update Canvas videos to mp4 URLs (#56748) (#56749)
(cherry picked from commit f4a3400a9c)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-11 12:10:00 -07:00
Grot (@grafanabot)
85f83c44b8 Docs: Remove Beta tag from 9.2 What's New post-release (#56746) (#56747)
(cherry picked from commit abd7b7dccc)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-11 14:19:57 -04:00
Grot (@grafanabot)
abe3dbc53b Docs: Clarify JOIN feature change (#56740) (#56744)
(cherry picked from commit c98db1615f)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-11 09:28:58 -07:00
Grot (@grafanabot)
34a054642f docs/provisioning: fix typo in notification policies (#54917) (#56619)
(cherry picked from commit f90e72991d)

Co-authored-by: Timost <Timost@users.noreply.github.com>
2022-10-11 18:25:18 +02:00
Dimitris Sotirakis
bf184205dc Update publish.yml for 9.2.x (#56730) 2022-10-11 17:28:52 +03:00
George Robinson
4585d70f22 Alerting: Add doc comments to state struct and normalize fields (#56647) (#56676)
(cherry picked from commit 52965de369)
2022-10-11 15:20:18 +01:00
Grot (@grafanabot)
d06eb2fa8b Changelog: Updated changelog for 9.2.0 (#56725) (#56728)
(cherry picked from commit 8627b2131f)
2022-10-11 17:20:07 +03:00
Grot (@grafanabot)
e0d8bb2719 Canvas: Docs for 9.2 (#56219) (#56718)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
(cherry picked from commit a9c0afcc1f)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-10-11 13:43:34 +00:00
Grot (@grafanabot)
32111ee203 Google Cloud Monitoring: Adapt default crossSeriesReducer (#56693) (#56706)
(cherry picked from commit cf2ba7e41c)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-10-11 09:04:25 -04:00
Grot (@grafanabot)
4468aac4ee [v9.2.x] Alerting: Mark all tests that interact with the database as integration tests (#56603)
Previously, two tests were not explicitly marked as integration tests
and so were not run against all 3 supported databases in the CI
environment.

(cherry picked from commit 7312a2dab0)


Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-10-11 20:43:51 +08:00
Grot (@grafanabot)
7d182b4890 Docs: updates numbering (#56695) (#56697)
* Docs: updates numbering

* removes full stop

(cherry picked from commit d6fa12c5bc)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-11 13:35:51 +01:00
Grot (@grafanabot)
2483c64d26 Docs: adds external Alertmanager config (#56636) (#56685)
* Docs: adds external Alertmanager config

* Adds link to add external alertmanager

* updating with george feedbacj

(cherry picked from commit 8a3294dcdf)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-11 06:32:24 -04:00
Grot (@grafanabot)
412f05e16f Drone: publish-linux-packages should be privileged (#55816) (#55818)
It's currently failing with a failure to mount s3fs

(cherry picked from commit 169df2fe90)

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
2022-10-11 12:23:01 +03:00
Grot (@grafanabot)
a57455e5cd FIX: Remove RBAC datasource permissions upon datasource deletion (#56530) (#56550)
* FIX: Remove RBAC datasource permissions upon datasource deletion

* Use scope provider instead

* Fix test

(cherry picked from commit 7595ed0668)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-10-11 12:16:43 +03:00
Grot (@grafanabot)
f4b37ab8a9 Docs: Fix caching.memcached setting name (#56606) (#56675)
(cherry picked from commit ef17f12c23)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2022-10-11 05:02:31 -04:00
Grot (@grafanabot)
b23fd7aad0 Chore: Regen swagger spec (#55750) (#55762)
* Chore: Regen swagger spec

* Regenerate swagger after enteprise fix

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

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-10-11 10:43:44 +02:00
Grot (@grafanabot)
7593ab4a4e ErrorPage: Fix position of chunk loading error (#56473) (#56628)
(cherry picked from commit 03e887723a)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-10-11 10:42:59 +02:00
Artur Wierzbicki
1bbbe41a6c Search: wrap data.Frame in a backend.DataResponse and return it directly when the index is not ready (#56611) 2022-10-10 14:05:16 -04:00
Grot (@grafanabot)
25e89ba295 Google Cloud Monitoring: Fix bucket bound for distributions (#56565) (#56649)
(cherry picked from commit 65e56c9fb8)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-10-10 10:25:37 -04:00
Grot (@grafanabot)
b8aa31433b Loki: Escape label-values in context queries (#56614) (#56639)
(cherry picked from commit 62674604b4)

Co-authored-by: Sven Grossmann <Svennergr@gmail.com>
2022-10-10 14:49:00 +02:00
Grot (@grafanabot)
c258cfb553 Docs: removes duplicate sentence in silences (#56629) (#56634)
(cherry picked from commit db68fa358f)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-10 07:03:03 -04:00
Grot (@grafanabot)
752f886637 Docs: adds note on aurora incompatibility (#56621) (#56631)
* Docs: adds note on aurora incompatibility

* updates with feedback

* adds issue link

(cherry picked from commit 2aff817ea8)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-10 06:57:45 -04:00
Grot (@grafanabot)
27a4dd8765 Docs: changes alert groupings to groups (#56617) (#56627)
* Docs: changes alert groupings to groups

* One more alert grouping

(cherry picked from commit a84edb274b)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-10 06:44:41 -04:00
Adela Almasan
fd7358a6ef [v9.2.x] Canvas: Add demo dashboards (#56588)
Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-10-07 21:20:22 -07:00
Grot (@grafanabot)
1024334d7b Alerting: Fix migration to create rules with group index 1 (#56511) (#56584)
(cherry picked from commit 3487e68d15)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-10-07 17:33:21 -04:00
Yuriy Tseretyan
77046b3fba [9.2.x] Alerting: Fix migration to not add label "alertname" (#56509) (#56579) 2022-10-07 16:38:00 -04:00
Grot (@grafanabot)
1964ddce83 Geomap: Docs for 9.2 (#56493) (#56501)
(cherry picked from commit 15d2653b89)

Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
2022-10-07 15:18:23 -05:00
Grot (@grafanabot)
d5bb8aba85 Prometheus: Add Exemplar sampling for streaming parser (#56049) (#56571)
(cherry picked from commit 152c7f149a)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-10-07 13:15:49 -04:00
Grot (@grafanabot)
94341ed95c [v9.2.x] Prometheus: Various buffered and streaming parsing fixes (#56468)
* Prometheus: Various buffered and streaming parsing fixes (#55941)

(cherry picked from commit 1c61c81dde)

* switch back to 0 instead of NaN for 9.2 buffered responses

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-10-07 13:02:12 -04:00
Grot (@grafanabot)
77c1546511 Loki: Fix redundant escaping in adhoc filter with regex match (#56447) (#56562)
* Loki: Fix redundant escaping in adhoc filter with regex match

* Update data.js

* Simplify test

* Simplify test

* Update

* Add more tests

(cherry picked from commit a4c5801440)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-10-07 16:37:23 +02:00
Grot (@grafanabot)
9854ac88e9 [v9.2.x] Alerting: Fix evaluation interval validation (#56556)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-10-07 09:20:02 -04:00
Emil Tullstedt
90c8e52a17 Chore: Upgrade Go to 1.19.2 (#56355) (#56553)
(cherry picked from commit c2d3a31772)
2022-10-07 09:05:02 -04:00
Grot (@grafanabot)
34e7d48ca6 Form validation problem in table panel option (column width & minimum column width) (#56452) (#56547)
Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Matheus Muniz <87545749+matheusmuniz03@users.noreply.github.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Matheus Muniz <matheusmuniz100@hotmail.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
(cherry picked from commit 0eb3afbd14)

Co-authored-by: GitStart <1501599+gitstart@users.noreply.github.com>
2022-10-07 08:19:52 -04:00
George Robinson
1d02c2cd08 Docs: adds alertmanager overview (#56527) (#56539)
* Docs: adds alertmanager overview

* updating with georges feedback

* adds deprecation note to API docs

* update to provisioning instuctions

(cherry picked from commit 939caa67a2)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-07 11:22:12 +01:00
Grot (@grafanabot)
77ec6609df Alerting: Fix pq: missing FROM-clause for table "a" (#56453) (#56534)
This commit fixes a bug where changing the Folder or Rule Group of an existing rule returns the following error in PostgreSQL "pq: missing FROM-clause for table a"

(cherry picked from commit 762688d67f)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-10-07 10:35:47 +01:00
Grot (@grafanabot)
cacc00aeb8 Use io.ReadAll instead of json.Decode (#56528) (#56529)
(cherry picked from commit df2abf09c2)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-10-07 04:45:42 -04:00
Grot (@grafanabot)
4ac54040a9 Chore: Make NewCookieOptions exported in cookies.go (#56476) (#56499)
(cherry picked from commit 1de0f4453e)

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2022-10-07 10:40:03 +02:00
Grot (@grafanabot)
17655071b7 RBAC: Redirect to /login when forceLogin is set (#56469) (#56523)
(cherry picked from commit bb479e030a)

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-10-07 02:31:19 -04:00
Grot (@grafanabot)
ba5ee60944 StateTimeline: Fix tooltip showing erroneously in shared crosshair dashboards (#55809) (#56521)
* StateTimeline: Fix shared crosshair

* Fix for StatusHistory also

(cherry picked from commit b622a87aee)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-07 02:14:45 -04:00
Joe Blubaugh
84a6820fd8 Alerting: Update imported prometheus alertmanager version. Backport (#56228) (#56430)
Version 0.24.0 has a few bugs that cause panics. We update here to the
latest commit on github.com/prometheus/alertmanager's main branch.

Panic Bugs:
https://github.com/prometheus/alertmanager/issues/2936
https://github.com/prometheus/alertmanager/issues/3064

(cherry picked from commit ce89624ca2)
2022-10-07 14:00:45 +08:00
Grot (@grafanabot)
dc04e2589c Thresholds: fix line rendering with multiple y axes (#56516) (#56518)
(cherry picked from commit 21d9cf0db4)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-06 17:36:07 -06:00
Grot (@grafanabot)
5e0b29ed4b [v9.2.x] Docs: Updating Public Dashboard documentation (#56504) (#56508)
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit 356318e387)
2022-10-06 17:58:20 -03:00
lean.dev
debd9927c6 [v9.2.x] Docs: Updating Public Dashboard documentation
* Docs: Updating Public Dashboard documentation, not supporting library panels
2022-10-06 16:10:22 -03:00
Grot (@grafanabot)
f6d7f7dec6 Fix issue 55626 (#55636) (#56483)
Reset the mapping table for Dynamic Geojson

(cherry picked from commit c1d6df4eb7)

Co-authored-by: Nicolas Janicaud Gondoin <112407974+janicaud@users.noreply.github.com>
2022-10-06 08:44:39 -07:00
Grot (@grafanabot)
ece17f30ab Packaging: Change from 0750 to 0755 folder permissions when packaging (#56436) (#56474)
* Change from 0750 to 0755

* Change to 0o755

* Skip lint when creating dir

(cherry picked from commit 66e8f39ce8)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-10-06 10:25:43 -04:00
Grot (@grafanabot)
e6736c4308 Azure Monitor: Fix subscription selector when changing data sources (#56284) (#56409)
(cherry picked from commit 2cdbd05634)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-10-06 09:58:10 +00:00
Dimitris Sotirakis
c00946994a CI: Stop publishing OSS images for security mode (#56088) (#56374)
* No-op: Refactor publish images pipeline struct

* Stop publishing images for OSS

(cherry picked from commit 5cdc932f8c)
2022-10-06 10:52:08 +01:00
Dimitris Sotirakis
2c781d472a Change from grabpl to build for grafana-com (#56434) (#56443)
(cherry picked from commit ec7d9e196e)
2022-10-06 11:16:35 +03:00
Dimitris Sotirakis
8f7deb3741 Move files under pkg/build/packaging (#56435) (#56440)
(cherry picked from commit 3aacda5579)
2022-10-06 11:16:22 +03:00
Yuriy Tseretyan
9b87e7de11 [9.2.x] Alerting: Start ticker only when scheduler starts (#56339) (#56418) 2022-10-05 15:52:06 -04:00
Grot (@grafanabot)
23788d0f70 QueryEditorRow: Only pass error to query editor if panel is not loading (#56350) (#56423)
(cherry picked from commit b3087cfcd1)

Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
2022-10-05 15:34:59 -04:00
Sven Grossmann
0362260b30 LogContext: Fix scroll position in upper context group (#56370) (#56401)
* fix log row being falsely added to context

* do not add to many lines

* fix scroll position in context

* more flexible id comparison

* add original refid to context query

* added missing row comparison

* updated comment

Co-authored-by: Matias Chomicki <matyax@gmail.com>

Co-authored-by: Matias Chomicki <matyax@gmail.com>
(cherry picked from commit 0d8ea2bb34)
2022-10-05 12:00:06 -04:00
Grot (@grafanabot)
0f136e2b26 Azure Monitor: Adapt empty Logs response (#56378) (#56395)
(cherry picked from commit 8594e648e8)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-10-05 10:24:13 -04:00
Grot (@grafanabot)
55186418b9 Loki: Add support for range aggregations with by grouping (#56184) (#56369)
* Loki: Fix unwrapped range operations with grouping

* Update, fix tests

* Fix modeller

(cherry picked from commit 4469572b27)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-10-05 08:54:03 -04:00
Tania
4d3408f4f0 Remove branding feature toggle (#56389) 2022-10-05 14:28:12 +02:00
Grot (@grafanabot)
90168e6c80 ReleaseNotes: Updated changelog and release notes for 9.1.7 (#56323) (#56325)
(cherry picked from commit 169f1ab974)
2022-10-05 11:28:22 +03:00
Grot (@grafanabot)
83fb311b3c Fixes alertmanagers whats new entry (#56356) (#56357)
(cherry picked from commit b1b3f9e24c)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-05 08:47:18 +01:00
Grot (@grafanabot)
2b7ec364ad Canvas: Increase Add Item picker width (#56204) (#56341)
(cherry picked from commit 8833e35b43)

Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
2022-10-04 15:52:48 -04:00
Grot (@grafanabot)
b70f14d971 Canvas: Promote to beta (#56217) (#56342)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit 2c1c98f3b6)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-10-04 15:44:31 -04:00
Grot (@grafanabot)
7cb8143633 Search: Fix tags query (#55851) (#55861)
* Search: fix tags query

* Search: fix type

(cherry picked from commit 814211282a)

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-10-04 13:53:00 -04:00
Grot (@grafanabot)
536eeaf9ca ReleaseNotes: Updated changelog and release notes for 9.1.7 (#56313) (#56320)
(cherry picked from commit a50017da1d)
2022-10-04 19:17:22 +03:00
Giordano Ricci
a425170bff Backport 56310 to v9.2.x (#56311)
* Revert "Explore: Prevent panes from disappearing when resizing window in split view (#55696)"

This reverts commit 0a5aa19ca2.

* Revert "Explore: Add resize to split view, with Min/Max button (#54420)"

This reverts commit c3e4f1f876.
2022-10-04 16:08:49 +01:00
Grot (@grafanabot)
8741f7dedb Replace filename with path without the local dir (#56296) (#56309)
(cherry picked from commit d94af21cac)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-10-04 10:34:51 -04:00
Grot (@grafanabot)
19427f9797 adds 4 links to blogs (#56193) (#56302)
(cherry picked from commit d0b437741e)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-10-04 09:08:40 -05:00
Grot (@grafanabot)
a851432bfb adds alertmanager to whats new (#56304) (#56306)
(cherry picked from commit 8176810b2b)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-04 10:06:46 -04:00
Grot (@grafanabot)
536d0d4277 Remove Custom Branding previews from What's new (#56273) (#56294)
We need to remove the custom branding announcement from the 9.2 release, since we will not release the feature in Grafana Enterprise.

(cherry picked from commit 3d58f39b25)

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
2022-10-04 14:43:56 +01:00
Grot (@grafanabot)
64867b09cf elasticsearch: improved types in the typescript files (#56293) (#56299)
(cherry picked from commit 291276e767)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-10-04 09:20:54 -04:00
Grot (@grafanabot)
d0e42cdbc8 Update github.com/labstack/echo/v4 (#56226) (#56289)
(cherry picked from commit 91b4ce08a9)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-10-04 14:06:44 +02:00
Grot (@grafanabot)
88d4cc9334 Add cronjob option at switch case (#56272) (#56274)
(cherry picked from commit 26d64a778e)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-10-04 06:29:38 -04:00
Grot (@grafanabot)
a8facce55e AzureMonitor: Ensure resourceURI template variable is migrated (#56095) (#56250)
* Ensure resourceURI template vars are migrated

- Do not filter queries containing a resource URI template
- Update migration
- Add test

* Update condition

* Review

(cherry picked from commit 462ca50512)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2022-10-04 04:59:47 -04:00
Grot (@grafanabot)
50c6c5e550 XYChart: Beta release (#55973) (#56237)
* Bump state from alpha to beta

* Sync manual pointsize max with auto one

* Add xyChart to list

(cherry picked from commit 7b93d85a85)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-04 03:59:18 -04:00
Dimitris Sotirakis
04c5b2b9cc Add edition as environment var (#56069) (#56238)
(cherry picked from commit 8eea6f7f4f)
2022-10-04 03:58:16 -04:00
Grot (@grafanabot)
f7d85ba844 Fix update-changelog.yml version input (#56224) (#56229)
(cherry picked from commit f7c6fe0c97)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-10-04 10:35:08 +03:00
Grot (@grafanabot)
6e680cac8f Heatmap: fix color scheme reversal (#56227) (#56234)
(cherry picked from commit eeb31c2901)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-04 03:31:46 -04:00
Grot (@grafanabot)
6c38c502a9 Take standard options min/max into account (#55972) (#56222)
(cherry picked from commit 6913623461)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-04 02:31:25 -04:00
Grot (@grafanabot)
a16104d123 init sbom action (#56177) (#56198)
(cherry picked from commit ad48cee2bb)

Co-authored-by: Ethan <smithe2413@gmail.com>
2022-10-03 12:05:22 -04:00
Grot (@grafanabot)
483d30730f adds note about org_role being case sensitive (#56043) (#56180)
(cherry picked from commit c5b68ed497)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-10-03 09:13:12 -05:00
Grot (@grafanabot)
14d98f02da Alerting: Allow created by to be manually set when there's no creator for silences (#55952) (#56161)
* Alerting: Allow created by to be manually set when there's no creator

Grafana has a mode that allows unauthenticated interaction, typically the created by field of a silence is inferred from the current logged user. When this is not present, the field is left black and thus the silence creation fails.

This allows us to set the created by when we is not possible to infer it from the current user.

* Show created by input field only if user is not logged

* Add test for new logic with createdBy input field

Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
(cherry picked from commit 501e921b2b)

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2022-10-03 16:04:16 +02:00
Grot (@grafanabot)
7a76da4e15 CI: Add packages-bucket flag to publish packages command (#56170) (#56176)
* Add public bucket string

* Fix lint

(cherry picked from commit d32c67b52a)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-10-03 08:47:39 -04:00
Grot (@grafanabot)
5c5590ec5f Docs: Update postgresql and mssql docs (#56011) (#56174)
* Update mssql docs first draft

* Update postgresql docs first draft

* update image tag

* add missing >

* Update docs/sources/datasources/mssql.md

* Update docs/sources/datasources/mssql.md

* Update docs/sources/datasources/postgres.md

* Update docs/sources/datasources/postgres.md

* Update docs/sources/datasources/postgres.md

* Reflect updated image names

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
(cherry picked from commit 3342e529b4)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2022-10-03 14:17:08 +02:00
Grot (@grafanabot)
8560b492c5 Docs: update mysql docs to reflect editor changes (#54568) (#56173)
* Docs: update mysql docs to reflect visual query builder/code editor changes

* Apply suggestions from code review

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Add missing >

* Reflect updated image name

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
(cherry picked from commit 885e8efec6)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2022-10-03 14:16:32 +02:00
Grot (@grafanabot)
29bb039c94 CI: Move grafanacom command to OSS (#55853) (#56168)
* Move publish-packages command over from

* Fix lint

* Move grafanacom command to OSS

* Add GetLatestMainBuild to gsutil

* Fix lint

* More lint fixes

* Add tests for grafanacom

* Fix lint

(cherry picked from commit 947838cca0)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-10-03 14:30:11 +03:00
Grot (@grafanabot)
fcf605e07f Grafana UI: Prevent built storybook being bundled with package (#56158) (#56164)
(cherry picked from commit d1b21a5981)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-10-03 12:32:41 +02:00
Grot (@grafanabot)
f2f49abe03 Canvas: Add text element (#56137) (#56139)
Co-authored-by: Drew Slobodnjak <drew08t@users.noreply.github.com>
(cherry picked from commit fc62f7ae23)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-09-30 20:35:16 -04:00
Grot (@grafanabot)
c0943153be Docs: Add link to TimescaleDB docs (#56134) (#56136)
* Added a link for more information

Added a link to TimescaleDB so that users can get additional information if need be.

* fixed formatting

* fixed the table

* made it prettier

* make it pretty for CI

Co-authored-by: Rajakavitha Kodhandapani <krajakavitha@gmail.com>
(cherry picked from commit ef1aa8ceb8)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-09-30 15:48:52 -07:00
Grot (@grafanabot)
403a834bfa Canvas: Rename textbox to rectangle (#55633) (#56127)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
(cherry picked from commit 82d7f80a15)

Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
2022-09-30 14:05:38 -04:00
Grot (@grafanabot)
33e5cde266 Canvas: Add canvas editor options to inline editor (#55970) (#56124)
Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
(cherry picked from commit 2eb24bbc4e)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-09-30 13:34:38 -04:00
Grot (@grafanabot)
211e9896bc @grafana/ui: Render PageToolbar Go Back icon for smaller window size (#55671) (#56120)
(cherry picked from commit 9958f938e0)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-09-30 11:47:55 -04:00
Grot (@grafanabot)
fa99d31acf Core: Implement aria attributes for query rows, improve a11y (#55563) (#56081)
* feat: add aria-expanded prop

* refactor: remove console.log()

* feat: add aria-controls

* refactor: add id to expendable section

* refactor: create unique id

(cherry picked from commit fc6afc6b84)

Co-authored-by: Laura Benz <48948963+L-M-K-B@users.noreply.github.com>
2022-09-30 16:43:39 +02:00
Grot (@grafanabot)
4decec3c8e [v9.2.x] Docs: Added icon type improvements to plugin migration guide (#56083)
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2022-09-30 13:28:30 +02:00
Grot (@grafanabot)
aae3a73381 fix wrong context height (#56024) (#56046)
(cherry picked from commit 3afa3f5e21)

Co-authored-by: Sven Grossmann <Svennergr@gmail.com>
2022-09-29 12:23:00 -04:00
Grot (@grafanabot)
27e76f5c7a docs: fix typo in is_null expression explainer (#55988) (#56037)
(cherry picked from commit 46da77d1a0)

Co-authored-by: Mike McFarland <roketworks@users.noreply.github.com>
2022-09-29 10:23:41 -05:00
Grot (@grafanabot)
d10d842024 CI: Move publish-packages command over from grabpl (#55850) (#56007)
* Move publish-packages command over from

* Lint fixes

* Update test

(cherry picked from commit 9a68f8704f)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-09-29 17:57:55 +03:00
Christopher Moyer
8c306dfe53 Docs: manual backport (#55945)
* resolves merge conflict

* resolves conflicts
2022-09-29 07:38:14 -05:00
Grot (@grafanabot)
08d12df9f3 Loki/Prometheus: Fix adding of ad hoc filters when jumping from dashboard to explore (#55915) (#55992)
* Loki, Prometheus: Fix adding of ad hoc filters when jumping from dashbaord to explore

* Update

(cherry picked from commit 21a99fba7e)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-09-29 13:47:37 +02:00
Grot (@grafanabot)
29826e0eb8 Security: Fix CVE-2022-27664 (#55361) (#55937)
* Fix CVE-2022-27664

* update golang.org/x/sys in go.sum

(cherry picked from commit 4ffa0532f0)

Co-authored-by: emerson_gong <emerson_gong@hotmail.com>
2022-09-29 06:14:29 -04:00
Sven Grossmann
bde8a1b2e1 Logs: Show copy button independently from context (#55934) (#55993)
(cherry picked from commit 998a368c69)
2022-09-29 11:50:22 +02:00
Grot (@grafanabot)
020494f87a Toolkit: Put back publishConfig access public (#55983) (#55986)
(cherry picked from commit 5c5228da61)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-09-29 04:44:40 -04:00
Jack Westbrook
50a59305b5 Toolkit: Fix script failures due to missing import paths (#55857) (#55981)
* fix(toolkit): package without dist folder so config file paths are correct

* chore(packages): make sure to bundle readme, changelog and apache2 license

* refactor(packages): recursively copy src when prepacking toolkit

* chore(toolkit): lock down babel dependencies. use grafana-eslint-config@5 for TS4.8 support

(cherry picked from commit b81f90cd0c)
2022-09-29 10:25:44 +02:00
Grot (@grafanabot)
32da26ec52 Alerting: fix alert supported warning when editing data source name (#55886) (#55943)
(cherry picked from commit ef641ea9c9)

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
2022-09-29 10:24:50 +02:00
Grot (@grafanabot)
db9b11c650 Geomap: Fix tooltip display option (#55956) (#55965)
(cherry picked from commit b0cd511ecc)

Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
2022-09-28 17:55:23 -07:00
Grot (@grafanabot)
9b0d2034dc Canvas: Fix inline edit toggle crash (#55961) (#55967)
(cherry picked from commit 5a9dfd7173)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-09-28 18:44:40 -04:00
Grot (@grafanabot)
4eb27f194e BarChart: add negY transform to fieldConfig overrides (#55930) (#55958)
(cherry picked from commit 16c9c858b8)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-09-28 16:52:59 -04:00
Grot (@grafanabot)
7429b3f894 Canvas: Fix resource picker folder UX (#55877) (#55879)
(cherry picked from commit d9d7bff793)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-09-28 15:44:33 -04:00
Grot (@grafanabot)
6dce936b65 PublicDashboards: Allow disabling an existent public dashboard if it has template variables (#55778) (#55953)
(cherry picked from commit b370a8e366)

Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
2022-09-28 14:50:42 -04:00
Grot (@grafanabot)
9fd622e549 Tempo: Fix unexpected trimming of leading zeroes in traceID (#55167) (#55929)
* tempo: fix unexpected trim traceID leading zero (#55166)

* fix lint

(cherry picked from commit c6dffb11a4)

Co-authored-by: Jimmie Han <hanjinming@outlook.com>
2022-09-28 17:34:12 +02:00
Grot (@grafanabot)
e4e421a8e6 Docs: Document Reporting API (#55434) (#55942)
* Docs: Document reporting api

* Update docs/sources/developers/http_api/reporting.md

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update docs/sources/developers/http_api/reporting.md

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update docs/sources/developers/http_api/reporting.md

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Document the rest of endpoints

* Document more endpoints

* Fix scopes and links

* Remove rendering endpoints

* Fix status codes

* Apply review feedback

* Typo

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
(cherry picked from commit 71578d0932)

Co-authored-by: Tania <yalyna.ts@gmail.com>
2022-09-28 17:09:55 +02:00
Grot (@grafanabot)
6f32c12628 Tracing: Fix bug where errors are not reported to OTel (#55925) (#55931)
(cherry picked from commit 6aef353b59)

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-09-28 10:07:16 -04:00
Grot (@grafanabot)
1c19fa164a Make LocalStorageProvider react to storage events (#55810) (#55817)
(cherry picked from commit 53a39e5037)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2022-09-28 09:02:00 -04:00
Grot (@grafanabot)
c4f955de84 TimeSeries: clamp log-y-axis min to 1 when decimals=0 (#55882) (#55918)
(cherry picked from commit 4ff7917039)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-09-28 07:53:24 -04:00
Grot (@grafanabot)
48a49eaa9a fix index file for website (#55907) (#55913)
(cherry picked from commit 43dc92d12c)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-09-28 12:18:24 +01:00
Grot (@grafanabot)
ce6aaa1a37 AzureMonitor: Correctly update subscriptions value in ARG editor (#55860) (#55911)
* Correctly update subscriptions prop in query

* Simplify setting of subscriptions value

(cherry picked from commit 37aa45001f)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2022-09-28 07:12:16 -04:00
Grot (@grafanabot)
d5d2654dc5 Remove prepare-release.yml (#55893) (#55895)
(cherry picked from commit 46037cff56)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-09-28 05:05:49 -04:00
Grot (@grafanabot)
3a864b7b27 Documentation: clarify label matching (#55650) (#55890)
* Documentation: clarify label matching

Behaviour in case of multiple matchers is not documented, but my experiments show they are reduced using logical AND. Please validate the updated description.

* Accept wording suggestion

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Accept suggestion for docs/sources/alerting/fundamentals/annotation-label/labels-and-label-matchers.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Improve wording according to review suggestions

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
(cherry picked from commit efef672d19)

Co-authored-by: Vladimir <greatvovan@gmail.com>
2022-09-28 09:19:08 +01:00
Grot (@grafanabot)
fed02859fd Thresholds: Add option for dashed line style (#55875) (#55885)
(cherry picked from commit bd50fd1606)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-09-28 03:03:57 -04:00
Grot (@grafanabot)
731d506c72 TimeSeries: fix log-y-axis tick label skipping when decimals=0 (#55868) (#55874)
(cherry picked from commit b8da1ffdc3)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-09-27 16:49:40 -05:00
Grot (@grafanabot)
d86fc082fb Links: Fix opening links from different orgs on the same tab (#55837) (#55869)
* Skip intercepting links of different orgs

* Check if orgId is present on query params

* Use locationSearchToObject instead of parseKeyValue

* Revert locationSearchToObject to parseKeyValue

(cherry picked from commit 2a12644778)

Co-authored-by: Guilherme Caulada <guilherme.caulada@grafana.com>
2022-09-27 17:46:49 -03:00
Garrett Guillotte
39c4ba5e67 Docs: Add screenshots to What's New in v9.2 (#55862) (#55865)
* Docs: Add What's New in Grafana v9.2 Beta

* Docs: Add links to What's New in Grafana v9.2

* Docs: Apply updates to What's New

(cherry picked from commit 1485209287)
2022-09-27 11:29:32 -07:00
Grot (@grafanabot)
77991d976f Docs: Add What's New in Grafana v9.2 Beta (#55855) (#55859)
(cherry picked from commit 3409979288)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-09-27 11:12:38 -07:00
Grot (@grafanabot)
d132d8a555 Canvas: Fix icon element resizing (#55854)
(cherry picked from commit e160f19247)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-09-27 12:08:23 -04:00
Grot (@grafanabot)
47f8bf1b11 Revert public dashboard granularity fix (#55844) (#55852)
(cherry picked from commit 6674407d3f)

Co-authored-by: Guilherme Caulada <guilherme.caulada@grafana.com>
2022-09-27 12:57:37 -03:00
Grot (@grafanabot)
4a653c7d31 XYChart further improvements (#55152) (#55846)
* Tooltip shows all data facets. Renamed options

* Add per series line style

* Remove line style option from manual panel options

* Refactored tooltip view

* sets selected after switch to manual

* remove facet prefixes

* in manual mode pull series names from config options, not y facet

* unused import

* Point size

* x & y axes labels

* Fix manual series prep

* betterer

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
(cherry picked from commit 3361f2c62d)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-09-27 11:33:04 -04:00
Grot (@grafanabot)
5242194721 Replace armhf with armhfp for RPMs (#55814) (#55828)
(cherry picked from commit 2a3f423e10)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-09-27 10:07:41 -04:00
Grot (@grafanabot)
db52b3b03b Explore: Prevent panes from disappearing when resizing window in split view (#55696) (#55827)
(cherry picked from commit 0a5aa19ca2)

Co-authored-by: Kristina <kristina.durivage@grafana.com>
2022-09-27 10:01:00 -04:00
Grot (@grafanabot)
6af96f9cd1 ReleaseNotes: Updated changelog for 9.2.0-beta1 (#55788) (#55808)
* ReleaseNotes: Updated changelog and release notes for 9.2.0-beta1

* Remove release notes

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
(cherry picked from commit da7797014a)
2022-09-27 13:25:23 +02:00
Grot (@grafanabot)
3931787027 "Release: Updated versions in package to 9.2.0-beta.1" (#55787) 2022-09-27 13:14:06 +02:00
Grot (@grafanabot)
5f50e98d12 Alerting: Fix a typo in alerting rule annotation docs (#55730) (#55799)
(cherry picked from commit 85c26ea908)

Co-authored-by: Martin Lehmann <martin@lehmann.tech>
2022-09-27 06:02:12 -04:00
Grot (@grafanabot)
9ab3fa611f Fix: use type=button in editor (#55731) (#55792)
(cherry picked from commit 4cd4bc84b5)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-09-27 09:51:09 +01:00
Grot (@grafanabot)
cddf4eea49 Docs: first draft of share panel with support docs (#55170) (#55777)
(cherry picked from commit 2bbc7c40e9)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-09-26 15:59:02 -05:00
Grot (@grafanabot)
d097fb2e28 AzureMonitor: Add region params (#55763) (#55766)
* Ensure region params are included

* Fix betterer results change

(cherry picked from commit 53c61b49bf)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2022-09-26 18:12:13 +01:00
Grot (@grafanabot)
ff550df32f Correlations: Only return correlation for which both source and target datasources exist (#55454) (#55744)
* Correlation: only return correlation for which both source and targe ds exist

* add test

(cherry picked from commit d07abdd23c)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-09-26 14:53:25 +01:00
6475 changed files with 186582 additions and 391063 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,10 @@
import { regexp } from '@betterer/regexp';
import { BettererFileTest } from '@betterer/betterer';
import { ESLint, Linter } from 'eslint';
import { existsSync } from 'fs';
import path from 'path';
import glob from 'glob';
export default {
'no enzyme tests': () => regexp(/from 'enzyme'/g).include('**/*.test.*'),
'better eslint': () => countEslintErrors().include('**/*.{ts,tsx}'),
'no undocumented stories': () => countUndocumentedStories().include('**/*.story.tsx'),
};
@@ -22,80 +22,51 @@ function countUndocumentedStories() {
});
}
async function findEslintConfigFiles(): Promise<string[]> {
return new Promise((resolve, reject) => {
glob('**/.eslintrc', (err, files) => {
if (err) {
reject(err);
}
resolve(files);
});
});
}
function countEslintErrors() {
return new BettererFileTest(async (filePaths, fileTestResult, resolver) => {
const { baseDirectory } = resolver;
const cli = new ESLint({ cwd: baseDirectory });
const eslintConfigFiles = await findEslintConfigFiles();
const eslintConfigMainPaths = eslintConfigFiles.map((file) => path.resolve(path.dirname(file)));
await Promise.all(
filePaths.map(async (filePath) => {
const linterOptions = (await cli.calculateConfigForFile(filePath)) as Linter.Config;
const baseRules: Partial<Linter.RulesRecord> = {
'@typescript-eslint/no-explicit-any': 'error',
'@grafana/no-aria-label-selectors': 'error',
};
const rules: Partial<Linter.RulesRecord> = {
'@typescript-eslint/no-explicit-any': 'error',
};
const nonTestFilesRules: Partial<Linter.RulesRecord> = {
...baseRules,
'@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'never' }],
};
const isTestFile =
filePath.endsWith('.test.tsx') || filePath.endsWith('.test.ts') || filePath.includes('__mocks__');
// group files by eslint config file
// this will create two file groups for each eslint config file
// one for test files and one for non-test files
const fileGroups: Record<string, string[]> = {};
if (!isTestFile) {
rules['@typescript-eslint/consistent-type-assertions'] = [
'error',
{
assertionStyle: 'never',
},
];
}
for (const filePath of filePaths) {
let configPath = eslintConfigMainPaths.find((configPath) => filePath.startsWith(configPath)) ?? '';
const isTestFile =
filePath.endsWith('.test.tsx') ||
filePath.endsWith('.test.ts') ||
filePath.includes('__mocks__') ||
filePath.includes('public/test/');
if (isTestFile) {
configPath += '-test';
}
if (!fileGroups[configPath]) {
fileGroups[configPath] = [];
}
fileGroups[configPath].push(filePath);
}
for (const configPath of Object.keys(fileGroups)) {
const rules = configPath.endsWith('-test') ? baseRules : nonTestFilesRules;
// this is by far the slowest part of this code. It takes eslint about 2 seconds just to find the config
const linterOptions = (await cli.calculateConfigForFile(fileGroups[configPath][0])) as Linter.Config;
const runner = new ESLint({
baseConfig: {
...linterOptions,
rules: rules,
},
useEslintrc: false,
cwd: baseDirectory,
});
const lintResults = await runner.lintFiles(fileGroups[configPath]);
lintResults
.filter((lintResult) => lintResult.source)
.forEach((lintResult) => {
const { messages } = lintResult;
const filePath = lintResult.filePath;
const file = fileTestResult.addFile(filePath, '');
messages.forEach((message, index) => {
file.addIssue(0, 0, message.message, `${index}`);
});
const runner = new ESLint({
baseConfig: {
...linterOptions,
rules,
},
useEslintrc: false,
cwd: baseDirectory,
});
}
const lintResults = await runner.lintFiles([filePath]);
lintResults
.filter((lintResult) => lintResult.source)
.forEach((lintResult) => {
const { messages } = lintResult;
const file = fileTestResult.addFile(filePath, '');
messages.forEach((message, index) => {
file.addIssue(0, 0, message.message, `${index}`);
});
});
})
);
});
}

View File

@@ -1,4 +1,4 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.8. DO NOT EDIT.
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.6. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOPATH ?= $(shell go env GOPATH)
@@ -21,41 +21,29 @@ BRA := $(GOBIN)/bra-v0.0.0-20200517080246-1e3013ecaff8
$(BRA): $(BINGO_DIR)/bra.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/bra-v0.0.0-20200517080246-1e3013ecaff8"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=bra.mod -o=$(GOBIN)/bra-v0.0.0-20200517080246-1e3013ecaff8 "github.com/unknwon/bra"
CUE := $(GOBIN)/cue-v0.5.0-beta.2
$(CUE): $(BINGO_DIR)/cue.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/cue-v0.5.0-beta.2"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=cue.mod -o=$(GOBIN)/cue-v0.5.0-beta.2 "cuelang.org/go/cmd/cue"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=bra.mod -o=$(GOBIN)/bra-v0.0.0-20200517080246-1e3013ecaff8 "github.com/unknwon/bra"
DRONE := $(GOBIN)/drone-v1.5.0
$(DRONE): $(BINGO_DIR)/drone.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/drone-v1.5.0"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=drone.mod -o=$(GOBIN)/drone-v1.5.0 "github.com/drone/drone-cli/drone"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=drone.mod -o=$(GOBIN)/drone-v1.5.0 "github.com/drone/drone-cli/drone"
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.51.2
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.49.0
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/golangci-lint-v1.51.2"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.51.2 "github.com/golangci/golangci-lint/cmd/golangci-lint"
JB := $(GOBIN)/jb-v0.5.1
$(JB): $(BINGO_DIR)/jb.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/jb-v0.5.1"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=jb.mod -o=$(GOBIN)/jb-v0.5.1 "github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb"
@echo "(re)installing $(GOBIN)/golangci-lint-v1.49.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.49.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
SWAGGER := $(GOBIN)/swagger-v0.30.2
$(SWAGGER): $(BINGO_DIR)/swagger.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/swagger-v0.30.2"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-v0.30.2 "github.com/go-swagger/go-swagger/cmd/swagger"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-v0.30.2 "github.com/go-swagger/go-swagger/cmd/swagger"
WIRE := $(GOBIN)/wire-v0.5.0
$(WIRE): $(BINGO_DIR)/wire.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/wire-v0.5.0"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=wire.mod -o=$(GOBIN)/wire-v0.5.0 "github.com/google/wire/cmd/wire"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=wire.mod -o=$(GOBIN)/wire-v0.5.0 "github.com/google/wire/cmd/wire"

View File

@@ -2,6 +2,6 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
replace golang.org/x/sys => golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c
require github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8
replace golang.org/x/sys => golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c

View File

@@ -1,5 +0,0 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.19
require cuelang.org/go v0.5.0-beta.2 // cmd/cue

View File

@@ -1,30 +0,0 @@
cuelang.org/go v0.4.3 h1:W3oBBjDTm7+IZfCKZAmC8uDG0eYfJL4Pp/xbbCMKaVo=
cuelang.org/go v0.4.3/go.mod h1:7805vR9H+VoBNdWFdI7jyDR3QLUPp4+naHfbcgp55HI=
cuelang.org/go v0.5.0-beta.2 h1:am5M7jGvNTJ0rnjrFNyvE7fucL/wRqb0emK4XxdThQI=
cuelang.org/go v0.5.0-beta.2/go.mod h1:okjJBHFQFer+a41sAe2SaGm1glWS8oEb6CmJvn5Zdws=
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
github.com/cockroachdb/apd/v2 v2.0.1 h1:y1Rh3tEU89D+7Tgbw+lp52T6p/GJLpDmNvr10UWqLTE=
github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E=
github.com/emicklei/proto v1.6.15 h1:XbpwxmuOPrdES97FrSfpyy67SSCV/wBIKXqgJzh6hNw=
github.com/emicklei/proto v1.10.0 h1:pDGyFRVV5RvV+nkBK9iy3q67FBy9Xa7vwrOTE+g5aGw=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs=
github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0=
github.com/mpvl/unique v0.0.0-20150818121801-cbe035fff7de h1:D5x39vF5KCwKQaw+OC9ZPiLVHXz3UFw2+psEX+gYcto=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/protocolbuffers/txtpbfmt v0.0.0-20201118171849-f6a6b3f636fc h1:gSVONBi2HWMFXCa9jFdYvYk7IwW/mTLxWOF7rXS4LO0=
github.com/protocolbuffers/txtpbfmt v0.0.0-20220428173112-74888fd59c2b h1:zd/2RNzIRkoGGMjE+YIsZ85CnDIz672JK2F3Zl4vux4=
github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449 h1:xUIPaMhvROX9dhPvRCenIJtU78+lbEenGbgqB5hfHCQ=
golang.org/x/mod v0.6.0-dev.0.20220818022119-ed83ed61efb9 h1:VtCrPQXM5Wo9l7XN64SjBMczl48j8mkP+2e3OhYlz+0=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY=
golang.org/x/tools v0.0.0-20200612220849-54c614fe050c h1:g6oFfz6Cmw68izP3xsdud3Oxu145IPkeFzyRg58AKHM=
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

View File

@@ -2,4 +2,173 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.19
require github.com/golangci/golangci-lint v1.51.2 // cmd/golangci-lint
require github.com/golangci/golangci-lint v1.49.0 // cmd/golangci-lint
require (
4d63.com/gochecknoglobals v0.1.0 // indirect
github.com/Antonboom/errname v0.1.7 // indirect
github.com/Antonboom/nilnil v0.1.1 // indirect
github.com/BurntSushi/toml v1.2.0 // indirect
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/OpenPeeDeeP/depguard v1.1.0 // indirect
github.com/alexkohler/prealloc v1.0.0 // indirect
github.com/alingse/asasalint v0.0.11 // indirect
github.com/ashanbrown/forbidigo v1.3.0 // indirect
github.com/ashanbrown/makezero v1.1.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bkielbasa/cyclop v1.2.0 // indirect
github.com/blizzy78/varnamelen v0.8.0 // indirect
github.com/bombsimon/wsl/v3 v3.3.0 // indirect
github.com/breml/bidichk v0.2.3 // indirect
github.com/breml/errchkjson v0.3.0 // indirect
github.com/butuzov/ireturn v0.1.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/charithe/durationcheck v0.0.9 // indirect
github.com/chavacava/garif v0.0.0-20220630083739-93517212f375 // indirect
github.com/curioswitch/go-reassign v0.1.2 // indirect
github.com/daixiang0/gci v0.6.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/denis-tingaikin/go-header v0.4.3 // indirect
github.com/esimonov/ifshort v1.0.4 // indirect
github.com/ettle/strcase v0.1.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fatih/structtag v1.2.0 // indirect
github.com/firefart/nonamedreturns v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/fzipp/gocyclo v0.6.0 // indirect
github.com/go-critic/go-critic v0.6.4 // indirect
github.com/go-toolsmith/astcast v1.0.0 // indirect
github.com/go-toolsmith/astcopy v1.0.1 // indirect
github.com/go-toolsmith/astequal v1.0.2 // indirect
github.com/go-toolsmith/astfmt v1.0.0 // indirect
github.com/go-toolsmith/astp v1.0.0 // indirect
github.com/go-toolsmith/strparse v1.0.0 // indirect
github.com/go-toolsmith/typep v1.0.2 // indirect
github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect
github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect
github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a // indirect
github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect
github.com/golangci/misspell v0.3.5 // indirect
github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
github.com/gostaticanalysis/comment v1.4.2 // indirect
github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect
github.com/gostaticanalysis/nilerr v0.1.1 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jgautheron/goconst v1.5.1 // indirect
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect
github.com/julz/importas v0.1.0 // indirect
github.com/kisielk/errcheck v1.6.2 // indirect
github.com/kisielk/gotool v1.0.0 // indirect
github.com/kulti/thelper v0.6.3 // indirect
github.com/kunwardeep/paralleltest v1.0.6 // indirect
github.com/kyoh86/exportloopref v0.1.8 // indirect
github.com/ldez/gomoddirectives v0.2.3 // indirect
github.com/ldez/tagliatelle v0.3.1 // indirect
github.com/leonklingele/grouper v1.1.0 // indirect
github.com/lufeee/execinquery v1.2.1 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/maratori/testpackage v1.1.0 // indirect
github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mbilski/exhaustivestruct v1.2.0 // indirect
github.com/mgechev/revive v1.2.3 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moricho/tparallel v0.2.1 // indirect
github.com/nakabonne/nestif v0.3.1 // indirect
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect
github.com/nishanths/exhaustive v0.8.1 // indirect
github.com/nishanths/predeclared v0.2.2 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/polyfloyd/go-errorlint v1.0.2 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/quasilyte/go-ruleguard v0.3.17 // indirect
github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5 // indirect
github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
github.com/ryancurrah/gomodguard v1.2.4 // indirect
github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect
github.com/sanposhiho/wastedassign/v2 v2.0.6 // indirect
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
github.com/sashamelentyev/usestdlibvars v1.13.0 // indirect
github.com/securego/gosec/v2 v2.13.1 // indirect
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/sivchari/containedctx v1.0.2 // indirect
github.com/sivchari/nosnakecase v1.7.0 // indirect
github.com/sivchari/tenv v1.7.0 // indirect
github.com/sonatard/noctx v0.0.1 // indirect
github.com/sourcegraph/go-diff v0.6.1 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cobra v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.12.0 // indirect
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect
github.com/stretchr/objx v0.4.0 // indirect
github.com/stretchr/testify v1.8.0 // indirect
github.com/subosito/gotenv v1.4.0 // indirect
github.com/sylvia7788/contextcheck v1.0.6 // indirect
github.com/tdakkota/asciicheck v0.1.1 // indirect
github.com/tetafro/godot v1.4.11 // indirect
github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144 // indirect
github.com/timonwong/logrlint v0.1.0 // indirect
github.com/tomarrell/wrapcheck/v2 v2.6.2 // indirect
github.com/tommy-muehle/go-mnd/v2 v2.5.0 // indirect
github.com/ultraware/funlen v0.0.3 // indirect
github.com/ultraware/whitespace v0.0.5 // indirect
github.com/uudashr/gocognit v1.0.6 // indirect
github.com/yagipy/maintidx v1.0.0 // indirect
github.com/yeya24/promlinter v0.2.0 // indirect
gitlab.com/bosi/decorder v0.2.3 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.17.0 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.12 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/ini.v1 v1.66.6 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
honnef.co/go/tools v0.3.3 // indirect
mvdan.cc/gofumpt v0.3.1 // indirect
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
mvdan.cc/unparam v0.0.0-20220706161116-678bad134442 // indirect
)

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +0,0 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.18
require github.com/jsonnet-bundler/jsonnet-bundler v0.5.1 // cmd/jb

View File

@@ -1,50 +0,0 @@
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc=
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
github.com/jsonnet-bundler/jsonnet-bundler v0.5.1 h1:eUd6EA1Qzz73Q4NLNLOrNkMb96+6NTTERbX9lqaxVwk=
github.com/jsonnet-bundler/jsonnet-bundler v0.5.1/go.mod h1:Qrdw/7mOFS2SKCOALKFfEH8gdvXJi8XZjw9g5ilpf4I=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU=
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View File

@@ -1,4 +1,4 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.8. DO NOT EDIT.
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.6. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
# Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk.
GOBIN=${GOBIN:=$(go env GOBIN)}
@@ -10,13 +10,9 @@ fi
BRA="${GOBIN}/bra-v0.0.0-20200517080246-1e3013ecaff8"
CUE="${GOBIN}/cue-v0.5.0-beta.2"
DRONE="${GOBIN}/drone-v1.5.0"
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.51.2"
JB="${GOBIN}/jb-v0.5.1"
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.49.0"
SWAGGER="${GOBIN}/swagger-v0.30.2"

View File

@@ -1,9 +1,9 @@
[run]
init_cmds = [
["make", "gen-go"],
["make", "gen-jsonnet"],
["GO_BUILD_DEV=1", "make", "build-go"],
["./bin/grafana", "server", "-packaging=dev", "cfg:app_mode=development"]
["GO_BUILD_DEV=1", "make", "build-cli"],
["GO_BUILD_DEV=1", "make", "build-server"],
["./bin/grafana-server", "-packaging=dev", "cfg:app_mode=development"]
]
watch_all = true
follow_symlinks = true
@@ -11,14 +11,12 @@ watch_dirs = [
"$WORKDIR/pkg",
"$WORKDIR/public/views",
"$WORKDIR/conf",
"$WORKDIR/devenv/dev-dashboards",
]
watch_exts = [".go", ".ini", ".toml", ".template.html"]
ignore_files = [".*_gen.go"]
build_delay = 1500
cmds = [
["make", "gen-go"],
["make", "gen-jsonnet"],
["GO_BUILD_DEV=1", "make", "build-go"],
["./bin/grafana", "server", "-packaging=dev", "cfg:app_mode=development"]
["GO_BUILD_DEV=1", "make", "build-server"],
["./bin/grafana-server", "-packaging=dev", "cfg:app_mode=development"]
]

View File

@@ -2,6 +2,7 @@
.dockerignore
.git
.gitignore
.github
.vscode
bin
data*

View File

@@ -3,57 +3,20 @@
# 2. Login to drone and export the env variables (token and server) shown here: https://drone.grafana.net/account
# 3. Run `make drone`
# More information about this process here: https://github.com/grafana/deployment_tools/blob/master/docs/infrastructure/drone/signing.md
"""
This module returns a Drone configuration including pipelines and secrets.
"""
load("scripts/drone/events/pr.star", "pr_pipelines")
load("scripts/drone/events/main.star", "main_pipelines")
load(
"scripts/drone/events/release.star",
"integration_test_pipelines",
"publish_artifacts_pipelines",
"publish_npm_pipelines",
"publish_packages_pipeline",
)
load(
"scripts/drone/rgm.star",
"rgm",
)
load(
"scripts/drone/pipelines/publish_images.star",
"publish_image_pipelines_public",
)
load(
"scripts/drone/pipelines/ci_images.star",
"publish_ci_build_container_image_pipeline",
"publish_ci_windows_test_image_pipeline",
)
load(
"scripts/drone/pipelines/windows.star",
"windows_test_backend",
)
load("scripts/drone/version.star", "version_branch_pipelines")
load("scripts/drone/events/cron.star", "cronjobs")
load("scripts/drone/vault.star", "secrets")
load('scripts/drone/events/pr.star', 'pr_pipelines')
load('scripts/drone/events/main.star', 'main_pipelines')
load('scripts/drone/pipelines/docs.star', 'docs_pipelines')
load('scripts/drone/events/release.star', 'release_pipelines', 'publish_artifacts_pipelines', 'publish_npm_pipelines', 'publish_packages_pipeline', 'artifacts_page_pipeline')
load('scripts/drone/pipelines/publish_images.star', 'publish_image_pipelines_public', 'publish_image_pipelines_security')
load('scripts/drone/version.star', 'version_branch_pipelines')
load('scripts/drone/events/cron.star', 'cronjobs')
load('scripts/drone/vault.star', 'secrets')
def main(_ctx):
return (
pr_pipelines() +
main_pipelines() +
publish_image_pipelines_public() +
publish_artifacts_pipelines("public") +
publish_npm_pipelines() +
publish_packages_pipeline() +
rgm() +
[windows_test_backend({
"event": ["promote"],
"target": ["test-windows"],
}, "oss", "testing")] +
version_branch_pipelines() +
integration_test_pipelines() +
publish_ci_windows_test_image_pipeline() +
publish_ci_build_container_image_pipeline() +
cronjobs() +
secrets()
)
def main(ctx):
edition = 'oss'
return pr_pipelines(edition=edition) + main_pipelines(edition=edition) + release_pipelines() + \
publish_image_pipelines_public() + publish_image_pipelines_security() + \
publish_artifacts_pipelines('security') + publish_artifacts_pipelines('public') + \
publish_npm_pipelines('public') + publish_packages_pipeline() + artifacts_page_pipeline() + \
version_branch_pipelines() + cronjobs(edition=edition) + secrets()

5048
.drone.yml

File diff suppressed because it is too large Load Diff

103
.eslintrc
View File

@@ -1,15 +1,13 @@
{
"extends": ["@grafana/eslint-config"],
"root": true,
"plugins": ["@emotion", "lodash", "jest", "import", "jsx-a11y", "@grafana"],
"plugins": ["@emotion", "lodash", "jest", "import", "jsx-a11y"],
"settings": {
"import/internal-regex": "^(app/)|(@grafana)",
"import/external-module-folders": ["node_modules", ".yarn"]
},
"rules": {
"react/prop-types": "off",
// need to ignore emotion's `css` prop, see https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md#rule-options
"react/no-unknown-property": ["error", { "ignore": ["css"] }],
"@emotion/jsx-import": "error",
"lodash/import-scope": [2, "member"],
"jest/no-focused-tests": "error",
@@ -22,18 +20,13 @@
}
],
"no-restricted-imports": [
"error",
"warn",
{
"paths": [
{
"name": "react-redux",
"importNames": ["useDispatch", "useSelector"],
"message": "Please import from app/types instead."
},
{
"name": "react-i18next",
"importNames": ["Trans", "t"],
"message": "Please import from app/core/internationalization instead"
}
]
}
@@ -41,15 +34,68 @@
// Use typescript's no-redeclare for compatibility with overrides
"no-redeclare": "off",
"@typescript-eslint/no-redeclare": ["error"]
"@typescript-eslint/no-redeclare": ["error"],
// these are all the rules listed in the strict preset
// we should fix them one by one and mark them as errors
// once they're all fixed, we can remove them all and instead extend the strict preset
// with "extends": ["plugin:jsx-a11y/strict"]
"jsx-a11y/alt-text": "off",
"jsx-a11y/anchor-has-content": "error",
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/aria-activedescendant-has-tabindex": "error",
"jsx-a11y/aria-props": "error",
"jsx-a11y/aria-proptypes": "error",
"jsx-a11y/aria-role": "off",
"jsx-a11y/aria-unsupported-elements": "error",
"jsx-a11y/autocomplete-valid": "error",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/heading-has-content": "error",
"jsx-a11y/html-has-lang": "error",
"jsx-a11y/iframe-has-title": "off",
"jsx-a11y/img-redundant-alt": "off",
"jsx-a11y/interactive-supports-focus": [
"off",
{
"tabbable": [
"button",
"checkbox",
"link",
"progressbar",
"searchbox",
"slider",
"spinbutton",
"switch",
"textbox"
]
}
],
"jsx-a11y/label-has-associated-control": "off",
"jsx-a11y/media-has-caption": "error",
"jsx-a11y/mouse-events-have-key-events": "off",
"jsx-a11y/no-access-key": "error",
"jsx-a11y/no-autofocus": "off",
"jsx-a11y/no-distracting-elements": "error",
"jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
"jsx-a11y/no-noninteractive-element-interactions": [
"off",
{
"body": ["onError", "onLoad"],
"iframe": ["onError", "onLoad"],
"img": ["onError", "onLoad"]
}
],
"jsx-a11y/no-noninteractive-element-to-interactive-role": "off",
"jsx-a11y/no-noninteractive-tabindex": "off",
"jsx-a11y/no-redundant-roles": "error",
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/role-has-required-aria-props": "off",
"jsx-a11y/role-supports-aria-props": "off",
"jsx-a11y/scope": "error",
"jsx-a11y/tabindex-no-positive": "off"
},
"overrides": [
{
"files": ["public/app/features/scenes/**/*.{ts,tsx}"],
"rules": {
"@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "explicit" }]
}
},
{
"files": ["packages/grafana-ui/src/components/uPlot/**/*.{ts,tsx}"],
"rules": {
@@ -71,31 +117,6 @@
"no-redeclare": "error",
"@typescript-eslint/no-redeclare": "off"
}
},
{
"extends": ["plugin:jsx-a11y/recommended"],
"files": ["**/*"],
"excludedFiles": ["**/*.{spec,test}.{ts,tsx}"],
"rules": {
// rules marked "off" are those left in the recommended preset we need to fix
// we should remove the corresponding line and fix them one by one
// any marked "error" contain specific overrides we'll need to keep
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-autofocus": [
"error",
{
"ignoreNonDOM": true
}
],
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/label-has-associated-control": [
"error",
{
"controlComponents": ["NumberInput"],
"depth": 2
}
]
}
}
]
}

711
.github/CODEOWNERS vendored
View File

@@ -12,614 +12,205 @@
# This should make it easy to add new rules without breaking existing ones.
# Documentation
/docs/ @grafana/docs-grafana
/contribute/ @grafana/docs-grafana
/docs/sources/developers/plugins/ @grafana/docs-grafana @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
/docs/sources/developers/plugins/backend/ @grafana/docs-grafana @grafana/plugins-platform-backend
/.changelog-archive @grafana/docs-grafana
CHANGELOG.md @grafana/docs-grafana
CODE_OF_CONDUCT.md @grafana/docs-grafana
CONTRIBUTING.md @grafana/docs-grafana
GOVERNANCE.md @RichiH
HALL_OF_FAME.md @grafana/docs-grafana
ISSUE_TRIAGE.md @grafana/grafana-community-support
LICENSE @torkelo
LICENSING.md @torkelo
MAINTAINERS.md @RichiH
NOTICE.md @torkelo
README.md @grafana/docs-grafana
ROADMAP.md @torkelo
SECURITY.md @grafana/security-team
SUPPORT.md @torkelo
UPGRADING_DEPENDENCIES.md @grafana/docs-grafana
WORKFLOW.md @torkelo
# Technical documentation
/docs/ @Eve832 @jdbaldry
/docs/sources/ @Eve832
/docs/sources/administration/ @Eve832 @GrafanaWriter
/docs/sources/alerting/ @brendamuir
/docs/sources/dashboards/ @imatwawana
/docs/sources/datasources/ @Eve832 @GrafanaWriter
/docs/sources/explore/ @Eve832 @GrafanaWriter
/docs/sources/fundamentals @chri2547
/docs/sources/getting-started/ @chri2547
/docs/sources/introduction/ @chri2547
/docs/sources/old-alerting/ @brendamuir
/docs/sources/panels-visualizations/ @imatwawana
/docs/sources/release-notes/ @Eve832 @GrafanaWriter
/docs/sources/setup-grafana/ @chri2547
/docs/sources/upgrade-guide/ @chri2547 @imatwawana
/docs/sources/whatsnew/ @chri2547 @imatwawana
/docs/sources/developers/plugins/ @Eve832 @josmperez @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
/docs/sources/developers/plugins/backend/ @Eve832 @grafana/plugins-platform-backend
/docs/ @grafana/docs-squad
/contribute/ @grafana/docs-squad
/docs/sources/developers/plugins/ @grafana/docs-squad @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
/docs/sources/developers/plugins/backend @grafana/docs-squad @grafana/plugins-platform-backend
# Administration, data sources, querying, release updates: Garrett Guillotte
# Set up, dashboards/visualization, best practices: Chris Moyer
# Alerting: Brenda Muir
/docs/sources/administration/ @gguillotte-grafana
/docs/sources/alerting @brendamuir
/docs/sources/best-practices/ @chri2547
/docs/sources/dashboards/ @chri2547
/docs/sources/datasources/ @gguillotte-grafana
/docs/sources/enterprise/ @gguillotte-grafana
/docs/sources/explore/ @gguillotte-grafana
/docs/sources/getting-started/ @chri2547
/docs/sources/old-alerting @brendamuir
/docs/sources/panels/ @chri2547
/docs/sources/release-notes/ @gguillotte-grafana
/docs/sources/visualization/ @chri2547
/docs/sources/whatsnew/ @gguillotte-grafana
# Backend code
/go.mod @grafana/backend-platform
/go.sum @grafana/backend-platform
/.bingo/ @grafana/backend-platform
/pkg/README.md @grafana/backend-platform
/pkg/ruleguard.rules.go @grafana/backend-platform
/.bra.toml @grafana/backend-platform
/.golangci.toml @grafana/backend-platform
/build.go @grafana/backend-platform
*.go @grafana/backend-platform
go.mod @grafana/backend-platform
go.sum @grafana/backend-platform
/.bingo @grafana/backend-platform
/pkg/api/ @grafana/backend-platform
/pkg/bus/ @grafana/backend-platform
/pkg/cmd/ @grafana/backend-platform
/pkg/components/apikeygen/ @grafana/grafana-authnz-team
/pkg/components/apikeygenprefixed/ @grafana/grafana-authnz-team
/pkg/components/dashdiffs/ @grafana/backend-platform
/pkg/components/imguploader/ @grafana/backend-platform
/pkg/components/loki/ @grafana/backend-platform
/pkg/components/null/ @grafana/backend-platform
/pkg/components/simplejson/ @grafana/backend-platform
/pkg/events/ @grafana/backend-platform
/pkg/extensions/ @grafana/backend-platform
/pkg/ifaces/ @grafana/backend-platform
/pkg/infra/appcontext/ @grafana/backend-platform
/pkg/infra/db/ @grafana/backend-platform
/pkg/infra/grn/ @grafana/backend-platform
/pkg/infra/localcache/ @grafana/backend-platform
/pkg/infra/log/ @grafana/backend-platform
/pkg/infra/metrics/ @grafana/backend-platform
/pkg/infra/network/ @grafana/backend-platform
/pkg/infra/process/ @grafana/backend-platform
/pkg/infra/remotecache/ @grafana/backend-platform
/pkg/infra/serverlock/ @grafana/backend-platform
/pkg/infra/slugify/ @grafana/backend-platform
/pkg/infra/tracing/ @grafana/backend-platform
/pkg/infra/usagestats/ @grafana/backend-platform
/pkg/middleware/ @grafana/backend-platform
/pkg/mocks/ @grafana/backend-platform
/pkg/models/ @grafana/backend-platform
/pkg/server/ @grafana/backend-platform
/pkg/services/annotations/ @grafana/backend-platform
/pkg/services/apikey/ @grafana/backend-platform
/pkg/services/cleanup/ @grafana/backend-platform
/pkg/services/comments/ @grafana/backend-platform
/pkg/services/contexthandler/ @grafana/backend-platform
/pkg/services/correlations/ @grafana/backend-platform
/pkg/services/dashboardimport/ @grafana/backend-platform
/pkg/services/dashboards/ @grafana/backend-platform
/pkg/services/dashboardsnapshots/ @grafana/backend-platform
/pkg/services/dashboardversion/ @grafana/backend-platform
/pkg/services/encryption/ @grafana/backend-platform
/pkg/services/featuremgmt/ @grafana/backend-platform
/pkg/services/folder/ @grafana/backend-platform
/pkg/services/hooks/ @grafana/backend-platform
/pkg/services/kmsproviders/ @grafana/backend-platform
/pkg/services/licensing/ @grafana/backend-platform
/pkg/services/navtree/ @grafana/backend-platform
/pkg/services/notifications/ @grafana/backend-platform
/pkg/services/org/ @grafana/backend-platform
/pkg/services/playlist/ @grafana/backend-platform
/pkg/services/plugindashboards/ @grafana/backend-platform
/pkg/services/pluginsettings/ @grafana/backend-platform
/pkg/services/preference/ @grafana/backend-platform
/pkg/services/provisioning/ @grafana/backend-platform
/pkg/services/publicdashboards/ @grafana/dashboards-squad
/pkg/services/query/ @grafana/backend-platform
/pkg/services/queryhistory/ @grafana/backend-platform
/pkg/services/quota/ @grafana/backend-platform
/pkg/services/rendering/ @grafana/backend-platform
/pkg/services/screenshot/ @grafana/backend-platform
/pkg/services/search/ @grafana/backend-platform
/pkg/services/searchusers/ @grafana/backend-platform
/pkg/services/secrets/ @grafana/backend-platform
/pkg/services/shorturls/ @grafana/backend-platform
/pkg/services/sqlstore/ @grafana/backend-platform
/pkg/services/star/ @grafana/backend-platform
/pkg/services/stats/ @grafana/backend-platform
/pkg/services/tag/ @grafana/backend-platform
/pkg/services/team/ @grafana/grafana-authnz-team
/pkg/services/temp_user/ @grafana/backend-platform
/pkg/services/updatechecker/ @grafana/backend-platform
/pkg/services/user/ @grafana/backend-platform
/pkg/services/validations/ @grafana/backend-platform
/pkg/setting/ @grafana/backend-platform
/pkg/tests/ @grafana/backend-platform
/pkg/tests/api/correlations/ @grafana/explore-squad
/pkg/tsdb/grafanads/ @grafana/backend-platform
/pkg/tsdb/intervalv2/ @grafana/backend-platform
/pkg/tsdb/legacydata/ @grafana/backend-platform
/pkg/tsdb/opentsdb/ @grafana/backend-platform
/pkg/tsdb/sqleng/ @grafana/backend-platform
/pkg/util/ @grafana/backend-platform
/pkg/web/ @grafana/backend-platform
/pkg/services/grpcserver/ @grafana/backend-platform
/pkg/infra/kvstore/ @grafana/backend-platform
/pkg/infra/fs/ @grafana/backend-platform
/pkg/infra/x/ @grafana/backend-platform
# devenv
# Backend code, developers environment
/devenv/docker/blocks/auth/ @grafana/grafana-authnz-team
/devenv/docker/blocks/auth @grafana/grafana-authnz-team
# Logs code, developers environment
/devenv/docker/blocks/loki* @grafana/observability-logs
/devenv/docker/blocks/elastic* @grafana/observability-logs
# Performance tests
/devenv/docker/loadtest-ts/ @grafana/multitenancy-squad
/devenv/bulk-dashboards/ @grafana/dashboards-squad
/devenv/bulk_alerting_dashboards/ @grafana/alerting-squad-backend
/devenv/create_docker_compose.sh @grafana/backend-platform
/devenv/dashboards.yaml @grafana/dashboards-squad
/devenv/datasources.yaml @grafana/backend-platform
/devenv/datasources_docker.yaml @grafana/backend-platform
/devenv/dev-dashboards-without-uid/ @grafana/dashboards-squad
/devenv/dev-dashboards/ @grafana/dashboards-squad
/devenv/docker/blocks/alert_webhook_listener/ @grafana/alerting-squad-backend
/devenv/docker/blocks/clickhouse/ @grafana/partner-plugins
/devenv/docker/blocks/collectd/ @grafana/observability-metrics
/devenv/docker/blocks/grafana/ @grafana/grafana-as-code
/devenv/docker/blocks/graphite/ @grafana/observability-metrics
/devenv/docker/blocks/graphite09/ @grafana/observability-metrics
/devenv/docker/blocks/graphite1/ @grafana/observability-metrics
/devenv/docker/blocks/influxdb/ @grafana/observability-metrics
/devenv/docker/blocks/influxdb1/ @grafana/observability-metrics
/devenv/docker/blocks/jaeger/ @grafana/observability-traces-and-profiling
/devenv/docker/blocks/maildev/ @grafana/alerting-squad-frontend
/devenv/docker/blocks/memcached/ @grafana/backend-platform
/devenv/docker/blocks/mssql/ @grafana/grafana-bi-squad
/devenv/docker/blocks/mssql_arm64/ @grafana/grafana-bi-squad
/devenv/docker/blocks/mssql_tests/ @grafana/grafana-bi-squad
/devenv/docker/blocks/mssql_tls/ @grafana/grafana-bi-squad
/devenv/docker/blocks/mysql/ @grafana/grafana-bi-squad
/devenv/docker/blocks/mysql_exporter/ @grafana/grafana-bi-squad
/devenv/docker/blocks/mysql_opendata/ @grafana/grafana-bi-squad
/devenv/docker/blocks/mysql_tests/ @grafana/grafana-bi-squad
/devenv/docker/blocks/opentsdb/ @grafana/observability-metrics
/devenv/docker/blocks/phlare/ @grafana/observability-traces-and-profiling
/devenv/docker/blocks/postgres/ @grafana/grafana-bi-squad
/devenv/docker/blocks/postgres_tests/ @grafana/grafana-bi-squad
/devenv/docker/blocks/prometheus/ @grafana/observability-metrics
/devenv/docker/blocks/prometheus_random_data/ @grafana/observability-metrics
/devenv/docker/blocks/redis/ @bergquist
/devenv/docker/blocks/sensugo/ @grafana/backend-platform
/devenv/docker/blocks/slow_proxy/ @bergquist
/devenv/docker/blocks/smtp/ @bergquist
/devenv/docker/blocks/tempo/ @grafana/observability-traces-and-profiling
/devenv/docker/blocks/traefik/ @mckn
/devenv/docker/blocks/zipkin/ @grafana/observability-traces-and-profiling
/devenv/docker/buildcontainer/ @bergquist
/devenv/docker/compose_header.yml @grafana/backend-platform
/devenv/docker/debtest/ @bergquist
/devenv/docker/ha-test-unified-alerting/ @grafana/alerting-squad-backend
/devenv/docker/ha_test/ @grafana/backend-platform
/devenv/docker/loadtest/ @grafana/backend-platform
/devenv/docker/rpmtest/ @grafana/backend-platform
/devenv/jsonnet/ @grafana/grafana-edge-squad
/devenv/local-npm/ @grafana/frontend-ops
/devenv/vscode/ @grafana/frontend-ops
/devenv/setup.sh @grafana/backend-platform
# Emails
/emails/ @grafana/alerting-squad-frontend
#Packaging
/packaging/ @DanCech
# Continuous Integration
.drone.yml @grafana/grafana-delivery
.drone.star @grafana/grafana-delivery
/scripts/drone/ @grafana/grafana-delivery
/pkg/build/ @grafana/grafana-delivery
/.dockerignore @grafana/grafana-delivery
/Dockerfile @grafana/grafana-delivery
/Makefile @grafana/grafana-delivery
/scripts/build/ @grafana/grafana-delivery
/scripts/list-release-artifacts.sh @grafana/grafana-delivery
.drone.yml @grafana/grafana-release-eng
.drone.star @grafana/grafana-release-eng
/scripts/drone/ @grafana/grafana-release-eng
/pkg/build/ @grafana/grafana-release-eng
# OSS Plugin Partnerships backend code
/pkg/tsdb/cloudwatch/ @grafana/aws-plugins
/pkg/tsdb/azuremonitor/ @grafana/partner-plugins
/pkg/tsdb/cloudmonitoring/ @grafana/partner-plugins
# Cloud Datasources backend code
/pkg/tsdb/cloudwatch @grafana/aws-plugins
/pkg/tsdb/azuremonitor @grafana/cloud-provider-plugins
/pkg/tsdb/cloudmonitoring @grafana/cloud-provider-plugins
# Observability backend code
/pkg/tsdb/prometheus/ @grafana/observability-metrics
/pkg/tsdb/influxdb/ @grafana/observability-metrics
/pkg/tsdb/elasticsearch/ @grafana/observability-logs
/pkg/tsdb/graphite/ @grafana/observability-metrics
/pkg/tsdb/loki/ @grafana/observability-logs
/pkg/tsdb/tempo/ @grafana/observability-traces-and-profiling
/pkg/tsdb/phlare/ @grafana/observability-traces-and-profiling
/pkg/tsdb/parca/ @grafana/observability-traces-and-profiling
/pkg/tsdb/prometheus @grafana/observability-metrics
/pkg/tsdb/influxdb @grafana/observability-metrics
/pkg/tsdb/elasticsearch @grafana/observability-logs
/pkg/tsdb/graphite @grafana/observability-metrics
/pkg/tsdb/jaeger @grafana/observability-traces-and-profiling
/pkg/tsdb/loki @grafana/observability-logs
/pkg/tsdb/zipkin @grafana/observability-traces-and-profiling
/pkg/tsdb/tempo @grafana/observability-traces-and-profiling
# BI backend code
/pkg/tsdb/mysql/ @grafana/grafana-bi-squad
/pkg/tsdb/postgres/ @grafana/grafana-bi-squad
/pkg/tsdb/mssql/ @grafana/grafana-bi-squad
/pkg/tsdb/mysql @grafana/grafana-bi-squad
/pkg/tsdb/postgres @grafana/grafana-bi-squad
/pkg/tsdb/mssql @grafana/grafana-bi-squad
# Database migrations
/pkg/services/sqlstore/migrations/ @grafana/backend-platform @grafana/hosted-grafana-team
/pkg/services/sqlstore/migrations @grafana/backend-platform @grafana/hosted-grafana-team
*_mig.go @grafana/backend-platform @grafana/hosted-grafana-team
# Grafana multitenancy
/pkg/services/live/ @grafana/multitenancy-squad
/pkg/services/searchV2/ @grafana/multitenancy-squad
/pkg/services/store/ @grafana/multitenancy-squad
/pkg/services/querylibrary/ @grafana/multitenancy-squad
/pkg/services/export/ @grafana/multitenancy-squad
/pkg/infra/filestorage/ @grafana/multitenancy-squad
/pkg/util/converter/ @grafana/multitenancy-squad
# Grafana edge
/pkg/services/live/ @grafana/grafana-edge-squad
/pkg/services/searchV2/ @grafana/grafana-edge-squad
/pkg/services/store/ @grafana/grafana-edge-squad
/pkg/services/export/ @grafana/grafana-edge-squad
/pkg/infra/filestore/ @grafana/grafana-edge-squad
/pkg/tsdb/testdatasource/sims/ @grafana/grafana-edge-squad
# Alerting
/pkg/services/ngalert/ @grafana/alerting-squad-backend
/pkg/services/sqlstore/migrations/ualert/ @grafana/alerting-squad-backend
/pkg/services/alerting/ @grafana/alerting-squad-backend
/pkg/tests/api/alerting/ @grafana/alerting-squad-backend
/public/app/features/alerting/ @grafana/alerting-squad-frontend
/pkg/services/ngalert @grafana/alerting-squad-backend
/pkg/services/sqlstore/migrations/ualert @grafana/alerting-squad-backend
/pkg/services/alerting @grafana/alerting-squad-backend
/pkg/tests/api/alerting @grafana/alerting-squad-backend
/public/app/features/alerting @grafana/alerting-squad-frontend
# Library Services
/pkg/services/libraryelements/ @grafana/user-essentials
/pkg/services/librarypanels/ @grafana/user-essentials
/pkg/services/libraryelements @grafana/user-essentials
/pkg/services/librarypanels @grafana/user-essentials
# Plugins
/pkg/api/pluginproxy/ @grafana/plugins-platform-backend
/pkg/infra/httpclient/ @grafana/plugins-platform-backend
/pkg/plugins/ @grafana/plugins-platform-backend
/pkg/services/datasourceproxy/ @grafana/plugins-platform-backend
/pkg/services/datasources/ @grafana/plugins-platform-backend
/pkg/services/pluginsintegration/ @grafana/plugins-platform-backend
/pkg/plugins/pfs/ @grafana/plugins-platform-backend @grafana/grafana-as-code
/pkg/tsdb/testdatasource/ @grafana/plugins-platform-backend
/pkg/api/pluginproxy @grafana/plugins-platform-backend
/pkg/plugins @grafana/plugins-platform-backend
/pkg/services/datasourceproxy @grafana/plugins-platform-backend
/pkg/services/datasources @grafana/plugins-platform-backend
/pkg/plugins/pfs @grafana/plugins-platform-backend @grafana/grafana-as-code
# Dashboard previews / crawler (behind feature flag)
/pkg/services/thumbs/ @grafana/multitenancy-squad
/pkg/services/thumbs @grafana/grafana-edge-squad
# Backend code docs
/contribute/backend/ @grafana/backend-platform
/contribute/style-guides/backend.md @grafana/backend-platform
/contribute/architecture/backend @grafana/backend-platform
/contribute/engineering/backend @grafana/backend-platform
/crowdin.yml @grafana/user-essentials
/public/locales/ @grafana/user-essentials
/public/app/core/internationalization/ @grafana/user-essentials
/e2e/ @grafana/user-essentials
/e2e/cloud-plugins-suite/ @grafana/partner-plugins
/packages/ @grafana/user-essentials @grafana/plugins-platform-frontend @grafana/grafana-bi-squad
/packages/grafana-e2e-selectors/ @grafana/user-essentials
/packages/grafana-e2e/ @grafana/user-essentials
/packages/grafana-toolkit/ @grafana/plugins-platform-frontend
/packages/grafana-ui/.storybook/ @grafana/plugins-platform-frontend
/packages/grafana-ui/src/components/DateTimePickers/ @grafana/user-essentials
/packages/grafana-ui/src/components/GraphNG/ @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/Logs/ @grafana/observability-logs
/packages/grafana-ui/src/components/Table/ @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/TimeSeries/ @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/uPlot/ @grafana/grafana-bi-squad
/packages/grafana-ui/src/utils/storybook/ @grafana/plugins-platform-frontend
/packages/grafana-data/src/**/*logs* @grafana/observability-logs
/plugins-bundled/ @grafana/plugins-platform-frontend
# root files, mostly frontend
.browserslistrc @grafana/frontend-ops
/e2e @grafana/user-essentials
/packages @grafana/user-essentials @grafana/plugins-platform-frontend @grafana/grafana-bi-squad
/packages/grafana-e2e-selectors @grafana/user-essentials
/packages/grafana-e2e @grafana/user-essentials
/packages/grafana-toolkit @grafana/plugins-platform-frontend
/packages/grafana-ui/.storybook @grafana/plugins-platform-frontend
/packages/grafana-ui/src/components/DateTimePickers @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/GraphNG @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/Logs @grafana/observability-logs
/packages/grafana-ui/src/components/Table @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/TimeSeries @grafana/grafana-bi-squad
/packages/grafana-ui/src/components/uPlot @grafana/grafana-bi-squad
/packages/grafana-ui/src/utils/storybook @grafana/plugins-platform-frontend
/packages/jaeger-ui-components/ @grafana/observability-traces-and-profiling
/plugins-bundled @grafana/plugins-platform-frontend
# public folder
/public/app/core/components/TimePicker @grafana/grafana-bi-squad
/public/app/core/components/Layers @grafana/grafana-edge-squad
/public/app/features/canvas/ @grafana/grafana-edge-squad
/public/app/features/comments/ @grafana/grafana-edge-squad
/public/app/features/dimensions/ @grafana/grafana-edge-squad
/public/app/features/geo/ @grafana/grafana-edge-squad
/public/app/features/storage/ @grafana/grafana-edge-squad
/public/app/features/live/ @grafana/grafana-edge-squad
/public/app/features/explore/ @grafana/observability-experience-squad
/public/app/features/plugins @grafana/plugins-platform-frontend
/public/app/features/transformers/spatial @grafana/grafana-edge-squad
/public/app/plugins/panel/alertlist @grafana/alerting-squad-frontend
/public/app/plugins/panel/barchart @grafana/grafana-bi-squad
/public/app/plugins/panel/heatmap @grafana/grafana-bi-squad
/public/app/plugins/panel/histogram @grafana/grafana-bi-squad
/public/app/plugins/panel/logs @grafana/observability-logs
/public/app/plugins/panel/nodeGraph @grafana/observability-traces-and-profiling
/public/app/plugins/panel/traces @grafana/observability-traces-and-profiling
/public/app/plugins/panel/piechart @grafana/grafana-bi-squad
/public/app/plugins/panel/state-timeline @grafana/grafana-bi-squad
/public/app/plugins/panel/status-history @grafana/grafana-bi-squad
/public/app/plugins/panel/table @grafana/grafana-bi-squad
/public/app/plugins/panel/timeseries @grafana/grafana-bi-squad
/public/app/plugins/panel/geomap @grafana/grafana-edge-squad
/public/app/plugins/panel/canvas @grafana/grafana-edge-squad
/public/app/plugins/panel/candlestick @grafana/grafana-edge-squad
/public/app/plugins/panel/icon @grafana/grafana-edge-squad
/scripts/build/release-packages.sh @grafana/plugins-platform-frontend
/scripts/circle-release-next-packages.sh @grafana/plugins-platform-frontend
/scripts/ci-frontend-metrics.sh @grafana/user-essentials @grafana/plugins-platform-frontend @grafana/grafana-bi-squad
/scripts/grunt @grafana/frontend-ops
/scripts/webpack @grafana/frontend-ops
/scripts/generate-a11y-report.sh @grafana/user-essentials
package.json @grafana/frontend-ops
tsconfig.json @grafana/frontend-ops
/.editorconfig @grafana/frontend-ops
/.eslintignore @grafana/frontend-ops
/.gitattributes @grafana/frontend-ops
/.gitignore @grafana/frontend-ops
/.husky/pre-commit @grafana/frontend-ops
/.nvmrc @grafana/frontend-ops
/.prettierignore @grafana/frontend-ops
/.yarn @grafana/frontend-ops
/.yarnrc.yml @grafana/frontend-ops
/yarn.lock @grafana/frontend-ops
/.linguirc @grafana/user-essentials
/babel.config.json @grafana/frontend-ops
lerna.json @grafana/frontend-ops
/.prettierrc.js @grafana/frontend-ops
/.eslintrc @grafana/frontend-ops
/.vim @zoltanbedi
/jest.config.js @grafana/frontend-ops
/latest.json @grafana/frontend-ops
/metadata.md @grafana/plugins-platform
/stylelint.config.js @grafana/frontend-ops
/tools/ @grafana/frontend-ops
# public folder
/public/app/core/ @grafana/user-essentials
/public/app/core/components/TimePicker/ @grafana/user-essentials
/public/app/core/components/Layers/ @grafana/grafana-edge-squad
/public/app/features/all.ts @grafana/user-essentials
/public/app/features/admin/ @grafana/grafana-authnz-team
/public/app/features/annotations/ @grafana/user-essentials
/public/app/features/api-keys/ @grafana/user-essentials
/public/app/features/canvas/ @grafana/grafana-edge-squad
/public/app/features/commandPalette/ @grafana/user-essentials
/public/app/features/comments/ @grafana/grafana-edge-squad
/public/app/features/connections/ @grafana/plugins-platform-frontend
/public/app/features/correlations/ @grafana/explore-squad
/public/app/features/dashboard/ @grafana/dashboards-squad
/public/app/features/datasources/ @grafana/user-essentials
/public/app/features/dimensions/ @grafana/grafana-edge-squad
/public/app/features/explore/ @grafana/explore-squad
/public/app/features/expressions/ @grafana/observability-metrics
/public/app/features/folders/ @grafana/user-essentials
/public/app/features/inspector/ @grafana/user-essentials
/public/app/features/invites/ @grafana/user-essentials
/public/app/features/geo/ @grafana/grafana-edge-squad
/public/app/features/library-panels/ @grafana/user-essentials
/public/app/features/logs/ @grafana/observability-logs
/public/app/features/live/ @grafana/multitenancy-squad
/public/app/features/manage-dashboards/ @grafana/dashboards-squad
/public/app/features/notifications/ @grafana/user-essentials
/public/app/features/org/ @grafana/user-essentials
/public/app/features/panel/ @grafana/user-essentials
/public/app/features/playlist/ @grafana/dashboards-squad
/public/app/features/plugins/ @grafana/plugins-platform-frontend
/public/app/features/profile/ @grafana/user-essentials
/public/app/features/runtime/ @ryantxu
/public/app/features/query/ @grafana/dashboards-squad
/public/app/features/query-library/ @grafana/grafana-edge-squad
/public/app/features/sandbox/ @grafana/user-essentials
/public/app/features/scenes/ @grafana/dashboards-squad
/public/app/features/search/ @grafana/user-essentials
/public/app/features/serviceaccounts/ @grafana/grafana-authnz-team
/public/app/features/storage/ @grafana/multitenancy-squad
/public/app/features/teams/ @grafana/grafana-authnz-team
/public/app/features/templating/ @grafana/dashboards-squad
/public/app/features/transformers/ @grafana/grafana-edge-squad
/public/app/features/users/ @grafana/grafana-authnz-team
/public/app/features/variables/ @grafana/dashboards-squad
/public/app/plugins/panel/alertGroups/ @grafana/alerting-squad-frontend
/public/app/plugins/panel/alertlist/ @grafana/alerting-squad-frontend
/public/app/plugins/panel/annolist/ @grafana/user-essentials
/public/app/plugins/panel/barchart/ @grafana/grafana-bi-squad
/public/app/plugins/panel/bargauge/ @grafana/user-essentials
/public/app/plugins/panel/dashlist/ @grafana/user-essentials
/public/app/plugins/panel/debug/ @ryantxu
/public/app/plugins/panel/gauge/ @grafana/user-essentials
/public/app/plugins/panel/gettingstarted/ @grafana/user-essentials
/public/app/plugins/panel/graph/ @grafana/user-essentials
/public/app/plugins/panel/heatmap/ @grafana/grafana-bi-squad
/public/app/plugins/panel/histogram/ @grafana/grafana-bi-squad
/public/app/plugins/panel/logs/ @grafana/observability-logs
/public/app/plugins/panel/nodeGraph/ @grafana/observability-traces-and-profiling
/public/app/plugins/panel/traces/ @grafana/observability-traces-and-profiling
/public/app/plugins/panel/flamegraph/ @grafana/observability-traces-and-profiling
/public/app/plugins/panel/piechart/ @grafana/grafana-bi-squad
/public/app/plugins/panel/state-timeline/ @grafana/grafana-bi-squad
/public/app/plugins/panel/status-history/ @grafana/grafana-bi-squad
/public/app/plugins/panel/table/ @grafana/grafana-bi-squad
/public/app/plugins/panel/table-old/ @grafana/grafana-bi-squad
/public/app/plugins/panel/timeseries/ @grafana/grafana-bi-squad
/public/app/plugins/panel/geomap/ @grafana/grafana-edge-squad
/public/app/plugins/panel/canvas/ @grafana/grafana-edge-squad
/public/app/plugins/panel/candlestick/ @grafana/grafana-edge-squad
/public/app/plugins/panel/icon/ @grafana/grafana-edge-squad
/public/app/plugins/panel/live/ @grafana/multitenancy-squad
/public/app/plugins/panel/news/ @grafana/user-essentials
/public/app/plugins/panel/stat/ @grafana/user-essentials
/public/app/plugins/panel/text/ @grafana/user-essentials
/public/app/plugins/panel/welcome/ @grafana/user-essentials
/public/app/plugins/panel/xychart/ @grafana/grafana-bi-squad
/public/app/plugins/sdk.ts @grafana/plugins-platform-frontend
/public/app/polyfills/old-mediaquerylist.ts @grafana/user-essentials
/public/app/routes/ @grafana/user-essentials
/public/app/store/ @grafana/user-essentials
/public/app/types/ @grafana/user-essentials
/public/dashboards/ @grafana/dashboards-squad
/public/fonts/ @grafana/alerting-squad-frontend
/public/emails/ @grafana/user-essentials
/public/gazetteer/ @ryantxu
/public/img/ @grafana/user-essentials
/public/lib/ @grafana/user-essentials
/public/maps/ @ryantxu
/public/robots.txt @grafana/frontend-ops
/public/sass/ @grafana/user-essentials
/public/test/ @grafana/user-essentials
/public/testdata/ @grafana/user-essentials
/public/views/ @grafana/user-essentials
/public/app/features/explore/Logs.tsx @grafana/observability-logs
/public/app/features/explore/LogsContainer.tsx @grafana/observability-logs
/public/app/features/explore/TraceView/ @grafana/observability-traces-and-profiling
/public/api-merged.json @grafana/backend-platform
/public/api-spec.json @grafana/backend-platform
/public/openapi3.json @grafana/backend-platform
/public/app/angular/ @torkelo
/public/app/app.ts @grafana/frontend-ops
/public/app/dev.ts @grafana/frontend-ops
/public/app/index.ts @grafana/frontend-ops
/public/app/AppWrapper.tsx @grafana/frontend-ops
/public/app/partials/ @grafana/user-essentials
/scripts/benchmark-access-control.sh @grafana/grafana-authnz-team
/scripts/check-breaking-changes.sh @grafana/plugins-platform-frontend
/scripts/ci-* @grafana/grafana-delivery
/scripts/circle-* @grafana/grafana-delivery
/scripts/ci-frontend-metrics.sh @grafana/user-essentials @grafana/plugins-platform-frontend @grafana/grafana-bi-squad
/scripts/cli/ @grafana/user-essentials
/scripts/clean-git-or-error.sh @grafana/grafana-as-code
/scripts/grafana-server/ @grafana/user-essentials
/scripts/helpers/ @grafana/grafana-delivery
/scripts/import_many_dashboards.sh @torkelo
/scripts/mixin-check.sh @bergquist
/scripts/openapi3/ @grafana/grafana-partnerships-team
/scripts/prepare-packagejson.js @grafana/frontend-ops
/scripts/protobuf-check.sh @grafana/plugins-platform-backend
/scripts/stripnulls.sh @grafana/grafana-as-code
/scripts/tag_release.sh @grafana/grafana-delivery
/scripts/trigger_docker_build.sh @grafana/grafana-delivery
/scripts/trigger_grafana_packer.sh @grafana/grafana-delivery
/scripts/trigger_windows_build.sh @grafana/grafana-delivery
/scripts/validate-devenv-dashboards.sh @grafana/grafana-delivery
/scripts/verify-repo-update/ @grafana/grafana-delivery
/scripts/webpack/ @grafana/frontend-ops
/scripts/generate-a11y-report.sh @grafana/user-essentials
.babelrc @grafana/frontend-ops
.prettierrc.js @grafana/frontend-ops
.eslintrc @grafana/frontend-ops
.pa11yci.conf.js @grafana/user-essentials
.pa11yci-pr.conf.js @grafana/user-essentials
.betterer.results @joshhunt
.betterer.ts @joshhunt
# @grafana/ui component documentation
*.mdx @grafana/plugins-platform-frontend
# Design system
/public/img/icons/unicons/ @grafana/design-system
*.mdx @jessover9000 @grafana/plugins-platform-frontend
# Core datasources
/public/app/plugins/datasource/dashboard/ @grafana/dashboards-squad
/public/app/plugins/datasource/cloudwatch/ @grafana/aws-plugins
/public/app/plugins/datasource/elasticsearch/ @grafana/observability-logs
/public/app/plugins/datasource/grafana/ @grafana/user-essentials
/public/app/plugins/datasource/testdata/ @grafana/plugins-platform-frontend
/public/app/plugins/datasource/grafana-azure-monitor-datasource/ @grafana/partner-plugins
/public/app/plugins/datasource/graphite/ @grafana/observability-metrics
/public/app/plugins/datasource/influxdb/ @grafana/observability-metrics
/public/app/plugins/datasource/jaeger/ @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/loki/ @grafana/observability-logs
/public/app/plugins/datasource/mixed/ @grafana/dashboards-squad
/public/app/plugins/datasource/mssql/ @grafana/grafana-bi-squad
/public/app/plugins/datasource/mysql/ @grafana/grafana-bi-squad
/public/app/plugins/datasource/opentsdb/ @grafana/backend-platform
/public/app/plugins/datasource/postgres/ @grafana/grafana-bi-squad
/public/app/plugins/datasource/prometheus/ @grafana/observability-metrics
/public/app/plugins/datasource/cloud-monitoring/ @grafana/partner-plugins
/public/app/plugins/datasource/zipkin/ @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/tempo/ @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/phlare/ @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/parca/ @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/alertmanager/ @grafana/alerting-squad
# SSE - Server Side Expressions
/pkg/expr/ @grafana/observability-metrics
/public/app/plugins/datasource/cloudwatch @grafana/aws-plugins
/public/app/plugins/datasource/elasticsearch @grafana/observability-logs
/public/app/plugins/datasource/grafana-azure-monitor-datasource @grafana/cloud-provider-plugins
/public/app/plugins/datasource/graphite @grafana/observability-metrics
/public/app/plugins/datasource/influxdb @grafana/observability-metrics
/public/app/plugins/datasource/jaeger @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/loki @grafana/observability-logs
/public/app/plugins/datasource/mssql @grafana/grafana-bi-squad
/public/app/plugins/datasource/mysql @grafana/grafana-bi-squad
/public/app/plugins/datasource/opentsdb @grafana/backend-platform
/public/app/plugins/datasource/postgres @grafana/grafana-bi-squad
/public/app/plugins/datasource/prometheus @grafana/observability-metrics
/public/app/plugins/datasource/cloud-monitoring @grafana/cloud-provider-plugins
/public/app/plugins/datasource/zipkin @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/tempo @grafana/observability-traces-and-profiling
/public/app/plugins/datasource/alertmanager @grafana/alerting-squad
# Cloud middleware
/grafana-mixin/ @grafana/hosted-grafana-team
# Grafana authentication and authorization
/pkg/login/ @grafana/grafana-authnz-team
/pkg/services/accesscontrol/ @grafana/grafana-authnz-team
/pkg/services/anonymous/ @grafana/grafana-authnz-team
/pkg/services/auth/ @grafana/grafana-authnz-team
/pkg/services/authn/ @grafana/grafana-authnz-team
/pkg/services/accesscontrol @grafana/grafana-authnz-team
/pkg/services/auth @grafana/grafana-authnz-team
/pkg/services/dashboards/accesscontrol.go @grafana/grafana-authnz-team
/pkg/services/datasources/permissions/ @grafana/grafana-authnz-team
/pkg/services/guardian/ @grafana/grafana-authnz-team
/pkg/services/ldap/ @grafana/grafana-authnz-team
/pkg/services/login/ @grafana/grafana-authnz-team
/pkg/services/multildap/ @grafana/grafana-authnz-team
/pkg/services/loginattempt/ @grafana/grafana-authnz-team
/pkg/services/oauthtoken/ @grafana/grafana-authnz-team
/pkg/services/serviceaccounts/ @grafana/grafana-authnz-team
/pkg/services/teamguardian/ @grafana/grafana-authnz-team
# Support bundles
/public/app/features/support-bundles/ @grafana/grafana-authnz-team
/pkg/services/supportbundles/ @grafana/grafana-authnz-team
/pkg/services/datasources/permissions @grafana/grafana-authnz-team
/pkg/services/datasources/permissions/accesscontrol.go @grafana/grafana-authnz-team
/pkg/services/guardian @grafana/grafana-authnz-team
/pkg/services/ldap @grafana/grafana-authnz-team
/pkg/services/login @grafana/grafana-authnz-team
/pkg/services/multildap @grafana/grafana-authnz-team
/pkg/services/oauthtoken @grafana/grafana-authnz-team
/pkg/services/teamguardian @grafana/grafana-authnz-team
/pkg/services/serviceaccounts @grafana/grafana-authnz-team
# Grafana Partnerships Team
/pkg/infra/httpclient/httpclientprovider/sigv4_middleware.go @grafana/grafana-partnerships-team
/pkg/infra/httpclient/httpclientprovider/sigv4_middleware_test.go @grafana/grafana-partnerships-team
# Kind definitions
/kinds/dashboard @grafana/dashboards-squad
/kinds/ @grafana/grafana-as-code
# Kind system and code generation
embed.go @grafana/grafana-as-code
/pkg/kinds/ @grafana/grafana-as-code
/pkg/cuectx/ @grafana/grafana-as-code
/pkg/registry/ @grafana/grafana-as-code
/pkg/codegen/ @grafana/grafana-as-code
/pkg/kindsys/ @grafana/grafana-as-code
/pkg/kindsys/kindcat_custom.cue @grafana/apps-platform-core
/pkg/kinds/*/*_gen.go @grafana/grafana-as-code
/pkg/registry/corekind/ @grafana/grafana-as-code
# Schema framework and code generation
/pkg/codegen @grafana/grafana-as-code
/pkg/framework/coremodel @grafana/grafana-as-code
/public/app/plugins/*gen.go @grafana/grafana-as-code
/cue.mod/ @grafana/grafana-as-code
# GitHub Workflows and Templates
/.github/CODEOWNERS @tolzhabayev
/.github/ISSUE_TEMPLATE/ @torkelo
/.github/PULL_REQUEST_TEMPLATE.md @torkelo
/.github/bot.md @torkelo
/.github/commands.json @torkelo
/.github/dependabot.yml @grafana/frontend-ops
/.github/metrics-collector.json @torkelo
/.github/pr-checks.json @marefr
/.github/pr-commands.json @marefr
/.github/renovate.json5 @grafana/frontend-ops
/.github/teams.yml @armandgrillet
/.github/workflows/auto-milestone.yml @grafana/grafana-delivery
/.github/workflows/backport.yml @grafana/grafana-delivery
/.github/workflows/bump-version.yml @grafana/grafana-delivery
/.github/workflows/close-milestone.yml @grafana/grafana-delivery
/.github/workflows/cloud-data-sources-code-coverage.yml @grafana/partner-plugins @grafana/aws-plugins
/.github/workflows/codeowners-validator.yml @tolzhabayev
/.github/workflows/codeql-analysis.yml @DanCech
/.github/workflows/commands.yml @torkelo
/.github/workflows/detect-breaking-changes-* @grafana/plugins-platform-frontend
/.github/workflows/doc-validator.yml @grafana/docs-grafana
/.github/workflows/enterprise-pr-check.yml @grafana/grafana-release-eng
/.github/workflows/epic-add-to-platform-ux-parent-project.yml @meanmina
/.github/workflows/github-release.yml @torkelo
/.github/workflows/issue-labeled.yml @armandgrillet
/.github/workflows/metrics-collector.yml @torkelo
/.github/workflows/milestone.yml @marefr
/.github/workflows/ox-code-coverage.yml @grafana/explore-squad
/.github/workflows/pr-checks.yml @marefr
/.github/workflows/pr-codeql-analysis-go.yml @DanCech
/.github/workflows/pr-codeql-analysis-javascript.yml @DanCech
/.github/workflows/pr-codeql-analysis-python.yml @DanCech
/.github/workflows/pr-commands-closed.yml @tolzhabayev
/.github/workflows/pr-commands.yml @marefr
/.github/workflows/pr-patch-check.yml @grafana/grafana-delivery
/.github/workflows/sync-mirror.yml @grafana/grafana-delivery
/.github/workflows/publish-technical-documentation-next.yml @grafana/docs-grafana
/.github/workflows/publish-technical-documentation-release.yml @grafana/docs-grafana
/.github/workflows/remove-milestone.yml @grafana/user-essentials
/.github/workflows/sbom-report.yml @grafana/security-team
/.github/workflows/scripts/json-file-to-job-output.js @grafana/plugins-platform-frontend
/.github/workflows/scripts/pr-get-job-link.js @grafana/plugins-platform-frontend
/.github/workflows/stale.yml @grafana/user-essentials
/.github/workflows/update-changelog.yml @grafana/grafana-delivery
/.github/workflows/snyk.yml @grafana/security-team
# Conf
/conf/defaults.ini @torkelo
/conf/sample.ini @torkelo
/conf/ldap.toml @grafana/grafana-authnz-team
/conf/ldap_multiple.toml @grafana/grafana-authnz-team
/conf/provisioning/access-control/ @grafana/grafana-authnz-team
/conf/provisioning/alerting/ @grafana/alerting-squad-backend
/conf/provisioning/dashboards/ @grafana/dashboards-squad
/conf/provisioning/datasources/ @grafana/plugins-platform-backend
/conf/provisioning/notifiers/ @bergquist
/conf/provisioning/plugins/ @grafana/plugins-platform-backend

View File

@@ -14,23 +14,11 @@ Thank you for sending a pull request! Here are some tips:
6. Name your PR as "<FeatureArea>: Describe your change", e.g. Alerting: Prevent race condition. If it's a fix or feature relevant for the changelog describe the user impact in the title. The PR title is used to auto-generate the changelog for issues marked with the "add to changelog" label.
7. If your PR content should be added to the What's New document for the next major or minor release, add the **add to what's new** label to your PR. Note that you should add this label to the main PR that introduces the feature; do not add this label to smaller PRs for the feature.
-->
**What is this feature?**
**What this PR does / why we need it**:
[Add a brief description of what the feature or update does.]
**Why do we need this feature?**
[Add a description of the problem the feature is trying to solve.]
**Who is this feature for?**
[Add information on what kind of user the feature is for.]
**Which issue(s) does this PR fix?**:
**Which issue(s) this PR fixes**:
<!--

24
.github/commands.json vendored
View File

@@ -155,22 +155,6 @@
"url":"https://github.com/orgs/grafana/projects/221"
}
},
{
"type":"label",
"name":"datasource/Phlare",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/221"
}
},
{
"type":"label",
"name":"datasource/Parca",
"action":"addToProject",
"addToProject":{
"url":"https://github.com/orgs/grafana/projects/221"
}
},
{
"type":"label",
"name":"datasource/Elasticsearch",
@@ -314,13 +298,5 @@
"addToProject": {
"url": "https://github.com/orgs/grafana/projects/86"
}
},
{
"type": "label",
"name": "area/internationalization",
"action": "addToProject",
"addToProject": {
"url": "https://github.com/orgs/grafana/projects/78"
}
}
]

View File

@@ -46,4 +46,4 @@
},
"targetUrl": "https://github.com/grafana/grafana/blob/main/contribute/merge-pull-request.md#include-in-changelog-and-release-notes"
}
]
]

View File

@@ -66,7 +66,8 @@
"scripts/build/**/*",
"scripts/*.sh",
"Makefile",
"Dockerfile"
"Dockerfile",
"Dockerfile.ubuntu"
],
"action": "updateLabel",
"addLabel": "type/build-packaging"

View File

@@ -5,13 +5,22 @@
"enabledManagers": ["npm"],
"ignoreDeps": [
"@types/systemjs",
"@types/d3-force", // we should bump this once we move to esm modules
"@types/d3-interpolate", // we should bump this once we move to esm modules
"@types/d3-scale-chromatic", // we should bump this once we move to esm modules
"@types/react-icons", // jaeger-ui-components is being refactored to use @grafana/ui icons instead
"commander", // we are planning to remove this, so no need to update it
"d3",
"d3-force", // we should bump this once we move to esm modules
"d3-interpolate", // we should bump this once we move to esm modules
"d3-scale-chromatic", // we should bump this once we move to esm modules
"execa", // we should bump this once we move to esm modules
"history", // we should bump this together with react-router-dom
"@mdx-js/react", // storybook peer-depends on its 1.x version, we should upgrade this when we upgrade storybook
"monaco-editor", // due to us exposing this via @grafana/ui/CodeEditor's props bumping can break plugins
"node-fetch", // we should bump this once we move to esm modules
"react-hook-form", // due to us exposing these hooks via @grafana/ui form components bumping can break plugins
"react-icons", // jaeger-ui-components is being refactored to use @grafana/ui icons instead
"react-redux", // react-beautiful-dnd depends on react-redux 7.x, we need to update that one first
"react-router-dom", // we should bump this together with history
"systemjs",
@@ -19,12 +28,6 @@
"ts-loader", // we should remove ts-loader and use babel-loader instead
"ora", // we should bump this once we move to esm modules
// Sentry deprecated in favor of Grafana Faro for frontend logging.
// Major effort required to upgrade to latest Sentry, not worthwhile
"@sentry/browser",
"@sentry/types",
"@sentry/utils",
// dep updates blocked by React 18
"@testing-library/react",
"@types/react",
@@ -34,7 +37,6 @@
"react-dom",
"react-test-renderer"
],
"includePaths": ["package.json", "packages/**"],
"ignorePaths": ["packages/grafana-toolkit/package.json", "emails/**", "plugins-bundled/**", "**/mocks/**"],
"labels": ["area/frontend", "dependencies", "no-backport", "no-changelog"],
"packageRules": [
@@ -48,49 +50,12 @@
"matchPackagePatterns": ["@storybook"],
"extends": ["schedule:monthly"],
"groupName": "Storybook updates"
},
{
"groupName": "React Aria",
"matchPackagePrefixes": [
"@react-aria/",
"@react-stately/"
]
},
{
"groupName": "Moveable",
"matchPackageNames": [
"moveable",
"react-moveable"
]
},
{
"groupName": "Slate",
"matchPackageNames": [
"@types/slate",
"@types/slate-react",
"slate",
"slate-react"
]
},
{
"groupName": "d3",
"matchPackagePrefixes": [
"d3",
"@types/d3"
]
},
{
"groupName": "visx",
"matchPackagePrefixes": [
"@visx/"
]
}
],
"pin": {
"enabled": false
},
"prConcurrentLimit": 10,
"rebaseWhen": "conflicted",
"reviewers": ["team:grafana/frontend-ops"],
"separateMajorMinor": false,
"vulnerabilityAlerts": {

View File

@@ -1,22 +0,0 @@
name: Auto-milestone
on:
pull_request:
types:
- closed
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: "Generate token"
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
- name: Run auto-milestone
uses: grafana/grafana-github-actions-go/auto-milestone@main
with:
pr: ${{ github.event.pull_request.number }}
token: ${{ steps.generate_token.outputs.token }}

View File

@@ -17,16 +17,10 @@ jobs:
ref: main
- name: Install Actions
run: npm install --production --prefix ./actions
- name: "Generate token"
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
- name: Run backport
uses: ./actions/backport
with:
metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}}
token: ${{ steps.generate_token.outputs.token }}
token: ${{secrets.GH_BOT_ACCESS_TOKEN}}
labelsToAdd: "backport,no-changelog"
title: "[{{base}}] {{originalTitle}}"

View File

@@ -5,19 +5,30 @@ on:
version:
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
required: true
workflow_call:
inputs:
version_call:
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
required: true
type: string
secrets:
token:
required: true
metricsWriteAPIKey:
required: true
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
YARN_ENABLE_IMMUTABLE_INSTALLS: false
jobs:
main:
runs-on: ubuntu-latest
steps:
# This is a basic workflow to help you get started with Actions
# This is a basic workflow to help you get started with Actions
- uses: actions-ecosystem/action-regex-match@v2.0.2
if: ${{ github.event.inputs.version != '' }}
id: regex-match
with:
text: ${{ github.event.inputs.version }}
regex: '^(\d+.\d+).\d+(?:-beta\d+)?$'
regex: '^(\d+.\d+).\d+(?:-beta.\d+)?$'
- uses: actions-ecosystem/action-regex-match@v2.0.2
if: ${{ inputs.version_call != '' }}
id: regex-match-version-call
@@ -29,7 +40,7 @@ jobs:
run: |
echo "The input version format is not correct, please respect:\
major.minor.patch or major.minor.patch-beta.number format. \
example: 7.4.3 or 7.4.3-beta1"
example: 7.4.3 or 7.4.3-beta.1"
exit 1
- name: Validate input version call
if: ${{ inputs.version_call != '' && steps.regex-match-version-call.outputs.match == '' }}
@@ -44,10 +55,10 @@ jobs:
- name: Set intermedia variables
id: intermedia
run: |
echo "short_ref=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
echo "check_passed=false" >> $GITHUB_OUTPUT
echo "branch_name=v${{steps.regex-match.outputs.group1}}" >> $GITHUB_OUTPUT
echo "branch_exist=$(git ls-remote --heads https://github.com/grafana/grafana.git v${{ steps.regex-match.outputs.group1 }}.x | wc -l)" >> $GITHUB_OUTPUT
echo "::set-output name=short_ref::${GITHUB_REF#refs/*/}"
echo "::set-output name=check_passed::false"
echo "::set-output name=branch_name::v${{steps.regex-match.outputs.group1}}"
echo "::set-output name=branch_exist::$(git ls-remote --heads https://github.com/grafana/grafana.git v${{ steps.regex-match.outputs.group1 }}.x | wc -l)"
- name: Check input version is aligned with branch(main)
if: ${{ github.event.inputs.version != '' && steps.intermedia.outputs.branch_exist == '0' && !contains(steps.intermedia.outputs.short_ref, 'main') }}
@@ -63,19 +74,21 @@ jobs:
repository: "grafana/grafana-github-actions"
path: ./actions
ref: main
- uses: actions/setup-node@v3.5.1
- uses: actions/setup-node@v3.4.0
with:
node-version: '16'
- name: Install Actions
run: npm install --production --prefix ./actions
- name: "Generate token"
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
- name: Run bump version (manually invoked)
if: ${{ github.event.inputs.version != '' }}
uses: ./actions/bump-version
with:
token: ${{ steps.generate_token.outputs.token }}
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
- name: Run bump version (workflow invoked)
if: ${{ inputs.version_call != '' }}
uses: ./actions/bump-version
with:
version_call: ${{ inputs.version_call }}
token: ${{ secrets.token }}
metricsWriteAPIKey: ${{ secrets.metricsWriteAPIKey }}

View File

@@ -11,7 +11,9 @@ on:
description: Needs to match, exactly, the name of a milestone
required: true
type: string
secrets:
token:
required: true
jobs:
main:
runs-on: ubuntu-latest
@@ -24,20 +26,14 @@ jobs:
ref: main
- name: Install Actions
run: npm install --production --prefix ./actions
- name: "Generate token"
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
- name: Close milestone (manually invoked)
if: ${{ github.event.inputs.version != '' }}
uses: ./actions/close-milestone
with:
token: ${{ steps.generate_token.outputs.token }}
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
- name: Close milestone (workflow invoked)
if: ${{ inputs.version_call != '' }}
uses: ./actions/close-milestone
with:
version_call: ${{ inputs.version_call }}
token: ${{ steps.generate_token.outputs.token }}
token: ${{ secrets.token }}

View File

@@ -14,7 +14,7 @@ on:
jobs:
workflow-call:
uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.18
uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.12
with:
frontend-path-regexp: public\/app\/plugins\/datasource\/(grafana-azure-monitor-datasource|cloud-monitoring|cloudwatch)
backend-path-regexp: pkg\/tsdb\/(azuremonitor|cloudmonitoring|cloudwatch)

View File

@@ -1,38 +0,0 @@
name: "Codeowners Validator"
on:
pull_request:
branches: [ main ]
jobs:
codeowners-validator:
runs-on: ubuntu-latest
steps:
# Checks-out your repository, which is validated in the next step
- uses: actions/checkout@v2
- name: GitHub CODEOWNERS Validator
uses: mszostok/codeowners-validator@v0.7.4
# input parameters
with:
# ==== GitHub Auth ====
# "The list of checks that will be executed. By default, all checks are executed. Possible values: files,owners,duppatterns,syntax"
checks: "files,duppatterns,syntax"
# "The comma-separated list of experimental checks that should be executed. By default, all experimental checks are turned off. Possible values: notowned,avoid-shadowing"
experimental_checks: "notowned,avoid-shadowing"
# The repository path in which CODEOWNERS file should be validated."
repository_path: "."
# Defines the level on which the application should treat check issues as failures. Defaults to warning, which treats both errors and warnings as failures, and exits with error code 3. Possible values are error and warning. Default: warning"
check_failure_level: "error"
# The comma-separated list of patterns that should be ignored by not-owned-checker. For example, you can specify * and as a result, the * pattern from the CODEOWNERS file will be ignored and files owned by this pattern will be reported as unowned unless a later specific pattern will match that path. It's useful because often we have default owners entry at the begging of the CODOEWNERS file, e.g. * @global-owner1 @global-owner2"
not_owned_checker_skip_patterns: ""
# Specifies whether CODEOWNERS may have unowned files. For example, `/infra/oncall-rotator/oncall-config.yml` doesn't have owner and this is not reported.
owner_checker_allow_unowned_patterns: "false"
# Specifies whether only teams are allowed as owners of files.
owner_checker_owners_must_be_teams: "false"

View File

@@ -1,34 +0,0 @@
# Workflow for skipping the Levitate detection
# (This is needed because workflows that are skipped due to path filtering will show up as pending in Github.
# As this has the same name as the one in detect-breaking-changes-build.yml it will take over in these cases and succeed quickly.)
name: Levitate / Detect breaking changes
on:
pull_request:
paths-ignore:
- "packages/**"
branches:
- 'main'
jobs:
detect:
name: Detect breaking changes
runs-on: ubuntu-latest
steps:
- name: Skipping
run: echo "No modifications in the public API (packages/), skipping."
# Build and persist output as a JSON (we need to tell the report workflow that the check has been skipped)
- name: Persisting the check output
run: |
mkdir -p ./levitate
echo "{ \"shouldSkip\": true }" > ./levitate/result.json
# Upload artifact (so it can be used in the more privileged "report" workflow)
- name: Upload check output as artifact
uses: actions/upload-artifact@v3
with:
name: levitate
path: levitate/

View File

@@ -1,14 +1,6 @@
# Only runs if anything under the packages/ directory changes.
# (Otherwise detect-breaking-changes-build-skip.yml takes over)
name: Levitate / Detect breaking changes
on:
pull_request:
paths:
- 'packages/**'
branches:
- 'main'
on: pull_request
jobs:
buildPR:
@@ -22,16 +14,16 @@ jobs:
- uses: actions/checkout@v3
with:
path: './pr'
- uses: actions/setup-node@v3.5.1
- uses: actions/setup-node@v3
with:
node-version: 16.16.0
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Restore yarn cache
uses: actions/cache@v3.0.11
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -70,16 +62,16 @@ jobs:
path: './base'
ref: ${{ github.event.pull_request.base.ref }}
- uses: actions/setup-node@v3.5.1
- uses: actions/setup-node@v3
with:
node-version: 16.16.0
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Restore yarn cache
uses: actions/cache@v3.0.11
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -110,7 +102,7 @@ jobs:
runs-on: ubuntu-latest
needs: ['buildPR', 'buildBase']
env:
GITHUB_STEP_NUMBER: 8
GITHUB_STEP_NUMBER: 7
steps:
- uses: actions/checkout@v3
@@ -136,9 +128,8 @@ jobs:
uses: actions/github-script@v6
with:
script: |
const name = 'Detect breaking changes';
const script = require('./.github/workflows/scripts/pr-get-job-link.js')
await script({name, github, context, core})
await script({github, context, core})
- name: Detect breaking changes
id: breaking-changes

View File

@@ -10,13 +10,12 @@ jobs:
name: Report
runs-on: ubuntu-latest
env:
ARTIFACT_NAME: 'levitate' # The name of the artifact that we would like to download
ARTIFACT_FOLDER: '${{ github.workspace }}/tmp' # The name of the folder where we will download the artifact to
ARTIFACT_FOLDER: '${{ github.workspace }}/tmp'
ARTIFACT_NAME: 'levitate'
steps:
- uses: actions/checkout@v3
# Download artifact (as a .zip archive)
- name: 'Download artifact'
uses: actions/github-script@v6
env:
@@ -50,12 +49,9 @@ jobs:
fs.mkdirSync(artifactFolder, { recursive: true });
fs.writeFileSync(`${ artifactFolder }/${ artifactName }.zip`, Buffer.from(download.data));
# Unzip artifact
- name: Unzip artifact
run: unzip "${ARTIFACT_FOLDER}/${ARTIFACT_NAME}.zip" -d "${ARTIFACT_FOLDER}"
# Parse the artifact and register fields as step output variables
# (All fields in the JSON will be available as ${{ steps.levitate-run.outputs.<field-name> }}
- name: Parsing levitate result
uses: actions/github-script@v6
id: levitate-run
@@ -65,15 +61,8 @@ jobs:
const script = require('./.github/workflows/scripts/json-file-to-job-output.js');
await script({ core, filePath });
# Skip - print a message if the "Detect" workflow was skipped
- name: Check if the workflow should be skipped
if: steps.levitate-run.outputs.shouldSkip == 'true'
run: echo "Skipping."
# Check if label exists
- name: Check if "levitate breaking change" label exists
id: does-label-exist
if: steps.levitate-run.outputs.shouldSkip != 'true'
uses: actions/github-script@v6
env:
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
@@ -89,9 +78,8 @@ jobs:
return doesExist ? 1 : 0;
# Comment on the PR
- name: Comment on PR
if: steps.levitate-run.outputs.exit_code == 1 && steps.levitate-run.outputs.shouldSkip != 'true'
if: ${{ steps.levitate-run.outputs.exit_code == 1 }}
uses: marocchino/sticky-pull-request-comment@v2
with:
number: ${{ steps.levitate-run.outputs.pr_number }}
@@ -105,9 +93,8 @@ jobs:
[Console output](${{ steps.levitate-run.outputs.job_link }})
[Read our guideline](https://github.com/grafana/grafana/blob/main/contribute/breaking-changes-guide.md)
# Remove comment from the PR (no more breaking changes)
- name: Remove comment from PR
if: steps.levitate-run.outputs.exit_code == 0 && steps.levitate-run.outputs.shouldSkip != 'true'
- name: Remove comment on PR
if: ${{ steps.levitate-run.outputs.exit_code == 0 }}
uses: marocchino/sticky-pull-request-comment@v2
with:
number: ${{ steps.levitate-run.outputs.pr_number }}
@@ -116,8 +103,8 @@ jobs:
# Posts a notification to Slack if a PR has a breaking change and it did not have a breaking change before
- name: Post to Slack
id: slack
if: steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 && steps.levitate-run.outputs.shouldSkip != 'true'
uses: slackapi/slack-github-action@v1.23.0
if: ${{ steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 }}
uses: slackapi/slack-github-action@v1.19.0
with:
payload: |
{
@@ -130,9 +117,8 @@ jobs:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_LEVITATE_WEBHOOK_URL }}
# Add the label
- name: Add "levitate breaking change" label
if: steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 && steps.levitate-run.outputs.shouldSkip != 'true'
if: ${{ steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 }}
uses: actions/github-script@v6
env:
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}
@@ -146,9 +132,8 @@ jobs:
labels: ['levitate breaking change']
})
# Remove label (no more breaking changes)
- name: Remove "levitate breaking change" label
if: steps.levitate-run.outputs.exit_code == 0 && steps.does-label-exist.outputs.result == 1 && steps.levitate-run.outputs.shouldSkip != 'true'
if: ${{ steps.levitate-run.outputs.exit_code == 0 && steps.does-label-exist.outputs.result == 1 }}
uses: actions/github-script@v6
env:
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}
@@ -162,11 +147,10 @@ jobs:
name: 'levitate breaking change'
})
# Add reviewers
# This is very weird, the actual request goes through (comes back with a 201), but does not assign the team.
# Related issue: https://github.com/renovatebot/renovate/issues/1908
- name: Add "grafana/plugins-platform-frontend" as a reviewer
if: steps.levitate-run.outputs.exit_code && steps.levitate-run.outputs.shouldSkip != 'true'
if: ${{ steps.levitate-run.outputs.exit_code == 1 }}
uses: actions/github-script@v6
env:
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}
@@ -181,9 +165,8 @@ jobs:
team_reviewers: ['grafana/plugins-platform-frontend']
});
# Remove reviewers (no more breaking changes)
- name: Remove "grafana/plugins-platform-frontend" from the list of reviewers
if: steps.levitate-run.outputs.exit_code == 0 && steps.levitate-run.outputs.shouldSkip != 'true'
if: ${{ steps.levitate-run.outputs.exit_code == 0 }}
uses: actions/github-script@v6
env:
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}

View File

@@ -7,10 +7,10 @@ jobs:
doc-validator:
runs-on: "ubuntu-latest"
container:
image: "grafana/doc-validator:v1.9.0"
image: "grafana/doc-validator:latest"
steps:
- name: "Checkout code"
uses: "actions/checkout@v3"
- name: "Run doc-validator tool"
# Ensure that the CI always passes until all errors are resolved.
run: "doc-validator --skip-image-validation ./docs/sources /docs/grafana/latest || true"
run: "doc-validator ./docs/sources || true"

View File

@@ -23,4 +23,4 @@ jobs:
repository: grafana/grafana-enterprise
event_type: oss-pull-request
client_payload:
'{"source_sha": "${{ github.event.pull_request.head.sha }}", "source_branch": "${{ github.head_ref }}", "target_branch": "${{ github.base_ref }}", "pr_number": "${{ github.event.number }}"}'
'{"source_branch": "${{ github.head_ref }}", "target_branch": "${{ github.base_ref }}", "pr_number": "${{ github.event.number }}"}'

View File

@@ -1,134 +0,0 @@
name: When epic issues changed in Platform UX squad projects, check if epic is part of specified child projects and update on Platform UX parent project
on:
issues:
types: [opened, closed, edited, reopened, assigned, unassigned, labeled, unlabeled]
labels:
- 'type/epic'
env:
GITHUB_TOKEN: ${{ secrets.GH_BOT_PROJECTS_ACCESS_TOKEN }}
ORGANIZATION: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
PARENT_PROJECT: 304
CHILD_PROJECT_1: 78
CHILD_PROJECT_2: 111
CHILD_PROJECT_3: 202
concurrency:
group: issue-add-to-parent-project-${{ github.event.number }}
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Check if issue is in child or parent projects
run: |
gh api graphql -f query='
query($org: String!, $repo: String!) {
repository(name: $repo, owner: $org) {
issue (number: ${{ github.event.issue.number }}) {
projectItems(first:20) {
nodes {
id,
project {
number,
title
},
fieldValueByName(name:"Status") {
... on ProjectV2ItemFieldSingleSelectValue {
optionId
name
}
}
}
}
}
}
}' -f org=$ORGANIZATION -f repo=$REPO > projects_data.json
echo 'IN_PARENT_PROJ='$(jq '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.PARENT_PROJECT }}) | .project != null' projects_data.json) >> $GITHUB_ENV
echo 'PARENT_PROJ_STATUS_ID='$(jq '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.PARENT_PROJECT }}) | select(.fieldValueByName != null) | .fieldValueByName.optionId' projects_data.json) >> $GITHUB_ENV
echo 'ITEM_ID='$(jq '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.PARENT_PROJECT }}) | .id' projects_data.json) >> $GITHUB_ENV
echo 'IN_CHILD_PROJ='$(jq 'first(.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.CHILD_PROJECT_1 }} or .project.number==${{ env.CHILD_PROJECT_2 }} or .project.number==${{ env.CHILD_PROJECT_3 }}) | .project != null)' projects_data.json) >> $GITHUB_ENV
echo 'CHILD_PROJ_STATUS='$(jq -r '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.CHILD_PROJECT_1 }} or .project.number==${{ env.CHILD_PROJECT_2 }} or .project.number==${{ env.CHILD_PROJECT_3 }}) | select(.fieldValueByName != null) | .fieldValueByName.name' projects_data.json) >> $GITHUB_ENV
- name: Get parent project project data
if: env.IN_CHILD_PROJ
run: |
gh api graphql -f query='
query($org: String!, $number: Int!) {
organization(login: $org){
projectV2(number: $number) {
id
fields(first:20) {
nodes {
... on ProjectV2Field {
id
name
}
... on ProjectV2SingleSelectField {
id
name
options {
id
name
}
}
}
}
}
}
}' -f org=$ORGANIZATION -F number=$PARENT_PROJECT > project_data.json
echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV
echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV
echo 'TODO_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV
echo 'PROGRESS_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="In Progress") |.id' project_data.json) >> $GITHUB_ENV
echo 'DONE_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Done") |.id' project_data.json) >> $GITHUB_ENV
- name: Add issue to parent project
if: env.IN_CHILD_PROJ && !env.IN_PARENT_PROJ
run: |
item_id="$( gh api graphql -f query='
mutation($project:ID!, $issue:ID!) {
addProjectV2ItemById(input: {projectId: $project, contentId: $issue}) {
item {
id
}
}
}' -f project=$PROJECT_ID -f issue=${{ github.event.issue.node_id }} --jq '.data.addProjectV2ItemById.item.id')"
echo 'ITEM_ID='$item_id >> $GITHUB_ENV
- name: Set parent project status Done
if: contains(env.CHILD_PROJ_STATUS, 'Done')
run: |
echo 'OPTION_ID='$DONE_OPTION_ID >> $GITHUB_ENV
- name: Set parent project status In Progress
if: contains(env.CHILD_PROJ_STATUS, 'In ') || contains(env.CHILD_PROJ_STATUS, 'Blocked')
run: |
echo 'OPTION_ID='$PROGRESS_OPTION_ID >> $GITHUB_ENV
- name: Set parent project status To do
if: env.CHILD_PROJ_STATUS && !contains(env.CHILD_PROJ_STATUS, 'In ') && !contains(env.CHILD_PROJ_STATUS, 'Blocked') && ! contains(env.CHILD_PROJ_STATUS, 'Done')
run: |
echo 'OPTION_ID='$TODO_OPTION_ID >> $GITHUB_ENV
- name: Set issue status in parent project
if: env.OPTION_ID && (env.OPTION_ID != env.PARENT_PROJ_STATUS_ID)
run: |
gh api graphql -f query='
mutation (
$project: ID!
$item: ID!
$status_field: ID!
$status_value: String!
) {
set_status: updateProjectV2ItemFieldValue(input: {
projectId: $project
itemId: $item
fieldId: $status_field
value: {
singleSelectOptionId: $status_value
}
}) {
projectV2Item {
id
}
}
}' -f project=$PROJECT_ID -f item=$ITEM_ID -f status_field=$STATUS_FIELD_ID -f status_value=${{ env.OPTION_ID }} --silent

View File

@@ -3,7 +3,7 @@ on:
workflow_dispatch:
inputs:
version:
required: true
required: true
description: Needs to match, exactly, the name of a milestone (NO v prefix)
jobs:
main:
@@ -14,17 +14,11 @@ jobs:
with:
repository: "grafana/grafana-github-actions"
path: ./actions
ref: main
ref: main
- name: Install Actions
run: npm install --production --prefix ./actions
- name: "Generate token"
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
- name: Run github release action
uses: ./actions/github-release
with:
token: ${{ steps.generate_token.outputs.token }}
token: ${{secrets.GH_BOT_ACCESS_TOKEN}}
metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}}

View File

@@ -58,7 +58,7 @@ jobs:
- name: "Send Slack notification"
if: ${{ env.CHANNEL != 'null' }}
uses: slackapi/slack-github-action@v1.23.0
uses: slackapi/slack-github-action@v1.14.0
with:
payload: >
{

View File

@@ -10,10 +10,12 @@ jobs:
uses: grafana/grafana/.github/workflows/remove-milestone.yml@main
with:
version_call: ${{ github.event.inputs.version_input }}
secrets: inherit
secrets:
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
call-close-milestone:
uses: grafana/grafana/.github/workflows/close-milestone.yml@main
with:
version_call: ${{ github.event.inputs.version_input }}
secrets: inherit
needs: call-remove-milestone
secrets:
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
needs: call-remove-milestone

View File

@@ -3,19 +3,15 @@ on:
pull_request:
paths:
- 'pkg/services/queryhistory/**'
- 'pkg/tsdb/loki/**'
- 'pkg/tsdb/elasticsearch/**'
- 'public/app/features/explore/**'
- 'public/app/features/correlations/**'
- 'public/app/plugins/datasource/loki/**'
- 'public/app/plugins/datasource/elasticsearch/**'
branches-ignore:
- dependabot/**
- backport-*
jobs:
workflow-call:
uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.18
uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.12
with:
frontend-path-regexp: public\/app\/features\/(explore|correlations)|public\/app\/plugins\/datasource\/(loki|elasticsearch)
backend-path-regexp: pkg\/services\/(queryhistory)|pkg\/tsdb\/(loki|elasticsearch)
frontend-path-regexp: public\/app\/features\/(explore|correlations)
backend-path-regexp: pkg\/services\/(queryhistory)

View File

@@ -1,24 +0,0 @@
# Owned by grafana-delivery-squad
# Intended to be dropped into the base repo Ex: grafana/grafana
name: Check for patch conflicts
run-name: check-patch-conflicts-${{ github.base_ref }}-${{ github.head_ref }}
on:
pull_request_target:
types:
- opened
branches:
- "main"
- "v*.*.*"
- "release-*"
# Since this is run on a pull request, we want to apply the patches intended for the
# target branch onto the source branch, to verify compatibility before merging.
jobs:
trigger_downstream_patch_check:
uses: grafana/security-patch-actions/.github/workflows/test-patches.yml@main
with:
src_repo: "${{ github.repository }}"
src_ref: "${{ github.head_ref }}" # this is the source branch name, Ex: "feature/newthing"
patch_repo: "${{ github.repository }}-security-patches"
patch_ref: "${{ github.base_ref }}" # this is the target branch name, Ex: "main"
secrets: inherit

View File

@@ -1,38 +0,0 @@
name: "publish-technical-documentation-next"
on:
push:
branches:
- "main"
paths:
- "docs/sources/**"
workflow_dispatch:
jobs:
sync:
if: "github.repository == 'grafana/grafana'"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout Grafana repo"
uses: "actions/checkout@v3"
- name: "Clone website-sync Action"
# WEBSITE_SYNC_TOKEN is a fine-grained GitHub Personal Access Token that expires.
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
# GitHub administrator to update the organization secret.
# The IT helpdesk can update the organization secret.
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.WEBSITE_SYNC_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync"
- name: "Publish to website repository (next)"
uses: "./.github/actions/website-sync"
id: "publish-next"
with:
repository: "grafana/website"
branch: "master"
host: "github.com"
# PUBLISH_TO_WEBSITE_TOKEN is a fine-grained GitHub Personal Access Token that expires.
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
# GitHub administrator to update the organization secret.
# The IT helpdesk can update the organization secret.
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_TOKEN }}"
source_folder: "docs/sources"
target_folder: "content/docs/grafana/next"

View File

@@ -1,68 +0,0 @@
name: "publish-technical-documentation-release"
on:
push:
branches:
- v[0-9]+.[0-9]+.x
tags:
- v[0-9]+.[0-9]+.[0-9]+
paths:
- "docs/sources/**"
workflow_dispatch:
jobs:
sync:
if: "github.repository == 'grafana/grafana'"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout Grafana repo"
uses: "actions/checkout@v3"
with:
fetch-depth: 0
- name: "Checkout Actions library"
uses: "actions/checkout@v3"
with:
repository: "grafana/grafana-github-actions"
path: "./actions"
- name: "Install Actions from library"
run: "npm install --production --prefix ./actions"
- name: "Determine if there is a matching release tag"
id: "has-matching-release-tag"
uses: "./actions/has-matching-release-tag"
with:
ref_name: "${{ github.ref_name }}"
release_tag_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
release_branch_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.x$"
- name: "Determine technical documentation version"
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
uses: "./actions/docs-target"
id: "target"
with:
ref_name: "${{ github.ref_name }}"
- name: "Clone website-sync Action"
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
# WEBSITE_SYNC_TOKEN is a fine-grained GitHub Personal Access Token that expires.
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
# GitHub administrator to update the organization secret.
# The IT helpdesk can update the organization secret.
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.WEBSITE_SYNC_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync"
- name: "Publish to website repository (release)"
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
uses: "./.github/actions/website-sync"
id: "publish-release"
with:
repository: "grafana/website"
branch: "master"
host: "github.com"
# PUBLISH_TO_WEBSITE_TOKEN is a fine-grained GitHub Personal Access Token that expires.
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
# GitHub administrator to update the organization secret.
# The IT helpdesk can update the organization secret.
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_TOKEN }}"
source_folder: "docs/sources"
target_folder: "content/docs/grafana/${{ steps.target.outputs.target }}"

48
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: publish_docs
on:
push:
branches:
- v9.2.x
paths:
- 'docs/sources/**'
- 'packages/grafana-*/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.GH_BOT_ACCESS_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync
- name: generate-packages-docs
uses: actions/setup-node@v3.4.0
id: generate-docs
with:
node-version: '16'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v2.1.7
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- run: yarn install --immutable
- name: publish-to-git
uses: ./.github/actions/website-sync
id: publish
with:
repository: grafana/website
branch: master
host: github.com
github_pat: '${{ secrets.GH_BOT_ACCESS_TOKEN }}'
source_folder: docs/sources
target_folder: content/docs/grafana/latest
allow_no_changes: 'true'
- shell: bash
run: |
test -n "${{ steps.publish.outputs.commit_hash }}"
test -n "${{ steps.publish.outputs.working_directory }}"

View File

@@ -11,7 +11,9 @@ on:
description: Needs to match, exactly, the name of a milestone
required: true
type: string
secrets:
token:
required: true
jobs:
main:
runs-on: ubuntu-latest
@@ -24,20 +26,14 @@ jobs:
ref: main
- name: Install Actions
run: npm install --production --prefix ./actions
- name: "Generate token"
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
- name: Remove milestone from open issues (manually invoked)
if: ${{ github.event.inputs.version != '' }}
uses: ./actions/remove-milestone
with:
token: ${{ steps.generate_token.outputs.token }}
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
- name: Remove milestone from open issues (workflow invoked)
if: ${{ inputs.version_call != '' }}
uses: ./actions/remove-milestone
with:
version_call: ${{ inputs.version_call }}
token: ${{ steps.generate_token.outputs.token }}
token: ${{ secrets.token }}

View File

@@ -1,9 +1,9 @@
module.exports = async ({ name, github, context, core }) => {
module.exports = async ({ github, context, core }) => {
const { owner, repo } = context.repo;
const url = `https://api.github.com/repos/${owner}/${repo}/actions/runs/${context.runId}/jobs`
const result = await github.request(url);
const job = result.data.jobs.find(j => j.name === name);
core.setOutput('link', `${job.html_url}?check_suite_focus=true`);
}
const result = await github.request(url)
const link = `https://github.com/grafana/grafana/runs/${result.data.jobs[0].id}?check_suite_focus=true`;
core.setOutput('link', link);
}

View File

@@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
# Number of days of inactivity before a stale Issue or Pull Request is closed.

View File

@@ -1,25 +0,0 @@
# Owned by grafana-delivery-squad
# Intended to be dropped into the base repo, Ex: grafana/grafana
name: Sync to mirror
run-name: sync-to-mirror-${{ github.ref_name }}
on:
workflow_dispatch:
push:
branches:
- "main"
- "v*.*.*"
- "release-*"
# This is run after the pull request has been merged, so we'll run against the target branch
jobs:
trigger_downstream_patch_mirror:
concurrency: patch-mirror-${{ github.ref_name }}
uses: grafana/security-patch-actions/.github/workflows/mirror-branch-and-apply-patches.yml@main
if: github.repository == 'grafana/grafana'
with:
ref: "${{ github.ref_name }}" # this is the target branch name, Ex: "main"
src_repo: "${{ github.repository }}"
dest_repo: "${{ github.repository }}-security-mirror"
patch_repo: "${{ github.repository }}-security-patches"
secrets: inherit

View File

@@ -5,16 +5,21 @@ on:
version:
required: true
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
workflow_call:
inputs:
version_call:
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
required: true
type: string
secrets:
token:
required: true
metricsWriteAPIKey:
required: true
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: "Generate token"
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
- name: Checkout Actions
uses: actions/checkout@v3
with:
@@ -24,7 +29,15 @@ jobs:
- name: Install Actions
run: npm install --production --prefix ./actions
- name: Run update changelog (manually invoked)
if: ${{ github.event.inputs.version != '' }}
uses: ./actions/update-changelog
with:
token: ${{ steps.generate_token.outputs.token }}
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
- name: Run update changelog (workflow invoked)
if: ${{ inputs.version != '' }}
uses: ./actions/update-changelog
with:
version_call: ${{ inputs.version }}
token: ${{ secrets.token }}
metricsWriteAPIKey: ${{ secrets.metricsWriteAPIKey }}

21
.gitignore vendored
View File

@@ -79,8 +79,6 @@ public/css/*.min.css
/devenv/docker-compose.override.yaml
/devenv/.env
/devenv/docker/blocks/tempo/tempo-data/
/devenv/docker/ha-test-unified-alerting/logs/webhook/dumps/
/devenv/docker/ha-test-unified-alerting/logs/webhook/webhook-listener.log
conf/custom.ini
/conf/provisioning/**/custom.yaml
@@ -107,7 +105,6 @@ debug.test
/packaging/**/*.tar.gz
/packaging/**/*.tar.gz.sha256
pkg/cmd/grafana-server/__debug_bin
pkg/services/quota/quotaimpl/storage/storage.json
# Ignore OSX indexing
.DS_Store
@@ -129,7 +126,6 @@ pkg/services/quota/quotaimpl/storage/storage.json
!.yarn/patches/*.patch
# Ignoring frontend packages specifics
/packages/grafana-ui/.yarn/.cache
/packages/**/dist
/packages/**/compiled
/packages/**/.rpt2_cache
@@ -159,8 +155,6 @@ compilation-stats.json
/e2e/benchmarks/**/results/*
/e2e/benchmarks/**/results
/e2e/build_results.zip
/e2e/extensions
/e2e/extensions-suite
# grafana server
/scripts/grafana-server/server.log
@@ -175,17 +169,18 @@ compilation-stats.json
# auto generated frontend docs
/docs/sources/packages_api
# wire generated files
**/wire_gen.go
# auto generated Go files
*_gen.go
!pkg/services/featuremgmt/toggles_gen.go
!pkg/coremodel/**/*_gen.go
!pkg/framework/**/*_gen.go
!pkg/plugins/pfs/**/*_gen.go
!public/app/plugins/**/*_gen.go
# Auto-generated internationalization files
public/locales/_build/
public/locales/*/*.js
public/locales/*/grafana_old.json
public/locales/**/*.js
deployment_tools_config.json
.betterer.cache
# Temporary file for backporting PRs
.pr-body.txt

View File

@@ -19,7 +19,6 @@ include-go-root = true
packages = ["io/ioutil"]
[[linters-settings.depguard.packages-with-error-message]]
"io/ioutil" = "Deprecated: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details."
"gopkg.in/yaml.v2" = "Grafana packages are not allowed to depend on gopkg.in/yaml.v2 as gopkg.in/yaml.v3 is now available"
[linters-settings.gocritic]
enabled-checks = ["ruleguard"]
@@ -57,6 +56,7 @@ enable = [
"typecheck",
"asciicheck",
"errorlint",
"sqlclosecheck",
"revive",
]
@@ -83,11 +83,7 @@ text = "ST1001"
# Use golang.org/x/text/cases instead.
[[issues.exclude-rules]]
linters = ["staticcheck"]
text = "SA1019: strings.Title"
[[issues.exclude-rules]]
linters = ["staticcheck"]
text = "use fake service and real access control evaluator instead"
text = "SA1019"
[[issues.exclude-rules]]
linters = ["gosec"]

2
.nvmrc
View File

@@ -1 +1 @@
v18.12.0
v16.14.0

View File

@@ -30,11 +30,3 @@ theme.dark.generated.json
public/api-spec.json
public/api-merged.json
public/openapi3.json
# Generated Kinds report
kinds/report.json
# Generated schema docs
docs/sources/developers/kinds/
scripts/cli/bettererIssueTemplate.md

19
.vscode/launch.json vendored
View File

@@ -6,17 +6,10 @@
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/pkg/cmd/grafana/",
"program": "${workspaceFolder}/pkg/cmd/grafana-server/",
"env": {},
"cwd": "${workspaceFolder}",
"args": ["server", "--homepath", "${workspaceFolder}", "--packaging", "dev"]
},
{
"name": "Attach to Chrome",
"port": 9222,
"request": "attach",
"type": "chrome",
"webRoot": "${workspaceFolder}"
"args": ["--homepath", "${workspaceFolder}", "--packaging", "dev"]
},
{
"name": "Debug Jest test",
@@ -27,14 +20,6 @@
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"port": 9229
},
{
"name": "Debug Go test",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${workspaceFolder}/${relativeFileDirname}",
"showLog": true
}
]
}

783
.yarn/releases/yarn-3.2.3.cjs vendored Executable file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{
"name": "eslint",
"version": "8.32.0-sdk",
"version": "8.23.0-sdk",
"main": "./lib/api.js",
"type": "commonjs"
}

View File

@@ -1,6 +1,6 @@
{
"name": "prettier",
"version": "2.8.1-sdk",
"version": "2.7.1-sdk",
"main": "./index.js",
"type": "commonjs"
}

View File

@@ -1,6 +1,6 @@
{
"name": "typescript",
"version": "4.8.4-sdk",
"version": "4.8.2-sdk",
"main": "./lib/typescript.js",
"type": "commonjs"
}

View File

@@ -3,36 +3,41 @@ enableTelemetry: false
nodeLinker: pnp
packageExtensions:
'@storybook/addon-docs@6.5.12':
"@mdx-js/loader@1.6.22":
peerDependencies:
'@babel/core': ^7.0.0
'@storybook/manager-webpack5': 6.5.12
'webpack': 5.74.0
'@storybook/addon-essentials@6.5.12':
peerDependencies:
'@storybook/components': 6.5.12
'@storybook/core-events': 6.5.12
'@storybook/manager-webpack5': 6.5.12
'@storybook/theming': 6.5.12
'@storybook/core-server@6.5.12':
peerDependencies:
'@babel/core': ^7.0.0
'@storybook/core@6.5.12':
peerDependencies:
'@babel/core': ^7.0.0
'@storybook/manager-webpack5': 6.5.12
'@storybook/csf-tools@6.5.12':
peerDependencies:
'@babel/core': ^7.0.0
'@storybook/mdx2-csf@0.0.3':
react: 17.0.1
"@npmcli/run-script@4.1.3":
dependencies:
'@babel/types': ^7.14.8
'@storybook/react@6.5.12':
which: ^2.0.2
"@storybook/addon-docs@6.4.21":
peerDependencies:
'@storybook/manager-webpack5': 6.5.12
"@storybook/manager-webpack5": 6.4.21
"@storybook/addon-essentials@6.4.21":
peerDependencies:
"@storybook/components": 6.4.21
"@storybook/core-events": 6.4.21
"@storybook/manager-webpack5": 6.4.21
"@storybook/theming": 6.4.21
"@storybook/core-server@6.4.21":
peerDependencies:
"@babel/core": ^7.0.0
"@storybook/core@6.4.21":
peerDependencies:
"@babel/core": ^7.0.0
"@storybook/manager-webpack5": 6.4.21
"@storybook/csf-tools@6.4.21":
peerDependencies:
"@babel/core": ^7.0.0
"@storybook/react@6.4.21":
peerDependencies:
"@storybook/manager-webpack5": 6.4.21
doctrine@3.0.0:
dependencies:
assert: 2.0.0
moveable@0.30.0:
dependencies:
"@daybrush/utils": 1.7.0
framework-utils: ^1.1.0
rc-time-picker@3.7.3:
peerDependencies:
react: 17.0.1
@@ -44,26 +49,30 @@ packageExtensions:
react-compat-css-styled@1.0.8:
dependencies:
react-simple-compat: 1.2.2
react-compat-moveable@0.18.0:
dependencies:
"@egjs/agent": ^2.2.1
"@egjs/children-differ": ^1.0.1
"@scena/matrix": 1.1.1
css-to-mat: ^1.0.3
gesto: ^1.9.0
overlap-area: ^1.0.0
react-simple-compat: 1.2.2
peerDependencies:
framework-utils: ^1.1.0
react-icons@2.2.7:
peerDependencies:
prop-types: '*'
prop-types: "*"
react-resizable@3.0.4:
peerDependencies:
react-dom: 17.0.1
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: '@yarnpkg/plugin-typescript'
spec: "@yarnpkg/plugin-typescript"
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: '@yarnpkg/plugin-interactive-tools'
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
spec: 'https://mskelton.dev/yarn-outdated/v2'
spec: "https://mskelton.dev/yarn-outdated/v2"
yarnPath: .yarn/releases/yarn-3.3.0.cjs
# Uncomment the following lines if you want to use Verdaccio local npm registry. Read more at packages/README.md
# npmScopes:
# grafana:
# npmRegistryServer: http://localhost:4873
# unsafeHttpWhitelist:
# - 'localhost'
yarnPath: .yarn/releases/yarn-3.2.3.cjs

View File

@@ -1,790 +1,3 @@
<!-- 9.4.13 START -->
# 9.4.13 (2023-06-22)
### Bug fixes
- **Auth:** Fixed CVE-2023-3128. [#70579](https://github.com/grafana/grafana/issues/70579), [@zerok](https://github.com/zerok)
<!-- 9.4.13 END -->
<!-- 9.4.12 START -->
# 9.4.12 (2023-06-06)
### Bug fixes
- **Query:** Prevent crash while executing concurrent mixed queries
- **Alerting:** Require alert.notifications:write permissions to test receivers and templates
- **RBAC:** Remove legacy AC editor and admin role on new dashboard route. [#68775](https://github.com/grafana/grafana/issues/68775), [@grafanabot](https://github.com/grafanabot)
- **Revert:** Allow editors to access GET /datasources. [#68653](https://github.com/grafana/grafana/issues/68653), [@grafanabot](https://github.com/grafanabot)
- **Explore:** Remove data source onboarding page. [#68642](https://github.com/grafana/grafana/issues/68642), [@grafanabot](https://github.com/grafanabot)
<!-- 9.4.12 END -->
<!-- 9.4.10 START -->
# 9.4.10 (2023-05-08)
### Features and enhancements
- **Chore:** Upgrade Go to 1.20.4. [#67760](https://github.com/grafana/grafana/issues/67760), [@papagian](https://github.com/papagian)
### Bug fixes
- **AzureMonitor:** Fix logs query multi-resource and timespan values. [#67931](https://github.com/grafana/grafana/issues/67931), [@grafanabot](https://github.com/grafanabot)
- **TimeSeries:** Fix leading null-fill for missing intervals. [#67572](https://github.com/grafana/grafana/issues/67572), [@leeoniya](https://github.com/leeoniya)
- **Alerting:** Fix misleading status code in provisioning API. [#67357](https://github.com/grafana/grafana/issues/67357), [@grafanabot](https://github.com/grafanabot)
- **Azure Monitor:** Fix bug that was not showing resources for certain locations. [#66617](https://github.com/grafana/grafana/issues/66617), [@grafanabot](https://github.com/grafanabot)
<!-- 9.4.10 END -->
<!-- 9.4.9 START -->
# 9.4.9 (2023-04-24)
### Features and enhancements
- **Chore:** Upgrade Go to 1.20.3. [#66836](https://github.com/grafana/grafana/issues/66836), [@sakjur](https://github.com/sakjur)
### Bug fixes
- **Expressions/threshold:** Fix incorrect thresholds args length. [#66925](https://github.com/grafana/grafana/issues/66925), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Fix share URL for Prometheus rules on subpath (#66752). [#66802](https://github.com/grafana/grafana/issues/66802), [@gillesdemey](https://github.com/gillesdemey)
- **Trace View:** Update the queryType to traceql for checking if same trace when clicking span link. [#66670](https://github.com/grafana/grafana/issues/66670), [@ericmustin](https://github.com/ericmustin)
- **Google Cloud Monitoring:** Fix project variable. [#66602](https://github.com/grafana/grafana/issues/66602), [@asimpson](https://github.com/asimpson)
- **InfluxDB:** Fix querying with hardcoded retention policy. [#66587](https://github.com/grafana/grafana/issues/66587), [@itsmylife](https://github.com/itsmylife)
- **Auth:** Remove the session cookie only if it's invalid or revoked. [#66430](https://github.com/grafana/grafana/issues/66430), [@mgyongyosi](https://github.com/mgyongyosi)
- **AccessControl:** Allow editors to access GET /api/datasources. [#66375](https://github.com/grafana/grafana/issues/66375), [@mgyongyosi](https://github.com/mgyongyosi)
- **CloudMonitoring:** Add project selector for MQL editor[fix]. [#65844](https://github.com/grafana/grafana/issues/65844), [@alyssabull](https://github.com/alyssabull)
<!-- 9.4.9 END -->
<!-- 9.4.7 START -->
# 9.4.7 (2023-03-16)
### Bug fixes
- **Alerting:** Update scheduler to receive rule updates only from database. [#64780](https://github.com/grafana/grafana/pull/64780), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Influxdb:** Re-introduce backend migration feature toggle. [#64842](https://github.com/grafana/grafana/pull/64842), [@itsmylife](https://github.com/itsmylife)
- **Security:** Fixes for CVE-2023-1410. [#65278](https://github.com/grafana/grafana/pull/65278), [@itsmylife](https://github.com/itsmylife)
### Breaking changes
The InfluxDB backend migration feature toggle (influxdbBackendMigration) has been reintroduced in this version as issues were discovered with backend processing of InfluxDB data. Unless this feature toggle is enabled, all InfluxDB data will be parsed in the frontend. This frontend processing is the default behavior.
In Grafana 9.4.4, InfluxDB data parsing started to be handled in the backend. If you have upgraded to 9.4.4 and then added new transformations on InfluxDB data, those panels will fail to render. To resolve this either:
- Remove the affected panel and re-create it
- Edit the `time` field as `Time` in `panel.json` or `dashboard.json` Issue [#64842](https://github.com/grafana/grafana/issues/64842)
<!-- 9.4.7 END -->
<!-- 9.4.3 START -->
# 9.4.3 (2023-03-02)
### Bug fixes
- **Alerting:** Use background context for maintenance function. [#64065](https://github.com/grafana/grafana/pull/64065), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Report Settings:** Fix URL validation. (Enterprise)
<!-- 9.4.3 END -->
<!-- 9.4.2 START -->
# 9.4.2 (2023-03-02)
### Bug fixes
- **Alerting:** Fix boolean default in migration from false to 0. [#63952](https://github.com/grafana/grafana/pull/63952), [@alexmobo](https://github.com/alexmobo)
<!-- 9.4.2 END -->
<!-- 9.4.1 START -->
# 9.4.1 (2023-02-28)
<!-- 9.4.1 END -->
<!-- 9.4.0 START -->
# 9.4.0 (2023-02-28)
### Features and enhancements
- **Alerting:** Add endpoint for querying state history. [#62166](https://github.com/grafana/grafana/pull/62166), [@alexweav](https://github.com/alexweav)
- **Alerting:** Add label query parameters to state history endpoint. [#62831](https://github.com/grafana/grafana/pull/62831), [@alexweav](https://github.com/alexweav)
- **Alerting:** Add static label to all state history entries. [#62817](https://github.com/grafana/grafana/pull/62817), [@alexweav](https://github.com/alexweav)
- **Alerting:** Mark AM configuration as applied. [#61330](https://github.com/grafana/grafana/pull/61330), [@santihernandezc](https://github.com/santihernandezc)
- **Azure Monitor:** Enable multiple resource queries. [#62467](https://github.com/grafana/grafana/pull/62467), [@andresmgot](https://github.com/andresmgot)
- **InfluxDB:** Move database information into jsondata. [#62308](https://github.com/grafana/grafana/pull/62308), [@itsmylife](https://github.com/itsmylife)
- **Query Caching:** Add per-panel query caching TTL. [#61968](https://github.com/grafana/grafana/pull/61968), [@mmandrus](https://github.com/mmandrus)
- **Table:** Add row number column option. [#62256](https://github.com/grafana/grafana/pull/62256), [@baldm0mma](https://github.com/baldm0mma)
- **Tempo:** Remove tempoApmTable feature flag. [#62499](https://github.com/grafana/grafana/pull/62499), [@adrapereira](https://github.com/adrapereira)
- **Transformations:** Selectively apply transformation to queries. [#61735](https://github.com/grafana/grafana/pull/61735), [@ryantxu](https://github.com/ryantxu)
### Bug fixes
- **AccessControl:** Clear user permission cache for update org user role. [#62745](https://github.com/grafana/grafana/pull/62745), [@Jguer](https://github.com/Jguer)
- **Alerting:** Fix handling of special floating-point cases when writing observed values to annotations. [#61074](https://github.com/grafana/grafana/pull/61074), [@alexweav](https://github.com/alexweav)
- **Auth:** Rotate token patch. [#62676](https://github.com/grafana/grafana/pull/62676), [@mgyongyosi](https://github.com/mgyongyosi)
- **ContextMenu:** Consider y coord when determining bottom collision. [#62403](https://github.com/grafana/grafana/pull/62403), [@gelicia](https://github.com/gelicia)
- **Elasticsearch:** Fix consistent label order in alerting. [#62497](https://github.com/grafana/grafana/pull/62497), [@gabor](https://github.com/gabor)
- **Explore:** Fix graph not updating when changing config. [#62473](https://github.com/grafana/grafana/pull/62473), [@Elfo404](https://github.com/Elfo404)
- **Heatmap:** Support heatmap rows with non-timeseries X axis. [#60929](https://github.com/grafana/grafana/pull/60929), [@ryantxu](https://github.com/ryantxu)
- **Login:** Fix panic when a user is upserted by a background process. [#62539](https://github.com/grafana/grafana/pull/62539), [@sakjur](https://github.com/sakjur)
- **MSSQL:** Add support for macro function calls. [#62742](https://github.com/grafana/grafana/pull/62742), [@mdvictor](https://github.com/mdvictor)
- **MySQL:** Quote identifiers that include special characters. [#61135](https://github.com/grafana/grafana/pull/61135), [@zoltanbedi](https://github.com/zoltanbedi)
- **Navigation:** Sign in button now works correctly when served under a sub path. [#62504](https://github.com/grafana/grafana/pull/62504), [@ashharrison90](https://github.com/ashharrison90)
- **Nested Folder:** Fix for SQLite not to overwrite the parent on restarts. [#62709](https://github.com/grafana/grafana/pull/62709), [@papagian](https://github.com/papagian)
- **PanelChrome:** Adds display mode to support transparent option. [#62647](https://github.com/grafana/grafana/pull/62647), [@torkelo](https://github.com/torkelo)
- **Plugins:** Case-sensitive routes for standalone pages. [#62779](https://github.com/grafana/grafana/pull/62779), [@leventebalogh](https://github.com/leventebalogh)
- **Plugins:** Prefer to use the data source UID when querying. [#62776](https://github.com/grafana/grafana/pull/62776), [@andresmgot](https://github.com/andresmgot)
- **SQLStore:** Fix folder migration for MySQL < 5.7. [#62521](https://github.com/grafana/grafana/pull/62521), [@papagian](https://github.com/papagian)
- **Search:** Fix not being able to clear sort value. [#62557](https://github.com/grafana/grafana/pull/62557), [@joshhunt](https://github.com/joshhunt)
- **Tempo:** Fix span name being dropped from the query. [#62257](https://github.com/grafana/grafana/pull/62257), [@CrypticSignal](https://github.com/CrypticSignal)
### Plugin development fixes & changes
- **PanelChrome:** Implement hover header. [#61774](https://github.com/grafana/grafana/pull/61774), [@kaydelaney](https://github.com/kaydelaney)
<!-- 9.4.0 END -->
<!-- 9.4.0-beta1 START -->
# 9.4.0-beta1 (2023-01-30)
### Features and enhancements
- **API:** Change how Cache-Control and related headers are set. [#62021](https://github.com/grafana/grafana/pull/62021), [@kylebrandt](https://github.com/kylebrandt)
- **AccessControl:** Add high availability support to access control seeder. (Enterprise)
- **Accessibility:** Make QueryEditorHelp examples keyboard interactive. [#59355](https://github.com/grafana/grafana/pull/59355), [@idastambuk](https://github.com/idastambuk)
- **Admin:** Combine org and admin user pages. [#59365](https://github.com/grafana/grafana/pull/59365), [@Clarity-89](https://github.com/Clarity-89)
- **Admin:** Remove navigation subheaders. [#61344](https://github.com/grafana/grafana/pull/61344), [@Clarity-89](https://github.com/Clarity-89)
- **AlertGroups:** Generate models.gen.ts from models.cue. [#61227](https://github.com/grafana/grafana/pull/61227), [@Clarity-89](https://github.com/Clarity-89)
- **Alerting:** Access query details of provisioned alerts. [#59626](https://github.com/grafana/grafana/pull/59626), [@konrad147](https://github.com/konrad147)
- **Alerting:** Add alert rule cloning action. [#59200](https://github.com/grafana/grafana/pull/59200), [@konrad147](https://github.com/konrad147)
- **Alerting:** Add dashboard and panel picker to the rule form. [#58304](https://github.com/grafana/grafana/pull/58304), [@konrad147](https://github.com/konrad147)
- **Alerting:** Add discord as a possible receiver in cloud rules. [#59366](https://github.com/grafana/grafana/pull/59366), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Add export button for exporting all alert rules in alert list view. [#62416](https://github.com/grafana/grafana/pull/62416), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Add header X-Grafana-Org-Id to evaluation requests. [#58972](https://github.com/grafana/grafana/pull/58972), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Add landing page. [#59050](https://github.com/grafana/grafana/pull/59050), [@konrad147](https://github.com/konrad147)
- **Alerting:** Add maxdatapoints in alert rule form. [#61904](https://github.com/grafana/grafana/pull/61904), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Add provisioning endpoint to fetch all rules. [#59989](https://github.com/grafana/grafana/pull/59989), [@alexweav](https://github.com/alexweav)
- **Alerting:** Add support for settings parse_mode and disable_notifications to Telegram receiver. [#60198](https://github.com/grafana/grafana/pull/60198), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Add support for tracing to alerting scheduler. [#61057](https://github.com/grafana/grafana/pull/61057), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Adds evaluation interval to group view. [#59974](https://github.com/grafana/grafana/pull/59974), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Alert rules search improvements. [#61398](https://github.com/grafana/grafana/pull/61398), [@konrad147](https://github.com/konrad147)
- **Alerting:** Allow state history to be disabled through configuration. [#61006](https://github.com/grafana/grafana/pull/61006), [@alexweav](https://github.com/alexweav)
- **Alerting:** Bump Prometheus Alertmanager to v0.25. [#60764](https://github.com/grafana/grafana/pull/60764), [@santihernandezc](https://github.com/santihernandezc)
- **Alerting:** Choose a previous valid AM configuration in case of error. [#58472](https://github.com/grafana/grafana/pull/58472), [@santihernandezc](https://github.com/santihernandezc)
- **Alerting:** Create endpoints for exporting in provisioning file format. [#58623](https://github.com/grafana/grafana/pull/58623), [@JacobsonMT](https://github.com/JacobsonMT)
- **Alerting:** Declare incident from a firing alert. [#61178](https://github.com/grafana/grafana/pull/61178), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Do not maintain Normal state. [#56336](https://github.com/grafana/grafana/pull/56336), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Improve UI for making more clear that evaluation interval belongs to the group. [#56397](https://github.com/grafana/grafana/pull/56397), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Improve legacy migration to include send reminder & frequency. [#60275](https://github.com/grafana/grafana/pull/60275), [@JacobsonMT](https://github.com/JacobsonMT)
- **Alerting:** PagerDuty receiver to let user configure fields Source, Client and Client URL. [#59895](https://github.com/grafana/grafana/pull/59895), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Recognise & change UI for OnCall notification policy + contact point. [#60259](https://github.com/grafana/grafana/pull/60259), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Rename contact point type to receiver in the user interface. [#59589](https://github.com/grafana/grafana/pull/59589), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Rule evaluator to get cached data source info. [#61305](https://github.com/grafana/grafana/pull/61305), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Support customizable timeout for screenshots. [#60981](https://github.com/grafana/grafana/pull/60981), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** UI changes required to support v3 and Auth in Kafka Contact Point. [#61123](https://github.com/grafana/grafana/pull/61123), [@MohammadGhazanfar](https://github.com/MohammadGhazanfar)
- **Alerting:** Update Alerting and Alertmanager to v0.25.1. [#61233](https://github.com/grafana/grafana/pull/61233), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Upload images to Slack via files.upload. [#59163](https://github.com/grafana/grafana/pull/59163), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Auditing/Usage Insights:** Loki support for multi-tenancy. (Enterprise)
- **Auth forwarding:** Pass tokens without refresh. [#61634](https://github.com/grafana/grafana/pull/61634), [@Jguer](https://github.com/Jguer)
- **Auth:** Add expiry date for service accounts access tokens. [#58885](https://github.com/grafana/grafana/pull/58885), [@linoman](https://github.com/linoman)
- **Auth:** Add plugin roles to RolePicker. [#59667](https://github.com/grafana/grafana/pull/59667), [@linoman](https://github.com/linoman)
- **Auth:** Add skip_org_role_sync for AzureAD OAuth. [#60322](https://github.com/grafana/grafana/pull/60322), [@eleijonmarck](https://github.com/eleijonmarck)
- **Auth:** Add skip_org_role_sync for Okta. [#62106](https://github.com/grafana/grafana/pull/62106), [@eleijonmarck](https://github.com/eleijonmarck)
- **Auth:** Add skip_org_role_sync setting for GrafanaCom. [#60553](https://github.com/grafana/grafana/pull/60553), [@eleijonmarck](https://github.com/eleijonmarck)
- **Auth:** Add skip_org_role_sync setting for github. [#61673](https://github.com/grafana/grafana/pull/61673), [@eleijonmarck](https://github.com/eleijonmarck)
- **Auth:** Add skip_org_role_sync setting to OAuth integration Google. [#61572](https://github.com/grafana/grafana/pull/61572), [@eleijonmarck](https://github.com/eleijonmarck)
- **Auth:** Add skip_org_role_sync to GitLab OAuth. [#62055](https://github.com/grafana/grafana/pull/62055), [@eleijonmarck](https://github.com/eleijonmarck)
- **Auth:** Add sub claim check to JWT Auth pre-checks. [#61417](https://github.com/grafana/grafana/pull/61417), [@mgyongyosi](https://github.com/mgyongyosi)
- **Auth:** Disable team sync for JWT Authentication. [#62191](https://github.com/grafana/grafana/pull/62191), [@eleijonmarck](https://github.com/eleijonmarck)
- **Auth:** Display id Provider label in orgs/users view. [#58033](https://github.com/grafana/grafana/pull/58033), [@linoman](https://github.com/linoman)
- **Auth:** Implement skip org role sync for jwt. [#61647](https://github.com/grafana/grafana/pull/61647), [@linoman](https://github.com/linoman)
- **Auth:** Log a more useful msg if no OAuth provider configured. [#56722](https://github.com/grafana/grafana/pull/56722), [@someone-stole-my-name](https://github.com/someone-stole-my-name)
- **Auth:** Set service account access token limit on expiry dates. [#56467](https://github.com/grafana/grafana/pull/56467), [@linoman](https://github.com/linoman)
- **Azure Monitor:** Add variable function to list regions. [#62297](https://github.com/grafana/grafana/pull/62297), [@andresmgot](https://github.com/andresmgot)
- **Backend:** Consistently use context RemoteAddr function to determine remote address. [#60201](https://github.com/grafana/grafana/pull/60201), [@DanCech](https://github.com/DanCech)
- **BarChart:** Highlight bars option for easier interaction. [#60530](https://github.com/grafana/grafana/pull/60530), [@mdvictor](https://github.com/mdvictor)
- **BarChartPanel:** Custom tooltips. [#60148](https://github.com/grafana/grafana/pull/60148), [@mdvictor](https://github.com/mdvictor)
- **Canvas:** Add server element. [#61104](https://github.com/grafana/grafana/pull/61104), [@drew08t](https://github.com/drew08t)
- **Canvas:** Add support for basic arrows. [#57561](https://github.com/grafana/grafana/pull/57561), [@nmarrs](https://github.com/nmarrs)
- **Canvas:** Add tooltip for data links. [#61648](https://github.com/grafana/grafana/pull/61648), [@adela-almasan](https://github.com/adela-almasan)
- **Canvas:** Improve placement when adding an element via context menu. [#61071](https://github.com/grafana/grafana/pull/61071), [@adela-almasan](https://github.com/adela-almasan)
- **Canvas:** Update context menu actions for multiple elements selected. [#61108](https://github.com/grafana/grafana/pull/61108), [@adela-almasan](https://github.com/adela-almasan)
- **Canvas:** Update element(s) selection after action. [#61204](https://github.com/grafana/grafana/pull/61204), [@adela-almasan](https://github.com/adela-almasan)
- **Chore:** Add deprecation warnings for Sentry. [#60165](https://github.com/grafana/grafana/pull/60165), [@domasx2](https://github.com/domasx2)
- **CloudMonitor:** Improve detail of MQL series labels. [#59747](https://github.com/grafana/grafana/pull/59747), [@aangelisc](https://github.com/aangelisc)
- **CloudWatch Logs:** Set default logs query and disable button when empty. [#61956](https://github.com/grafana/grafana/pull/61956), [@iwysiu](https://github.com/iwysiu)
- **CloudWatch:** Add CloudWatchSynthetics dimension. [#60832](https://github.com/grafana/grafana/pull/60832), [@jangaraj](https://github.com/jangaraj)
- **CloudWatch:** Add MaxProvisionedTableReadCapacityUtilization AWS/DynamoDB metric name. [#60829](https://github.com/grafana/grafana/pull/60829), [@jangaraj](https://github.com/jangaraj)
- **CloudWatch:** Add RDS dimension. [#61027](https://github.com/grafana/grafana/pull/61027), [@jangaraj](https://github.com/jangaraj)
- **CloudWatch:** Add macro for resolving period in SEARCH expressions. [#60435](https://github.com/grafana/grafana/pull/60435), [@sunker](https://github.com/sunker)
- **Cloudwatch:** Add feedback labels to log groups selector. [#60619](https://github.com/grafana/grafana/pull/60619), [@sunker](https://github.com/sunker)
- **Cloudwatch:** Add run query button. [#60089](https://github.com/grafana/grafana/pull/60089), [@sunker](https://github.com/sunker)
- **Cloudwatch:** Add support for template variables in new log group picker. [#61243](https://github.com/grafana/grafana/pull/61243), [@sunker](https://github.com/sunker)
- **Cloudwatch:** Define and use getDefaultquery instead of calling onChange on mount. [#60221](https://github.com/grafana/grafana/pull/60221), [@idastambuk](https://github.com/idastambuk)
- **Cloudwatch:** Refactor log group model. [#60873](https://github.com/grafana/grafana/pull/60873), [@sunker](https://github.com/sunker)
- **Cloudwatch:** Set CloudwatchCrossAccountQuery feature to stable. [#62348](https://github.com/grafana/grafana/pull/62348), [@sarahzinger](https://github.com/sarahzinger)
- **Cloudwatch:** Use new log group picker also for non cross-account queries. [#60913](https://github.com/grafana/grafana/pull/60913), [@sunker](https://github.com/sunker)
- **CommandPalette:** Improve section header styling. [#61584](https://github.com/grafana/grafana/pull/61584), [@joshhunt](https://github.com/joshhunt)
- **CommandPalette:** Minor usability improvements. [#61567](https://github.com/grafana/grafana/pull/61567), [@joshhunt](https://github.com/joshhunt)
- **CommandPalette:** Search for dashboards using API. [#61090](https://github.com/grafana/grafana/pull/61090), [@joshhunt](https://github.com/joshhunt)
- **Config:** Support JSON list syntax. [#61288](https://github.com/grafana/grafana/pull/61288), [@alexanderzobnin](https://github.com/alexanderzobnin)
- **DataLinks:** Allow providing a dynamic data link builder. [#60452](https://github.com/grafana/grafana/pull/60452), [@dprokop](https://github.com/dprokop)
- **DataProxy:** Populate X-Grafana-Referer header. [#60040](https://github.com/grafana/grafana/pull/60040), [@neilfordyce](https://github.com/neilfordyce)
- **Database:** Adds support for enable/disable SQLite Write-Ahead Logging (WAL) via configuration. [#58268](https://github.com/grafana/grafana/pull/58268), [@marefr](https://github.com/marefr)
- **Dataplane:** Deprecate timeseries-many in favor of timeseries-multi. [#59070](https://github.com/grafana/grafana/pull/59070), [@bohandley](https://github.com/bohandley)
- **Datasource settings:** Add deprecation notice for database field. [#58647](https://github.com/grafana/grafana/pull/58647), [@zoltanbedi](https://github.com/zoltanbedi)
- **Datasources:** Add support for getDetDefaultQuery in variable editor. [#62026](https://github.com/grafana/grafana/pull/62026), [@idastambuk](https://github.com/idastambuk)
- **Devenv:** OpenLDAP-Mac improvements. [#60229](https://github.com/grafana/grafana/pull/60229), [@mgyongyosi](https://github.com/mgyongyosi)
- **Docs:** Rename Message templates to Notification templates. [#59477](https://github.com/grafana/grafana/pull/59477), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Docs:** Unified Alerting is now compatible with AWS Aurora. [#61001](https://github.com/grafana/grafana/pull/61001), [@alexweav](https://github.com/alexweav)
- **Elastic:** Remove experimental tag from v8.0+. [#61359](https://github.com/grafana/grafana/pull/61359), [@gwdawson](https://github.com/gwdawson)
- **Elasticsearch:** Deprecate raw document mode. [#62236](https://github.com/grafana/grafana/pull/62236), [@gabor](https://github.com/gabor)
- **Elasticsearch:** Support nested aggregation. [#62301](https://github.com/grafana/grafana/pull/62301), [@gabor](https://github.com/gabor)
- **Email:** Use MJML email template. (Enterprise)
- **Email:** Use MJML email templates. [#57751](https://github.com/grafana/grafana/pull/57751), [@gillesdemey](https://github.com/gillesdemey)
- **Explore:** Add feature to open log sample in split view. [#62097](https://github.com/grafana/grafana/pull/62097), [@ivanahuckova](https://github.com/ivanahuckova)
- **Explore:** Enable resize of split pane. [#58683](https://github.com/grafana/grafana/pull/58683), [@gelicia](https://github.com/gelicia)
- **Explore:** Implement logs sample in Explore. [#61864](https://github.com/grafana/grafana/pull/61864), [@ivanahuckova](https://github.com/ivanahuckova)
- **Explore:** Keyboard shortcut to go to explore. [#61837](https://github.com/grafana/grafana/pull/61837), [@torkelo](https://github.com/torkelo)
- **Explore:** Notify when compact URL is used. [#58684](https://github.com/grafana/grafana/pull/58684), [@gelicia](https://github.com/gelicia)
- **Explore:** Use Datasource Onboarding page when visiting without any datasource set up. [#60399](https://github.com/grafana/grafana/pull/60399), [@Elfo404](https://github.com/Elfo404)
- **FileDropzone:** Format the file size limit in the error message when the max file size is exceeded (1000 => 1 kB). [#62290](https://github.com/grafana/grafana/pull/62290), [@oscarkilhed](https://github.com/oscarkilhed)
- **Flame graph:** Search with uFuzzy. [#61748](https://github.com/grafana/grafana/pull/61748), [@joey-grafana](https://github.com/joey-grafana)
- **GRPC Server:** Add query service. [#55781](https://github.com/grafana/grafana/pull/55781), [@toddtreece](https://github.com/toddtreece)
- **Geomap panel:** Generate types. [#61636](https://github.com/grafana/grafana/pull/61636), [@Clarity-89](https://github.com/Clarity-89)
- **Geomap:** Add color gradients to route layer. [#59062](https://github.com/grafana/grafana/pull/59062), [@drew08t](https://github.com/drew08t)
- **Glue:** Validate target query in correlations page. [#57245](https://github.com/grafana/grafana/pull/57245), [@L-M-K-B](https://github.com/L-M-K-B)
- **Heatmap:** Remove legacy angular based implementation. [#59249](https://github.com/grafana/grafana/pull/59249), [@ryantxu](https://github.com/ryantxu)
- **InfluxDB:** Send retention policy with InfluxQL queries if its been specified. [#62149](https://github.com/grafana/grafana/pull/62149), [@brettbuddin](https://github.com/brettbuddin)
- **Influxdb:** Remove backend migration feature toggle. [#61308](https://github.com/grafana/grafana/pull/61308), [@itsmylife](https://github.com/itsmylife)
- **Internationalization:** Translate page headers and Search dashboard actions. [#60727](https://github.com/grafana/grafana/pull/60727), [@TaitChan](https://github.com/TaitChan)
- **LDAP:** Make LDAP attribute mapping case-insensitive. [#58992](https://github.com/grafana/grafana/pull/58992), [@markkrj](https://github.com/markkrj)
- **LoginAttempts:** Reset attempts on successfull password reset. [#59215](https://github.com/grafana/grafana/pull/59215), [@kalleep](https://github.com/kalleep)
- **Logs Panel:** Add support for keyboard interactions with log lines. [#60561](https://github.com/grafana/grafana/pull/60561), [@matyax](https://github.com/matyax)
- **Logs:** Add possibility to download logs in JSON format. [#61394](https://github.com/grafana/grafana/pull/61394), [@svennergr](https://github.com/svennergr)
- **Logs:** Make `no logs found` text more visible in Explore. [#61651](https://github.com/grafana/grafana/pull/61651), [@svennergr](https://github.com/svennergr)
- **Logs:** Unify detected fields and labels in Log Details. [#60448](https://github.com/grafana/grafana/pull/60448), [@svennergr](https://github.com/svennergr)
- **Loki Autocomplete:** Suggest only possible labels for unwrap. [#61411](https://github.com/grafana/grafana/pull/61411), [@matyax](https://github.com/matyax)
- **Loki Editor Autocomplete:** Suggest unique history items. [#60262](https://github.com/grafana/grafana/pull/60262), [@matyax](https://github.com/matyax)
- **Loki Query Editor:** Add support to display query parsing errors to users. [#59427](https://github.com/grafana/grafana/pull/59427), [@matyax](https://github.com/matyax)
- **Loki Query Editor:** Autocompletion and suggestions improvements (unwrap, parser, extracted labels). [#59103](https://github.com/grafana/grafana/pull/59103), [@matyax](https://github.com/matyax)
- **Loki Query Editor:** Update history items with successive queries. [#60327](https://github.com/grafana/grafana/pull/60327), [@matyax](https://github.com/matyax)
- **Loki:** Add format explanation to regex operations. [#60518](https://github.com/grafana/grafana/pull/60518), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Add hints for query filters. [#60293](https://github.com/grafana/grafana/pull/60293), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Add improvements to loki label browser. [#59387](https://github.com/grafana/grafana/pull/59387), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Change format of query builder hints. [#60228](https://github.com/grafana/grafana/pull/60228), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Make label browser accessible in query builder. [#58525](https://github.com/grafana/grafana/pull/58525), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Push support for multi-tenancy mode. [#60866](https://github.com/grafana/grafana/pull/60866), [@joanlopez](https://github.com/joanlopez)
- **Loki:** Remove raw query toggle. [#59125](https://github.com/grafana/grafana/pull/59125), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Rename "explain" toggle to "explain query". [#61150](https://github.com/grafana/grafana/pull/61150), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Set custom width for modals in the loki query editor. [#59714](https://github.com/grafana/grafana/pull/59714), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Show configured log line limit. [#61291](https://github.com/grafana/grafana/pull/61291), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Show query size approximation. [#62109](https://github.com/grafana/grafana/pull/62109), [@gwdawson](https://github.com/gwdawson)
- **Middleware:** Add Custom Headers to HTTP responses. [#59018](https://github.com/grafana/grafana/pull/59018), [@jcalisto](https://github.com/jcalisto)
- **Navigation:** Open command palette from search box. [#61667](https://github.com/grafana/grafana/pull/61667), [@joshhunt](https://github.com/joshhunt)
- **NodeGraph:** Allow usage with single dataframe. [#58448](https://github.com/grafana/grafana/pull/58448), [@aocenas](https://github.com/aocenas)
- **OAuth:** Support pagination for GitHub orgs. [#58648](https://github.com/grafana/grafana/pull/58648), [@sdague](https://github.com/sdague)
- **PanelChrome:** Allow panel to be dragged if set as draggable from the outside. [#61698](https://github.com/grafana/grafana/pull/61698), [@axelavargas](https://github.com/axelavargas)
- **PanelChrome:** Refactor and refine items next to title. [#60514](https://github.com/grafana/grafana/pull/60514), [@axelavargas](https://github.com/axelavargas)
- **PanelRenderer:** Interpolate variables in applyFieldOverrides. [#59844](https://github.com/grafana/grafana/pull/59844), [@connorlindsey](https://github.com/connorlindsey)
- **Performance:** Preallocate slices. [#61580](https://github.com/grafana/grafana/pull/61580), [@peakle](https://github.com/peakle)
- **Phlare:** Reset flame graph after query is run. [#59609](https://github.com/grafana/grafana/pull/59609), [@joey-grafana](https://github.com/joey-grafana)
- **Phlare:** Transition from LogQL/PromQL to Phlare should keep the query. [#60217](https://github.com/grafana/grafana/pull/60217), [@joey-grafana](https://github.com/joey-grafana)
- **Plugins:** Add file permission error check when attempting to verify plugin signature. [#61860](https://github.com/grafana/grafana/pull/61860), [@wbrowne](https://github.com/wbrowne)
- **Plugins:** Automatically forward plugin request HTTP headers in outgoing HTTP requests. [#60417](https://github.com/grafana/grafana/pull/60417), [@marefr](https://github.com/marefr)
- **Plugins:** Forward user header (X-Grafana-User) in backend plugin requests. [#58646](https://github.com/grafana/grafana/pull/58646), [@marefr](https://github.com/marefr)
- **Plugins:** Pass through dashboard/contextual HTTP headers to plugins/datasources. [#60301](https://github.com/grafana/grafana/pull/60301), [@GiedriusS](https://github.com/GiedriusS)
- **Plugins:** Refactor forward of cookies, OAuth token and header modifications by introducing client middlewares. [#58132](https://github.com/grafana/grafana/pull/58132), [@marefr](https://github.com/marefr)
- **Plugins:** Remove connection/hop-by-hop request/response headers for call resource. [#60077](https://github.com/grafana/grafana/pull/60077), [@marefr](https://github.com/marefr)
- **Plugins:** Unsigned chromium file should not invalidate signature for Renderer plugin. [#59104](https://github.com/grafana/grafana/pull/59104), [@wbrowne](https://github.com/wbrowne)
- **Preferences:** Add pagination to org configuration page. [#60896](https://github.com/grafana/grafana/pull/60896), [@alexanderzobnin](https://github.com/alexanderzobnin)
- **Preferences:** Add theme preference to match system theme. [#61986](https://github.com/grafana/grafana/pull/61986), [@joshhunt](https://github.com/joshhunt)
- **Prometheus:** Kickstart your query, formerly query patterns. [#60718](https://github.com/grafana/grafana/pull/60718), [@bohandley](https://github.com/bohandley)
- **Prometheus:** New instant query results view in Explore. [#60479](https://github.com/grafana/grafana/pull/60479), [@gtk-grafana](https://github.com/gtk-grafana)
- **Prometheus:** Remove buffered client and feature toggle related to it. [#59898](https://github.com/grafana/grafana/pull/59898), [@itsmylife](https://github.com/itsmylife)
- **Public Dashboards:** Time range for public dashboard in NavToolbar. [#60689](https://github.com/grafana/grafana/pull/60689), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** A unique page for public dashboards. [#60744](https://github.com/grafana/grafana/pull/60744), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Add react-hook-form for Public Dashboard modal. [#60249](https://github.com/grafana/grafana/pull/60249), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Add share column to public dashboards table. [#61102](https://github.com/grafana/grafana/pull/61102), [@owensmallwood](https://github.com/owensmallwood)
- **PublicDashboards:** Adds middleware for email sharing. (Enterprise)
- **PublicDashboards:** Adds tables and models for email sharing. (Enterprise)
- **PublicDashboards:** Checkboxes list refactor. [#61947](https://github.com/grafana/grafana/pull/61947), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Create API for sharing by email. (Enterprise)
- **PublicDashboards:** Enterprise service skeleton for public dashboards with feature flag. (Enterprise)
- **PublicDashboards:** Modal warns when using unsupported datasources. [#58926](https://github.com/grafana/grafana/pull/58926), [@owensmallwood](https://github.com/owensmallwood)
- **PublicDashboards:** Page to request access to protected pubdash. (Enterprise)
- **PublicDashboards:** Remove unnecessary css style in Audit Table. [#60546](https://github.com/grafana/grafana/pull/60546), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Revert Time range setting added. [#60698](https://github.com/grafana/grafana/pull/60698), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Time range conditionally shown. [#60425](https://github.com/grafana/grafana/pull/60425), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Time range setting added. [#60487](https://github.com/grafana/grafana/pull/60487), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Time range settings. [#61585](https://github.com/grafana/grafana/pull/61585), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Time range switch added. [#60257](https://github.com/grafana/grafana/pull/60257), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Time range wording changed. [#60473](https://github.com/grafana/grafana/pull/60473), [@juanicabanas](https://github.com/juanicabanas)
- **RBAC:** Add an endpoint to search through assignments. (Enterprise)
- **RBAC:** Add config option to reset basic roles on start up. [#59598](https://github.com/grafana/grafana/pull/59598), [@gamab](https://github.com/gamab)
- **RBAC:** Add config option to reset basic roles on start up. (Enterprise)
- **RBAC:** Add permission to get usage report preview. [#61570](https://github.com/grafana/grafana/pull/61570), [@alexanderzobnin](https://github.com/alexanderzobnin)
- **RBAC:** Permission check performance improvements for the new search. [#60729](https://github.com/grafana/grafana/pull/60729), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **RBAC:** Register plugin permissions's action and its accepted scopes. (Enterprise)
- **RBAC:** Runtime plugin role registration and update. (Enterprise)
- **Report Settings:** Add UI to upload logo files. (Enterprise)
- **Reporting:** Allow to upload report branding images. (Enterprise)
- **RolePicker:** Align groupHeader to the list items horizontally. [#61060](https://github.com/grafana/grafana/pull/61060), [@mgyongyosi](https://github.com/mgyongyosi)
- **SAML:** Support auto login. [#61685](https://github.com/grafana/grafana/pull/61685), [@alexanderzobnin](https://github.com/alexanderzobnin)
- **SMTP:** Update SMTP TemplatesPatterns to do an 'or' filter instead of 'and'. [#61421](https://github.com/grafana/grafana/pull/61421), [@mmandrus](https://github.com/mmandrus)
- **SQL Datasources:** Move database setting to jsonData. [#58649](https://github.com/grafana/grafana/pull/58649), [@zoltanbedi](https://github.com/zoltanbedi)
- **SQL Datasources:** Use health check for config test. [#59867](https://github.com/grafana/grafana/pull/59867), [@zoltanbedi](https://github.com/zoltanbedi)
- **SQL:** Return no data response when no rows returned. [#59121](https://github.com/grafana/grafana/pull/59121), [@zoltanbedi](https://github.com/zoltanbedi)
- **Search:** Remember sorting preference between visits. [#62248](https://github.com/grafana/grafana/pull/62248), [@joshhunt](https://github.com/joshhunt)
- **Segment:** Individual segments are now keyboard accessible. [#60555](https://github.com/grafana/grafana/pull/60555), [@ashharrison90](https://github.com/ashharrison90)
- **Server:** Switch from separate server & cli to a unified grafana binary. [#58286](https://github.com/grafana/grafana/pull/58286), [@DanCech](https://github.com/DanCech)
- **SharePDF:** Add zoom select. (Enterprise)
- **Slugify:** Replace gosimple/slug with a simple function. [#59517](https://github.com/grafana/grafana/pull/59517), [@ryantxu](https://github.com/ryantxu)
- **Snapshots:** Add snapshot enable config. [#61587](https://github.com/grafana/grafana/pull/61587), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **Table Panel:** Refactor Cell Options to Allow for Options per Cell Type. [#59363](https://github.com/grafana/grafana/pull/59363), [@codeincarnate](https://github.com/codeincarnate)
- **Table panel:** Use link elements instead of div elements with on click events to aid with keyboard accessibility. [#59393](https://github.com/grafana/grafana/pull/59393), [@oscarkilhed](https://github.com/oscarkilhed)
- **TablePanel:** Improve and align table styles with the rest of Grafana. [#60365](https://github.com/grafana/grafana/pull/60365), [@torkelo](https://github.com/torkelo)
- **Teams:** Support paginating and filtering more then 1000 teams. [#58761](https://github.com/grafana/grafana/pull/58761), [@kalleep](https://github.com/kalleep)
- **Teams:** Use generated TS types. [#60618](https://github.com/grafana/grafana/pull/60618), [@Clarity-89](https://github.com/Clarity-89)
- **Tempo:** Trace to logs custom query with interpolation. [#61702](https://github.com/grafana/grafana/pull/61702), [@aocenas](https://github.com/aocenas)
- **Tempo:** Update column width for Loki search. [#61924](https://github.com/grafana/grafana/pull/61924), [@joey-grafana](https://github.com/joey-grafana)
- **Tempo:** Update docs and default Tempo metrics query. [#62185](https://github.com/grafana/grafana/pull/62185), [@joey-grafana](https://github.com/joey-grafana)
- **TestDatasource:** Add scenario for generating trace data. [#59299](https://github.com/grafana/grafana/pull/59299), [@aocenas](https://github.com/aocenas)
- **TextPanel:** Refactor to functional component. [#60885](https://github.com/grafana/grafana/pull/60885), [@ryantxu](https://github.com/ryantxu)
- **Theme:** Use `Inter` font by default. [#59544](https://github.com/grafana/grafana/pull/59544), [@ashharrison90](https://github.com/ashharrison90)
- **Trace View:** Disallow a span colour that is the same or looks similar to previous colour. [#58146](https://github.com/grafana/grafana/pull/58146), [@joey-grafana](https://github.com/joey-grafana)
- **Tracing:** Add keyboard accessibility to SpanDetailRow. [#59412](https://github.com/grafana/grafana/pull/59412), [@joey-grafana](https://github.com/joey-grafana)
- **Transformations:** Add context parameter to transformDataFrame and operators. [#60694](https://github.com/grafana/grafana/pull/60694), [@torkelo](https://github.com/torkelo)
- **Transformations:** Extract JSON Paths. [#59400](https://github.com/grafana/grafana/pull/59400), [@NiklasCi](https://github.com/NiklasCi)
- **Transformations:** Grouping to matrix empty value option. [#55591](https://github.com/grafana/grafana/pull/55591), [@hugo082](https://github.com/hugo082)
- **UsageInsights:** Record events for Explore queries. [#59931](https://github.com/grafana/grafana/pull/59931), [@daniellee](https://github.com/daniellee)
- **Variables:** Support for colons in time variables custom format. [#61404](https://github.com/grafana/grafana/pull/61404), [@yesoreyeram](https://github.com/yesoreyeram)
### Bug fixes
- **Alerting:** Fix ConditionsCmd No Data for "has no value". [#58634](https://github.com/grafana/grafana/pull/58634), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Fix evaluation timeout. [#61303](https://github.com/grafana/grafana/pull/61303), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Redo refactoring from reverted fix in #56812. [#61051](https://github.com/grafana/grafana/pull/61051), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Set Dashboard and Panel IDs on rule group replacement. [#60374](https://github.com/grafana/grafana/pull/60374), [@alexmobo](https://github.com/alexmobo)
- **Alerting:** Store alertmanager configuration history in a separate table in the database. [#60197](https://github.com/grafana/grafana/pull/60197), [@alexweav](https://github.com/alexweav)
- **Azure Monitor:** Fix health check for empty default subscription. [#60569](https://github.com/grafana/grafana/pull/60569), [@andresmgot](https://github.com/andresmgot)
- **Barchart:** Fix erroneous tooltip value. [#61455](https://github.com/grafana/grafana/pull/61455), [@mdvictor](https://github.com/mdvictor)
- **Candlestick:** Fix showing hidden legend values. [#60971](https://github.com/grafana/grafana/pull/60971), [@zoltanbedi](https://github.com/zoltanbedi)
- **CloudWatch:** Fix logs insights deeplink. [#59906](https://github.com/grafana/grafana/pull/59906), [@fridgepoet](https://github.com/fridgepoet)
- **Cloudmonitor:** Refactor query builder. [#61410](https://github.com/grafana/grafana/pull/61410), [@aangelisc](https://github.com/aangelisc)
- **Command Palette:** Links now work when grafana is served under a subpath. [#60033](https://github.com/grafana/grafana/pull/60033), [@ashharrison90](https://github.com/ashharrison90)
- **CommandPalette:** Fix long dashboard names freezing the browser. [#61278](https://github.com/grafana/grafana/pull/61278), [@joshhunt](https://github.com/joshhunt)
- **DataFrame:** Add explicit histogram frame type. [#61195](https://github.com/grafana/grafana/pull/61195), [@leeoniya](https://github.com/leeoniya)
- **Dropdown:** Make escape close a dropdown. [#62098](https://github.com/grafana/grafana/pull/62098), [@ashharrison90](https://github.com/ashharrison90)
- **Explore:** Fix a11y issue with show all series button in Graph. [#58943](https://github.com/grafana/grafana/pull/58943), [@Elfo404](https://github.com/Elfo404)
- **Explore:** Fixes explore page height and margin issues. [#59865](https://github.com/grafana/grafana/pull/59865), [@torkelo](https://github.com/torkelo)
- **Explore:** Re-initialize graph when number of series to show changes. [#60499](https://github.com/grafana/grafana/pull/60499), [@Elfo404](https://github.com/Elfo404)
- **Fix:** Unlocking the UI for AuthProxy users. [#59507](https://github.com/grafana/grafana/pull/59507), [@gamab](https://github.com/gamab)
- **GrafanaUI:** Checkbox description fix. [#61929](https://github.com/grafana/grafana/pull/61929), [@juanicabanas](https://github.com/juanicabanas)
- **LDAP:** Disable user in case it has been removed from LDAP directory. [#60231](https://github.com/grafana/grafana/pull/60231), [@mgyongyosi](https://github.com/mgyongyosi)
- **LibraryPanels:** Fix issue where viewer with folder edit permissions could not update library panel. [#58420](https://github.com/grafana/grafana/pull/58420), [@kaydelaney](https://github.com/kaydelaney)
- **Loki Query Builder:** Fix bug parsing range params. [#61678](https://github.com/grafana/grafana/pull/61678), [@matyax](https://github.com/matyax)
- **MultiSelect:** Fix `actionMeta` not available in `onChange` callback. [#62339](https://github.com/grafana/grafana/pull/62339), [@svennergr](https://github.com/svennergr)
- **Navigation:** Fix finding the active nav item for plugins. [#62123](https://github.com/grafana/grafana/pull/62123), [@leventebalogh](https://github.com/leventebalogh)
- **PanelChrome:** Allow hovering on description when status error is visible. [#61757](https://github.com/grafana/grafana/pull/61757), [@ivanortegaalba](https://github.com/ivanortegaalba)
- **PanelEditor:** Fixes issue where panel edit would show the panel plugin options of the previous edit panel. [#59861](https://github.com/grafana/grafana/pull/59861), [@torkelo](https://github.com/torkelo)
- **PublicDashboards:** Footer alignment fix for Firefox browser. [#62108](https://github.com/grafana/grafana/pull/62108), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Footer position fix. [#61954](https://github.com/grafana/grafana/pull/61954), [@juanicabanas](https://github.com/juanicabanas)
- **RBAC:** Fix DeleteUserPermissions not being called on Upsert org sync. [#60531](https://github.com/grafana/grafana/pull/60531), [@Jguer](https://github.com/Jguer)
- **RBAC:** Handle edge case where there is duplicated acl entries for a role on a single dashboard. [#58079](https://github.com/grafana/grafana/pull/58079), [@kalleep](https://github.com/kalleep)
- **Resource Query Cache:** Do not store 207 status codes. (Enterprise)
- **SAML:** Do not register SAML support bundle collector when SAML is disabled. (Enterprise)
- **SSE:** Fix math expression to support NoData results. [#61721](https://github.com/grafana/grafana/pull/61721), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Security:** Fix XSS in runbook URL. [#59540](https://github.com/grafana/grafana/pull/59540), [@dsotirakis](https://github.com/dsotirakis)
- **TimeSeries:** Better y-axis ticks for IEC units. [#59984](https://github.com/grafana/grafana/pull/59984), [@leeoniya](https://github.com/leeoniya)
- **TimeSeries:** Fix rendering when zooming to time ranges between datapoints. [#59444](https://github.com/grafana/grafana/pull/59444), [@leeoniya](https://github.com/leeoniya)
- **TimeSeries:** Fix y-axis Yes/No and On/Off boolean units. [#61207](https://github.com/grafana/grafana/pull/61207), [@leeoniya](https://github.com/leeoniya)
- **Traces:** Fix for multiple $\_\_tags in trace to metrics. [#59641](https://github.com/grafana/grafana/pull/59641), [@joey-grafana](https://github.com/joey-grafana)
- **Variables:** Allow user to filter values in dropdown using white space. [#60622](https://github.com/grafana/grafana/pull/60622), [@yusuf-multhan](https://github.com/yusuf-multhan)
### Breaking changes
Removes the non-functional feature toggle `influxdbBackendMigration`. InfluxDB is working %100 with server access mode. You can keep using your dashboards, and data sources as you have been using. This won't affect them. If you are upgrading from older versions of Grafana please be sure to check your dashboard config and check for warnings. Issue [#61308](https://github.com/grafana/grafana/issues/61308)
Removes support for "detected fields" in the details of a log line, however all supported interactions (filter, statistics, visibility) are now supported for all fields. If you are using Loki you can get those fields back by using a parser operation like `logfmt` or `json`.
Issue [#60448](https://github.com/grafana/grafana/issues/60448)
### Deprecations
In the elasticsearch data source, the "Raw document" display mode is deprecated. We recommend using the "Raw Data" mode instead. Issue [#62236](https://github.com/grafana/grafana/issues/62236)
Sentry frontend logging provider will be removed with next major version. Issue [#60165](https://github.com/grafana/grafana/issues/60165)
### Plugin development fixes & changes
- **FileDropzone:** Display max file size. [#62334](https://github.com/grafana/grafana/pull/62334), [@oscarkilhed](https://github.com/oscarkilhed)
- **Chore:** Bump d3-color to 3.1.0. [#61609](https://github.com/grafana/grafana/pull/61609), [@jackw](https://github.com/jackw)
- **UI/Alert:** Infer the `role` property based on the `severity`. [#61242](https://github.com/grafana/grafana/pull/61242), [@leventebalogh](https://github.com/leventebalogh)
- **PanelChrome:** Menu is wrapped in a render prop for full outside control. [#60537](https://github.com/grafana/grafana/pull/60537), [@polibb](https://github.com/polibb)
- **Toolkit:** Deprecate all plugin related commands. [#60290](https://github.com/grafana/grafana/pull/60290), [@academo](https://github.com/academo)
- **Grafana UI:** Add experimental InteractiveTable component. [#58223](https://github.com/grafana/grafana/pull/58223), [@Elfo404](https://github.com/Elfo404)
<!-- 9.4.0-beta1 END -->
<!-- 9.3.6 START -->
# 9.3.6 (2023-01-26)
### Bug fixes
- **QueryEditorRow:** Fixes issue loading query editor when data source variable selected. [#61927](https://github.com/grafana/grafana/pull/61927), [@torkelo](https://github.com/torkelo)
<!-- 9.3.6 END -->
<!-- 9.3.4 START -->
# 9.3.4 (2023-01-25)
### Features and enhancements
- **Prometheus:** Add default editor configuration. [#61510](https://github.com/grafana/grafana/pull/61510), [@itsmylife](https://github.com/itsmylife)
- **TextPanel:** Refactor to functional component (#60885). [#61937](https://github.com/grafana/grafana/pull/61937), [@ryantxu](https://github.com/ryantxu)
### Bug fixes
- **Alerting:** Fix webhook to use correct key for decrypting token. [#61717](https://github.com/grafana/grafana/pull/61717), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Set error annotation on EvaluationError regardless of underlying error type. [#61506](https://github.com/grafana/grafana/pull/61506), [@alexweav](https://github.com/alexweav)
- **Datasources:** Fix Proxy by UID Failing for UIDs with a Hyphen. [#61723](https://github.com/grafana/grafana/pull/61723), [@csmarchbanks](https://github.com/csmarchbanks)
- **Elasticsearch:** Fix creating of span link with no tags. [#61753](https://github.com/grafana/grafana/pull/61753), [@ivanahuckova](https://github.com/ivanahuckova)
- **Elasticsearch:** Fix failing requests when using SigV4. [#61923](https://github.com/grafana/grafana/pull/61923), [@svennergr](https://github.com/svennergr)
- **Elasticsearch:** Fix toggle-settings are not shown correctly. [#61751](https://github.com/grafana/grafana/pull/61751), [@svennergr](https://github.com/svennergr)
- **Explore:** Be sure time range key bindings are mounted after clear. [#61892](https://github.com/grafana/grafana/pull/61892), [@gelicia](https://github.com/gelicia)
- **Explore:** Unsync time ranges when a pane is closed. [#61369](https://github.com/grafana/grafana/pull/61369), [@Elfo404](https://github.com/Elfo404)
- **Logs:** Lines with long words do not break properly. [#61707](https://github.com/grafana/grafana/pull/61707), [@svennergr](https://github.com/svennergr)
- **Loki:** Fix misaligned derived fields settings. [#61475](https://github.com/grafana/grafana/pull/61475), [@svennergr](https://github.com/svennergr)
- **Query Builder:** Fix max width of input component to prevent overflows. [#61798](https://github.com/grafana/grafana/pull/61798), [@matyax](https://github.com/matyax)
- **Search:** Auto focus input elements. [#61443](https://github.com/grafana/grafana/pull/61443), [@ryantxu](https://github.com/ryantxu)
- **Search:** Fix empty folder message showing when by starred dashboards. [#61610](https://github.com/grafana/grafana/pull/61610), [@eledobleefe](https://github.com/eledobleefe)
- **Table Panel:** Fix image of image cell overflowing table cell and cells ignoring text alignment setting when a data link is added. [#59392](https://github.com/grafana/grafana/pull/59392), [@oscarkilhed](https://github.com/oscarkilhed)
<!-- 9.3.4 END -->
<!-- 9.3.2 START -->
# 9.3.2 (2023-12-13)
### Features and enhancements
- **Graphite:** Process multiple queries to Graphite plugin. [#59608](https://github.com/grafana/grafana/pull/59608), [@mmandrus](https://github.com/mmandrus)
### Bug fixes
- **API:** Fix delete user failure due to quota not enabled. [#59875](https://github.com/grafana/grafana/pull/59875), [@papagian](https://github.com/papagian)
- **Accessibility:** Improved keyboard accessibility in BarGauge. [#59382](https://github.com/grafana/grafana/pull/59382), [@lpskdl](https://github.com/lpskdl)
- **Accessibility:** Improved keyboard accessibility in BigValue. [#59830](https://github.com/grafana/grafana/pull/59830), [@lpskdl](https://github.com/lpskdl)
- **Alerting:** Use the QuotaTargetSrv instead of the QuotaTarget in quota check. [#60026](https://github.com/grafana/grafana/pull/60026), [@joeblubaugh](https://github.com/joeblubaugh)
- **AzureMonitor:** Automate location retrieval. [#59602](https://github.com/grafana/grafana/pull/59602), [@aangelisc](https://github.com/aangelisc)
- **AzureMonitor:** Fix bad request when setting dimensions. [#59700](https://github.com/grafana/grafana/pull/59700), [@andresmgot](https://github.com/andresmgot)
- **BarChart:** Fix value mappings. [#60066](https://github.com/grafana/grafana/pull/60066), [@leeoniya](https://github.com/leeoniya)
- **Build:** Streamline and sync dockerfiles. [#58101](https://github.com/grafana/grafana/pull/58101), [@DanCech](https://github.com/DanCech)
- **Build:** Unified dockerfile for all builds. [#59173](https://github.com/grafana/grafana/pull/59173), [@DanCech](https://github.com/DanCech)
- **CloudWatch:** Fix - make sure dimensions are propagated to alert query editor. [#58281](https://github.com/grafana/grafana/pull/58281), [@conorevans](https://github.com/conorevans)
- **Cloudwatch:** Fix deeplink with default region (#60260). [#60274](https://github.com/grafana/grafana/pull/60274), [@iwysiu](https://github.com/iwysiu)
- **Command Palette:** Fix not being able to type if triggered whilst another modal is open. [#59728](https://github.com/grafana/grafana/pull/59728), [@ashharrison90](https://github.com/ashharrison90)
- **Command Palette:** Maintain page state when changing theme. [#59787](https://github.com/grafana/grafana/pull/59787), [@ashharrison90](https://github.com/ashharrison90)
- **Dashboards:** Fix 'Make Editable' button not working in Dashboard Settings. [#60306](https://github.com/grafana/grafana/pull/60306), [@joshhunt](https://github.com/joshhunt)
- **Dashboards:** Show error when data source is missing. [#60099](https://github.com/grafana/grafana/pull/60099), [@joshhunt](https://github.com/joshhunt)
- **Datasource:** Fix - apply default query also to queries in new panels. [#59625](https://github.com/grafana/grafana/pull/59625), [@sunker](https://github.com/sunker)
- **Dropdown:** Menu now closes correctly when selecting options on touch devices. [#60181](https://github.com/grafana/grafana/pull/60181), [@ashharrison90](https://github.com/ashharrison90)
- **Influx:** Query segment menus now position correctly near the bottom of the screen. [#60087](https://github.com/grafana/grafana/pull/60087), [@ashharrison90](https://github.com/ashharrison90)
- **Login:** Fix failure to login a new user via an external provider if quota are enabled. [#60015](https://github.com/grafana/grafana/pull/60015), [@papagian](https://github.com/papagian)
- **Loki/Prometheus:** Fix wrong queries executed in split view. [#60172](https://github.com/grafana/grafana/pull/60172), [@svennergr](https://github.com/svennergr)
- **Loki:** Fix wrongly escaped label values when using LabelFilter. [#59812](https://github.com/grafana/grafana/pull/59812), [@svennergr](https://github.com/svennergr)
- **Navigation:** Prevent app crash when importing a dashboard with a uid of `home`. [#59874](https://github.com/grafana/grafana/pull/59874), [@ashharrison90](https://github.com/ashharrison90)
- **Panel Edit:** Fix data links edit icons being off screen when provided title is too long. [#59829](https://github.com/grafana/grafana/pull/59829), [@dprokop](https://github.com/dprokop)
- **Prometheus:** Fix exemplar fill color to match series color in time series. [#59908](https://github.com/grafana/grafana/pull/59908), [@gtk-grafana](https://github.com/gtk-grafana)
- **Prometheus:** Fix exemplars not respecting corresponding series display status. [#59743](https://github.com/grafana/grafana/pull/59743), [@gtk-grafana](https://github.com/gtk-grafana)
- **StateTimeline:** Fix negative infinity legend/tooltip from thresholds. [#60279](https://github.com/grafana/grafana/pull/60279), [@leeoniya](https://github.com/leeoniya)
- **Table:** Fixes row border style not showing and colored rows blending together. [#59660](https://github.com/grafana/grafana/pull/59660), [@torkelo](https://github.com/torkelo)
- **Tempo:** Fix TraceQL autocomplete issues (#60058). [#60125](https://github.com/grafana/grafana/pull/60125), [@CrypticSignal](https://github.com/CrypticSignal)
- **TimePicker:** Prevent TimePicker overflowing viewport on small screens. [#59808](https://github.com/grafana/grafana/pull/59808), [@ashharrison90](https://github.com/ashharrison90)
- **TimeRangePicker:** Fix recently ranges only not showing all recent ranges. [#59836](https://github.com/grafana/grafana/pull/59836), [@joshhunt](https://github.com/joshhunt)
- **TimeZonePicker:** Scroll menu correctly when using keyboard controls. [#60008](https://github.com/grafana/grafana/pull/60008), [@ashharrison90](https://github.com/ashharrison90)
<!-- 9.3.2 END -->
<!-- 9.3.1 START -->
# 9.3.1 (2022-11-30)
### Features and enhancements
- **Connections:** Update "Your connections/Data sources" page. [#58589](https://github.com/grafana/grafana/pull/58589), [@mikkancso](https://github.com/mikkancso)
### Bug fixes
- **Accessibility:** Increase badge constrast to be WCAG AA compliant. [#59531](https://github.com/grafana/grafana/pull/59531), [@eledobleefe](https://github.com/eledobleefe)
<!-- 9.3.1 END -->
<!-- 9.3.0 START -->
# 9.3.0 (2022-11-30)
### Features and enhancements
- **Alerting:** Enable interpolation for notification policies in file provisioning. [#58956](https://github.com/grafana/grafana/pull/58956), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Azure Monitor Logs:** Avoid warning when the response is empty. [#59211](https://github.com/grafana/grafana/pull/59211), [@andresmgot](https://github.com/andresmgot)
- **Azure Monitor:** Add support to customized routes. [#54829](https://github.com/grafana/grafana/pull/54829), [@ms-hujia](https://github.com/ms-hujia)
- **Canvas:** Add icon value mapping. [#59013](https://github.com/grafana/grafana/pull/59013), [@nmarrs](https://github.com/nmarrs)
- **CloudWatch:** Cross-account querying support. [#59362](https://github.com/grafana/grafana/pull/59362), [@sunker](https://github.com/sunker)
- **Docs:** Update `merge-pull-request.md` regarding backport policies. [#59239](https://github.com/grafana/grafana/pull/59239), [@dsotirakis](https://github.com/dsotirakis)
- **GaugePanel:** Setting the neutral-point of a gauge. [#53989](https://github.com/grafana/grafana/pull/53989), [@sfranzis](https://github.com/sfranzis)
- **Geomap:** Improve location editor. [#58017](https://github.com/grafana/grafana/pull/58017), [@drew08t](https://github.com/drew08t)
- **Internationalization:** Enable internationalization by default. [#59204](https://github.com/grafana/grafana/pull/59204), [@joshhunt](https://github.com/joshhunt)
- **Logs:** Add `Download logs` button to log log-browser. [#55163](https://github.com/grafana/grafana/pull/55163), [@svennergr](https://github.com/svennergr)
- **Loki:** Add `gzip` compression to resource calls. [#59059](https://github.com/grafana/grafana/pull/59059), [@svennergr](https://github.com/svennergr)
- **Loki:** Add improvements to loki label browser. [#59387](https://github.com/grafana/grafana/pull/59387), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Make label browser accessible in query builder. [#58525](https://github.com/grafana/grafana/pull/58525), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Remove raw query toggle. [#59125](https://github.com/grafana/grafana/pull/59125), [@gwdawson](https://github.com/gwdawson)
- **Middleware:** Add CSP Report Only support. [#58074](https://github.com/grafana/grafana/pull/58074), [@jcalisto](https://github.com/jcalisto)
- **Navigation:** Prevent viewer role accessing dashboard creation, import and folder creation. [#58842](https://github.com/grafana/grafana/pull/58842), [@lpskdl](https://github.com/lpskdl)
- **OAuth:** Refactor OAuth parameters handling to support obtaining refresh tokens for Google OAuth. [#58782](https://github.com/grafana/grafana/pull/58782), [@mgyongyosi](https://github.com/mgyongyosi)
- **Oauth:** Display friendly error message when role_attribute_strict=true and no valid role found. [#57818](https://github.com/grafana/grafana/pull/57818), [@kalleep](https://github.com/kalleep)
- **Preferences:** Add confirmation modal when saving org preferences. [#59119](https://github.com/grafana/grafana/pull/59119), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
- **PublicDashboards:** Orphaned public dashboard deletion script added. [#57917](https://github.com/grafana/grafana/pull/57917), [@juanicabanas](https://github.com/juanicabanas)
- **Query Editor:** Hide overflow for long query names. [#58840](https://github.com/grafana/grafana/pull/58840), [@zuchka](https://github.com/zuchka)
- **Reports:** Configurable timezone. (Enterprise)
- **Solo Panel:** Configurable timezone. [#59153](https://github.com/grafana/grafana/pull/59153), [@spinillos](https://github.com/spinillos)
- **TablePanel:** Add support for Count calculation per column or per entire dataset. [#58134](https://github.com/grafana/grafana/pull/58134), [@mdvictor](https://github.com/mdvictor)
- **Tempo:** Send the correct start time when making a TraceQL query. [#59128](https://github.com/grafana/grafana/pull/59128), [@CrypticSignal](https://github.com/CrypticSignal)
- **Various Panels:** Remove beta label from Bar Chart, Candlestick, Histogram, State Timeline, & Status History Panels. [#58557](https://github.com/grafana/grafana/pull/58557), [@codeincarnate](https://github.com/codeincarnate)
### Bug fixes
- **Access Control:** Clear user's permission cache after resource creation. [#59307](https://github.com/grafana/grafana/pull/59307), [@grafanabot](https://github.com/grafanabot)
- **Access Control:** Clear user's permission cache after resource creation. [#59101](https://github.com/grafana/grafana/pull/59101), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Accessibility:** Improve keyboard accessibility in `AnnoListPanel`. [#58971](https://github.com/grafana/grafana/pull/58971), [@ashharrison90](https://github.com/ashharrison90)
- **Accessibility:** Improve keyboard accessibility in `Collapse`. [#59022](https://github.com/grafana/grafana/pull/59022), [@ashharrison90](https://github.com/ashharrison90)
- **Accessibility:** Improve keyboard accessibility in `GettingStarted` panel. [#58966](https://github.com/grafana/grafana/pull/58966), [@ashharrison90](https://github.com/ashharrison90)
- **Accessibility:** Improve keyboard accessibility of `FilterPill`. [#58976](https://github.com/grafana/grafana/pull/58976), [@ashharrison90](https://github.com/ashharrison90)
- **Admin:** Fix broken links to image assets in email templates. [#58729](https://github.com/grafana/grafana/pull/58729), [@zuchka](https://github.com/zuchka)
- **Azure Monitor:** Fix namespace selection for storageaccounts. [#56449](https://github.com/grafana/grafana/pull/56449), [@andresmgot](https://github.com/andresmgot)
- **Calcs:** Fix difference percent in legend. [#59243](https://github.com/grafana/grafana/pull/59243), [@zoltanbedi](https://github.com/zoltanbedi)
- **DataLinks:** Improve Data-Links AutoComplete Logic. [#58934](https://github.com/grafana/grafana/pull/58934), [@zuchka](https://github.com/zuchka)
- **Explore:** Fix a11y issue with logs navigation buttons. [#58944](https://github.com/grafana/grafana/pull/58944), [@Elfo404](https://github.com/Elfo404)
- **Heatmap:** Fix blurry text & rendering. [#59260](https://github.com/grafana/grafana/pull/59260), [@leeoniya](https://github.com/leeoniya)
- **Heatmap:** Fix tooltip y range of top and bottom buckets in calculated heatmaps. [#59172](https://github.com/grafana/grafana/pull/59172), [@leeoniya](https://github.com/leeoniya)
- **Logs:** Fix misalignment of LogRows. [#59279](https://github.com/grafana/grafana/pull/59279), [@svennergr](https://github.com/svennergr)
- **Navigation:** Stop clearing search state when opening a result in a new tab. [#58880](https://github.com/grafana/grafana/pull/58880), [@ashharrison90](https://github.com/ashharrison90)
- **OptionsUI:** SliderValueEditor does not get auto focused on slider change. [#59209](https://github.com/grafana/grafana/pull/59209), [@eledobleefe](https://github.com/eledobleefe)
- **PanelEdit:** Fixes bug with not remembering panel options pane collapse/expand state. [#59265](https://github.com/grafana/grafana/pull/59265), [@torkelo](https://github.com/torkelo)
- **Query Caching:** Skip 207 status codes. (Enterprise)
- **Quota:** Fix failure in store due to missing scope parameters. [#58874](https://github.com/grafana/grafana/pull/58874), [@papagian](https://github.com/papagian)
- **Quota:** Fix failure when checking session limits. [#58865](https://github.com/grafana/grafana/pull/58865), [@papagian](https://github.com/papagian)
- **Reports:** Fix time preview. (Enterprise)
- **StateTimeline:** Prevent label text from overflowing state rects. [#59169](https://github.com/grafana/grafana/pull/59169), [@leeoniya](https://github.com/leeoniya)
- **Tempo:** Fix search table duration unit. [#58642](https://github.com/grafana/grafana/pull/58642), [@joey-grafana](https://github.com/joey-grafana)
- **TraceView:** Fix broken rendering when scrolling in Dashboard panel in Firefox. [#56642](https://github.com/grafana/grafana/pull/56642), [@zdg-github](https://github.com/zdg-github)
### Plugin development fixes & changes
- **GrafanaUI:** Add disabled option for menu items. [#58980](https://github.com/grafana/grafana/pull/58980), [@going-confetti](https://github.com/going-confetti)
<!-- 9.3.0 END -->
<!-- 9.3.0-beta1 START -->
# 9.3.0-beta1 (2022-11-15)
### Features and enhancements
- **Alerting:** Add Alertmanager choice warning. [#55311](https://github.com/grafana/grafana/pull/55311), [@konrad147](https://github.com/konrad147)
- **Alerting:** Add support for linking external images securely - Azure Blob (#1). [#56598](https://github.com/grafana/grafana/pull/56598), [@petr-stupka](https://github.com/petr-stupka)
- **Alerting:** Add threshold expression. [#55102](https://github.com/grafana/grafana/pull/55102), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Add traceability headers for alert queries. [#57127](https://github.com/grafana/grafana/pull/57127), [@alexweav](https://github.com/alexweav)
- **Alerting:** Allow none provenance alert rule creation from provisioning API. [#58410](https://github.com/grafana/grafana/pull/58410), [@alexmobo](https://github.com/alexmobo)
- **Alerting:** Cache result of dashboard ID lookups. [#56587](https://github.com/grafana/grafana/pull/56587), [@alexweav](https://github.com/alexweav)
- **Alerting:** Expressions pipeline redesign. [#54601](https://github.com/grafana/grafana/pull/54601), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Fall back to "range" query type for unified alerting when "both" is specified. [#57288](https://github.com/grafana/grafana/pull/57288), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Implement the Webex notifier. [#58480](https://github.com/grafana/grafana/pull/58480), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Improve group modal with validation on evaluation interval. [#57830](https://github.com/grafana/grafana/pull/57830), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Persist annotations from multidimensional rules in batches. [#56575](https://github.com/grafana/grafana/pull/56575), [@alexweav](https://github.com/alexweav)
- **Alerting:** Query time logging. [#57585](https://github.com/grafana/grafana/pull/57585), [@konrad147](https://github.com/konrad147)
- **Alerting:** Remove the alert manager selection from the data source configuration. [#57369](https://github.com/grafana/grafana/pull/57369), [@VikaCep](https://github.com/VikaCep)
- **Alerting:** Remove the alert manager selection from the data source configuration. [#56460](https://github.com/grafana/grafana/pull/56460), [@gitstart](https://github.com/gitstart)
- **Alerting:** Support values in notification templates. [#56457](https://github.com/grafana/grafana/pull/56457), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Templated URLs for webhook type contact points. [#57296](https://github.com/grafana/grafana/pull/57296), [@santihernandezc](https://github.com/santihernandezc)
- **Annotations:** Disable "Add annotation" button when annotations are disabled. [#57481](https://github.com/grafana/grafana/pull/57481), [@ryantxu](https://github.com/ryantxu)
- **Auth:** Add validation and ingestion of conflict file. [#53014](https://github.com/grafana/grafana/pull/53014), [@eleijonmarck](https://github.com/eleijonmarck)
- **Auth:** Make built-in login configurable. [#46978](https://github.com/grafana/grafana/pull/46978), [@TsotosA](https://github.com/TsotosA)
- **Auth:** Refresh OAuth access_token automatically using the refresh_token. [#56076](https://github.com/grafana/grafana/pull/56076), [@mgyongyosi](https://github.com/mgyongyosi)
- **Auth:** Validate Azure ID token version on login is not v1. [#58088](https://github.com/grafana/grafana/pull/58088), [@Jguer](https://github.com/Jguer)
- **BackendSrv:** Make it possible to pass `options` to `.get|post|patch...` methods. [#51316](https://github.com/grafana/grafana/pull/51316), [@leventebalogh](https://github.com/leventebalogh)
- **Canvas:** Add tabs to inline editor. [#57778](https://github.com/grafana/grafana/pull/57778), [@adela-almasan](https://github.com/adela-almasan)
- **Canvas:** Extend root context menu. [#58097](https://github.com/grafana/grafana/pull/58097), [@adela-almasan](https://github.com/adela-almasan)
- **Chore:** Switch Grafana to using faro libraries. [#58186](https://github.com/grafana/grafana/pull/58186), [@tolzhabayev](https://github.com/tolzhabayev)
- **Chore:** Use strings.ReplaceAll and preallocate containers. [#58483](https://github.com/grafana/grafana/pull/58483), [@sashamelentyev](https://github.com/sashamelentyev)
- **CloudWatch:** Cache resource request responses in the browser. [#57082](https://github.com/grafana/grafana/pull/57082), [@sunker](https://github.com/sunker)
- **Config:** Change jwt config value to be "expect_claims". [#58284](https://github.com/grafana/grafana/pull/58284), [@conorevans](https://github.com/conorevans)
- **Configuration:** Update ssl_mode documentation in sample.ini to match default.ini. [#55138](https://github.com/grafana/grafana/pull/55138), [@alecxvs](https://github.com/alecxvs)
- **Correlations:** Add query editor and target field to settings page. [#55567](https://github.com/grafana/grafana/pull/55567), [@Elfo404](https://github.com/Elfo404)
- **Dashboard:** Record the number of cached queries for usage insights. [#56050](https://github.com/grafana/grafana/pull/56050), [@juanicabanas](https://github.com/juanicabanas)
- **Dashboard:** Record the number of cached queries for usage insights. (Enterprise)
- **Datasources:** Support mixed datasources in a single query. [#56832](https://github.com/grafana/grafana/pull/56832), [@mmandrus](https://github.com/mmandrus)
- **Docs:** Add documentation for Custom Branding on Public Dashboards. [#58090](https://github.com/grafana/grafana/pull/58090), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **Docs:** Add missing documentation for enterprise features. [#56753](https://github.com/grafana/grafana/pull/56753), [@mmandrus](https://github.com/mmandrus)
- **Docs:** Clarify that audit logs are generated only for API requests. [#57521](https://github.com/grafana/grafana/pull/57521), [@spinillos](https://github.com/spinillos)
- **Echo:** Add config option to prevent duplicate page views for GA4. [#57619](https://github.com/grafana/grafana/pull/57619), [@tolzhabayev](https://github.com/tolzhabayev)
- **Elasticsearch:** Add trace to logs functionality. [#58063](https://github.com/grafana/grafana/pull/58063), [@ivanahuckova](https://github.com/ivanahuckova)
- **Elasticsearch:** Reuse http client in the backend. [#55172](https://github.com/grafana/grafana/pull/55172), [@gabor](https://github.com/gabor)
- **Explore:** Add tracesToMetrics span time shift options (#54710). [#55335](https://github.com/grafana/grafana/pull/55335), [@hanjm](https://github.com/hanjm)
- **Explore:** Logs volume histogram: always start Y axis from zero. [#56200](https://github.com/grafana/grafana/pull/56200), [@gabor](https://github.com/gabor)
- **Explore:** Remove explore2Dashboard feature toggle. [#58329](https://github.com/grafana/grafana/pull/58329), [@Elfo404](https://github.com/Elfo404)
- **Explore:** Support fields interpolation in logs panel. [#58426](https://github.com/grafana/grafana/pull/58426), [@ifrost](https://github.com/ifrost)
- **Frontend Routing:** Always render standalone plugin pages using the `<AppRootPage>`. [#57771](https://github.com/grafana/grafana/pull/57771), [@leventebalogh](https://github.com/leventebalogh)
- **GRPC Server:** Add gRPC server service. [#47849](https://github.com/grafana/grafana/pull/47849), [@FZambia](https://github.com/FZambia)
- **Geomap:** Add photo layer. [#57307](https://github.com/grafana/grafana/pull/57307), [@drew08t](https://github.com/drew08t)
- **Geomap:** Upgrade to openlayers 7.x. [#57317](https://github.com/grafana/grafana/pull/57317), [@ryantxu](https://github.com/ryantxu)
- **GrafanaData:** Deprecate logs functions. [#56077](https://github.com/grafana/grafana/pull/56077), [@gabor](https://github.com/gabor)
- **GrafanaData:** Deprecate the LogsParser type. [#56242](https://github.com/grafana/grafana/pull/56242), [@gabor](https://github.com/gabor)
- **Kindsys:** Introduce Kind framework. [#56492](https://github.com/grafana/grafana/pull/56492), [@sdboyer](https://github.com/sdboyer)
- **LDAP:** Add `skip_org_role_sync` configuration option. [#56792](https://github.com/grafana/grafana/pull/56792), [@grafanabot](https://github.com/grafanabot)
- **LDAP:** Add `skip_org_role_sync` configuration option. [#56679](https://github.com/grafana/grafana/pull/56679), [@gamab](https://github.com/gamab)
- **LDAPSync:** Improve performance of sync and make it case insensitive. (Enterprise)
- **LibraryPanels:** Load library panels in the frontend rather than the backend. [#50560](https://github.com/grafana/grafana/pull/50560), [@ryantxu](https://github.com/ryantxu)
- **LogContext:** Add header and close button to modal. [#56283](https://github.com/grafana/grafana/pull/56283), [@svennergr](https://github.com/svennergr)
- **LogContext:** Improve text describing the loglines. [#55475](https://github.com/grafana/grafana/pull/55475), [@svennergr](https://github.com/svennergr)
- **Logs:** Allow collapsing the logs volume histogram. [#52808](https://github.com/grafana/grafana/pull/52808), [@gabor](https://github.com/gabor)
- **Logs:** Center `show context` modal on click. [#55989](https://github.com/grafana/grafana/pull/55989), [@svennergr](https://github.com/svennergr)
- **Logs:** Center `show context` modal on click. [#55405](https://github.com/grafana/grafana/pull/55405), [@svennergr](https://github.com/svennergr)
- **Logs:** Show LogRowMenu also for long logs and wrap-lines turned off. [#56030](https://github.com/grafana/grafana/pull/56030), [@svennergr](https://github.com/svennergr)
- **LogsContext:** Added button to load 10 more log lines. [#55923](https://github.com/grafana/grafana/pull/55923), [@svennergr](https://github.com/svennergr)
- **Loki:** Add case insensitive line contains operation. [#58177](https://github.com/grafana/grafana/pull/58177), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Monaco Query Editor enabled by default. [#58080](https://github.com/grafana/grafana/pull/58080), [@matyax](https://github.com/matyax)
- **Loki:** Redesign and improve query patterns. [#55097](https://github.com/grafana/grafana/pull/55097), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Rename log browser to label browser. [#58416](https://github.com/grafana/grafana/pull/58416), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Show invalid fields in label filter. [#55751](https://github.com/grafana/grafana/pull/55751), [@ivanahuckova](https://github.com/ivanahuckova)
- **MSSQL:** Add connection timeout setting in configuration page. [#58631](https://github.com/grafana/grafana/pull/58631), [@mdvictor](https://github.com/mdvictor)
- **Navigation:** Add `pluginId` to standalone plugin page NavLinks. [#57769](https://github.com/grafana/grafana/pull/57769), [@leventebalogh](https://github.com/leventebalogh)
- **Navigation:** Expose new props to extend `Page`/`PluginPage`. [#58465](https://github.com/grafana/grafana/pull/58465), [@ashharrison90](https://github.com/ashharrison90)
- **Navtree:** Make it possible to configure standalone plugin pages. [#56393](https://github.com/grafana/grafana/pull/56393), [@leventebalogh](https://github.com/leventebalogh)
- **Node Graph:** Always show context menu. [#56876](https://github.com/grafana/grafana/pull/56876), [@joey-grafana](https://github.com/joey-grafana)
- **Number formatting:** Strip trailing zeros after decimal point when decimals=auto. [#57373](https://github.com/grafana/grafana/pull/57373), [@leeoniya](https://github.com/leeoniya)
- **OAuth:** Feature toggle for access token expiration check and docs. [#58179](https://github.com/grafana/grafana/pull/58179), [@mgyongyosi](https://github.com/mgyongyosi)
- **Opentsdb:** Allow template variables for filter keys. [#57226](https://github.com/grafana/grafana/pull/57226), [@bohandley](https://github.com/bohandley)
- **PanelEdit:** Allow test id to be passed to panel editors. [#55417](https://github.com/grafana/grafana/pull/55417), [@mckn](https://github.com/mckn)
- **Plugins:** Add hook to make it easier to track interactions in plugins. [#56126](https://github.com/grafana/grafana/pull/56126), [@mckn](https://github.com/mckn)
- **Plugins:** Introduce new Flame graph panel. [#56376](https://github.com/grafana/grafana/pull/56376), [@joey-grafana](https://github.com/joey-grafana)
- **Plugins:** Make "README" the default markdown request param. [#58264](https://github.com/grafana/grafana/pull/58264), [@wbrowne](https://github.com/wbrowne)
- **PostgreSQL:** Migrate to React. [#52831](https://github.com/grafana/grafana/pull/52831), [@zoltanbedi](https://github.com/zoltanbedi)
- **Preferences:** Create indices. [#48356](https://github.com/grafana/grafana/pull/48356), [@sakjur](https://github.com/sakjur)
- **Profiling:** Add Phlare and Parca datasources. [#57809](https://github.com/grafana/grafana/pull/57809), [@aocenas](https://github.com/aocenas)
- **Prometheus:** Handle errors and warnings in buffered client. [#58504](https://github.com/grafana/grafana/pull/58504), [@itsmylife](https://github.com/itsmylife)
- **Prometheus:** Make Prometheus streaming parser as default client. [#58365](https://github.com/grafana/grafana/pull/58365), [@itsmylife](https://github.com/itsmylife)
- **Public Dashboards:** Add audit table. [#54508](https://github.com/grafana/grafana/pull/54508), [@jalevin](https://github.com/jalevin)
- **PublicDashboards:** Add PubDash support to Angular panel plugins. [#57293](https://github.com/grafana/grafana/pull/57293), [@mmandrus](https://github.com/mmandrus)
- **PublicDashboards:** Add annotations support. [#56413](https://github.com/grafana/grafana/pull/56413), [@owensmallwood](https://github.com/owensmallwood)
- **PublicDashboards:** Add custom branding for Public Dashboard. (Enterprise)
- **PublicDashboards:** Add delete public dashboard button in public dashboard modal. [#58095](https://github.com/grafana/grafana/pull/58095), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Cached queries column added in public dashboard insight query. (Enterprise)
- **PublicDashboards:** Can toggle annotations in modal. [#57312](https://github.com/grafana/grafana/pull/57312), [@owensmallwood](https://github.com/owensmallwood)
- **PublicDashboards:** Delete public dashboard in public dashboard table. [#57766](https://github.com/grafana/grafana/pull/57766), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Delete public dashboard when dashboard is deleted. [#57291](https://github.com/grafana/grafana/pull/57291), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Extract config of Public Dashboard. [#57788](https://github.com/grafana/grafana/pull/57788), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **PublicDashboards:** Hide top navigation bar. [#56873](https://github.com/grafana/grafana/pull/56873), [@evictorero](https://github.com/evictorero)
- **PublicDashboards:** Make mixed datasource calls concurrently. [#56421](https://github.com/grafana/grafana/pull/56421), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Orphaned public dashboard item list modified. [#58014](https://github.com/grafana/grafana/pull/58014), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Rename PubdashFooter frontend component. [#58137](https://github.com/grafana/grafana/pull/58137), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **PublicDashboards:** Update docs with supported datasources. [#57629](https://github.com/grafana/grafana/pull/57629), [@owensmallwood](https://github.com/owensmallwood)
- **PublicDashboards:** Validate access token. [#57298](https://github.com/grafana/grafana/pull/57298), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **PublicDashboards:** Validate access token not to be duplicated and add retries. [#56755](https://github.com/grafana/grafana/pull/56755), [@juanicabanas](https://github.com/juanicabanas)
- **RBAC:** Improve performance of dashboard filter query. [#56813](https://github.com/grafana/grafana/pull/56813), [@kalleep](https://github.com/kalleep)
- **Rendering:** Add configuration options for `renderKey` lifetime. [#57339](https://github.com/grafana/grafana/pull/57339), [@Willena](https://github.com/Willena)
- **Reports:** Dynamic scale factor per report. (Enterprise)
- **SAML:** Set cookie option SameSite=none and Secure=true. (Enterprise)
- **SQLStore:** Optionally retry queries if sqlite returns database is locked. [#56096](https://github.com/grafana/grafana/pull/56096), [@papagian](https://github.com/papagian)
- **Server:** Make unix socket permission configurable. [#52944](https://github.com/grafana/grafana/pull/52944), [@unknowndevQwQ](https://github.com/unknowndevQwQ)
- **Tempo:** Add start time and end time parameters while querying traces. [#48068](https://github.com/grafana/grafana/pull/48068), [@bikashmishra100](https://github.com/bikashmishra100)
- **TimeSeries:** Render null-bounded points at data edges. [#57798](https://github.com/grafana/grafana/pull/57798), [@leeoniya](https://github.com/leeoniya)
- **Tracing:** Allow trace to logs for OpenSearch. [#58161](https://github.com/grafana/grafana/pull/58161), [@gabor](https://github.com/gabor)
- **Transformers:** PartitionByValues. [#56767](https://github.com/grafana/grafana/pull/56767), [@leeoniya](https://github.com/leeoniya)
- **UsageStats:** Add traces when sending usage stats. [#55474](https://github.com/grafana/grafana/pull/55474), [@sakjur](https://github.com/sakjur)
### Bug fixes
- **Alerting:** Fix mathexp.NoData in ConditionsCmd. [#56812](https://github.com/grafana/grafana/pull/56812), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **BarChart:** Fix coloring from thresholds and value mappings. [#58285](https://github.com/grafana/grafana/pull/58285), [@leeoniya](https://github.com/leeoniya)
- **BarChart:** Fix stacked hover. [#57711](https://github.com/grafana/grafana/pull/57711), [@leeoniya](https://github.com/leeoniya)
- **Explore:** Fix shared crosshair for logs, logsvolume and graph panels. [#57892](https://github.com/grafana/grafana/pull/57892), [@Elfo404](https://github.com/Elfo404)
- **Flame Graph:** Exact search. [#56769](https://github.com/grafana/grafana/pull/56769), [@joey-grafana](https://github.com/joey-grafana)
- **Flame Graph:** Fix for dashboard scrolling. [#56555](https://github.com/grafana/grafana/pull/56555), [@joey-grafana](https://github.com/joey-grafana)
- **LogContext:** Fix scroll behavior in context modal. [#56070](https://github.com/grafana/grafana/pull/56070), [@svennergr](https://github.com/svennergr)
- **Loki:** Fix showing of history of querying in query editor. [#57344](https://github.com/grafana/grafana/pull/57344), [@ivanahuckova](https://github.com/ivanahuckova)
- **OAuth:** Fix misleading warn log related to oauth and increase logged content. [#57336](https://github.com/grafana/grafana/pull/57336), [@Jguer](https://github.com/Jguer)
- **Plugins:** Plugin details page visual alignment issues. [#57729](https://github.com/grafana/grafana/issues/57729)
- **PublicDashboards:** Fix GET public dashboard that doesn't match. [#57571](https://github.com/grafana/grafana/pull/57571), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Fix annotations error for public dashboards. [#57455](https://github.com/grafana/grafana/pull/57455), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **PublicDashboards:** Fix granularity discrepancy between public and original dashboard. [#57129](https://github.com/grafana/grafana/pull/57129), [@guicaulada](https://github.com/guicaulada)
- **PublicDashboards:** Fix granularity issue caused by query caching. (Enterprise)
- **PublicDashboards:** Fix hidden queries execution. (Enterprise)
- **RBAC:** Add primary key to seed_assignment table. [#56540](https://github.com/grafana/grafana/pull/56540), [@kalleep](https://github.com/kalleep)
- **Tempo:** Fix search removing service name from query. [#58630](https://github.com/grafana/grafana/pull/58630), [@joey-grafana](https://github.com/joey-grafana)
- **TimeRangeInput:** Fix clear button type. [#56545](https://github.com/grafana/grafana/pull/56545), [@Clarity-89](https://github.com/Clarity-89)
### Breaking changes
Removes the unused close-milestone command from `@grafana/toolkit`. Issue [#57062](https://github.com/grafana/grafana/issues/57062)
@grafana/toolkit `cherrypick` command was removed. Issue [#56114](https://github.com/grafana/grafana/issues/56114)
`EmotionPerfTest` is no longer exported from the `@grafana/ui` bundle. Issue [#56100](https://github.com/grafana/grafana/issues/56100)
Removing the unused `changelog` command in `@grafana/toolkit`. Issue [#56073](https://github.com/grafana/grafana/issues/56073)
### Deprecations
The interface type `LogsParser` in `grafana-data` is deprecated. Issue [#56242](https://github.com/grafana/grafana/issues/56242)
The following functions and classes related to logs are deprecated in the `grafana-ui` package: `getLogLevel`, `getLogLevelFromKey`, `addLogLevelToSeries`, `LogsParsers`, `calculateFieldStats`, `calculateLogsLabelStats`, `calculateStats`, `getParser`, `sortInAscendingOrder`, `sortInDescendingOrder`, `sortLogsResult`, `sortLogRows`, `checkLogsError`, `escapeUnescapedString`. Issue [#56077](https://github.com/grafana/grafana/issues/56077)
### Plugin development fixes & changes
- **Toolkit:** Deprecate `plugin:update-circleci` command. [#57743](https://github.com/grafana/grafana/pull/57743), [@academo](https://github.com/academo)
- **Toolkit:** Deprecate `plugin:github-publish` command. [#57726](https://github.com/grafana/grafana/pull/57726), [@academo](https://github.com/academo)
- **Toolkit:** Deprecate `plugin:bundle-managed` command and move its functionality to a bash script. [#57719](https://github.com/grafana/grafana/pull/57719), [@academo](https://github.com/academo)
- **Toolkit:** Deprecate and replace toolkit:build with plain yarn scripts. [#57620](https://github.com/grafana/grafana/pull/57620), [@academo](https://github.com/academo)
- **Toolkit:** Deprecate node-version-check command. [#57591](https://github.com/grafana/grafana/pull/57591), [@academo](https://github.com/academo)
- **Toolkit:** Deprecate searchTestData command. [#57589](https://github.com/grafana/grafana/pull/57589), [@academo](https://github.com/academo)
- **Toolkit:** Remove unused close-milestone command. [#57062](https://github.com/grafana/grafana/pull/57062), [@academo](https://github.com/academo)
- **Toolkit:** Remove unused legacy cherrypick command. [#56114](https://github.com/grafana/grafana/pull/56114), [@academo](https://github.com/academo)
- **Grafana UI:** Clean up bundle. [#56100](https://github.com/grafana/grafana/pull/56100), [@jackw](https://github.com/jackw)
- **Toolkit:** Deprecate `component:create` command. [#56086](https://github.com/grafana/grafana/pull/56086), [@academo](https://github.com/academo)
- **Toolkit:** Remove changelog command. [#56073](https://github.com/grafana/grafana/pull/56073), [@gitstart](https://github.com/gitstart)
<!-- 9.2.10 START -->
# 9.2.10 (2023-01-24)
### Features and enhancements
- **TextPanel:** Refactor to functional component (#60885). [#61940](https://github.com/grafana/grafana/pull/61940), [@ryantxu](https://github.com/ryantxu)
- **[v9.2.x] Chore:** Upgrade Go to 1.19.4. [#60826](https://github.com/grafana/grafana/pull/60826), [@sakjur](https://github.com/sakjur)
### Bug fixes
- **Live:** Fix `Subscription to the channel already exists` live streaming error. [#61420](https://github.com/grafana/grafana/pull/61420), [@grafanabot](https://github.com/grafanabot)
- **Live:** Fix `Subscription to the channel already exists` live streaming error. [#61419](https://github.com/grafana/grafana/pull/61419), [@grafanabot](https://github.com/grafanabot)
- **Live:** Fix `Subscription to the channel already exists` live streaming error. [#61406](https://github.com/grafana/grafana/pull/61406), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
<!-- 9.2.10 END -->
<!-- 9.2.7 START -->
# 9.2.7 (2022-11-29)
### Bug fixes
- **Access Control:** Clear user's permission cache after resource creation. [#59318](https://github.com/grafana/grafana/pull/59318), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Azure Monitor:** Fix empty/errored responses for Logs variables. [#59240](https://github.com/grafana/grafana/pull/59240), [@andresmgot](https://github.com/andresmgot)
- **Azure Monitor:** Fix resource picker selection for subresources. [#56392](https://github.com/grafana/grafana/pull/56392), [@andresmgot](https://github.com/andresmgot)
- **Navigation:** Fix crash when Help is disabled. [#58919](https://github.com/grafana/grafana/pull/58919), [@lpskdl](https://github.com/lpskdl)
- **PostgreSQL:** Fix missing CA field from configuration. [#59280](https://github.com/grafana/grafana/pull/59280), [@oscarkilhed](https://github.com/oscarkilhed)
- **SQL Datasources:** Fix annotation migration. [#59438](https://github.com/grafana/grafana/pull/59438), [@zoltanbedi](https://github.com/zoltanbedi)
- **SQL:** Fix code editor for SQL datasources. [#58116](https://github.com/grafana/grafana/pull/58116), [@zoltanbedi](https://github.com/zoltanbedi)
- **SSE:** Make sure to forward headers, user and cookies/OAuth token. [#58897](https://github.com/grafana/grafana/pull/58897), [@kylebrandt](https://github.com/kylebrandt)
- **TimeseriesPanel:** Preserve string fields for data link interpolation. [#58424](https://github.com/grafana/grafana/pull/58424), [@mdvictor](https://github.com/mdvictor)
<!-- 9.2.7 END -->
<!-- 9.2.6 START -->
# 9.2.6 (2022-11-22)
@@ -802,7 +15,6 @@ The following functions and classes related to logs are deprecated in the `grafa
- **Server:** Write internal server error on missing write. [#57813](https://github.com/grafana/grafana/pull/57813), [@sakjur](https://github.com/sakjur)
<!-- 9.2.6 END -->
<!-- 9.2.5 START -->
# 9.2.5 (2022-11-16)
@@ -830,7 +42,6 @@ The following functions and classes related to logs are deprecated in the `grafa
- **Tooltips:** Make tooltips in FormField and FormLabel interactive and keyboard friendly. [#57706](https://github.com/grafana/grafana/pull/57706), [@asimpson](https://github.com/asimpson)
<!-- 9.2.5 END -->
<!-- 9.3.0-beta1 END -->
<!-- 9.2.4 START -->
# 9.2.4 (2022-11-07)
@@ -1216,27 +427,6 @@ Issue [#55364](https://github.com/grafana/grafana/issues/55364)
- **CustomScrollbar:** Add optional scroll indicators to `CustomScrollbar`. [#54705](https://github.com/grafana/grafana/pull/54705), [@ashharrison90](https://github.com/ashharrison90)
- **Build:** Introduce ESM and Treeshaking to NPM package builds. [#51517](https://github.com/grafana/grafana/pull/51517), [@jackw](https://github.com/jackw)
<!-- 9.1.8 START -->
# 9.1.8 (2022-10-11)
### Features and enhancements
- **Alerting:** Update imported prometheus alertmanager version. Backport (#56228). [#56429](https://github.com/grafana/grafana/pull/56429), [@joeblubaugh](https://github.com/joeblubaugh)
- **Chore:** Upgrade Go to 1.19.2. [#56355](https://github.com/grafana/grafana/pull/56355), [@sakjur](https://github.com/sakjur)
### Bug fixes
- **Alerting:** Fix evaluation interval validation. [#56115](https://github.com/grafana/grafana/pull/56115), [@konrad147](https://github.com/konrad147)
- **Alerting:** Fix migration to create rules with group index 1. [#56511](https://github.com/grafana/grafana/pull/56511), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Fix migration to not add label "alertname". [#56509](https://github.com/grafana/grafana/pull/56509), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Azure Monitor:** Fix empty Logs response for Alerting. [#56378](https://github.com/grafana/grafana/pull/56378), [@andresmgot](https://github.com/andresmgot)
- **Azure Monitor:** Fix subscription selector when changing data sources. [#56284](https://github.com/grafana/grafana/pull/56284), [@andresmgot](https://github.com/andresmgot)
- **Caching:** Fix wrong memcached setting name in defaults. (Enterprise)
- **Google Cloud Monitoring:** Fix bucket bound for distributions. [#56565](https://github.com/grafana/grafana/pull/56565), [@andresmgot](https://github.com/andresmgot)
<!-- 9.1.8 END -->
<!-- 9.1.7 START -->
# 9.1.7 (2022-10-04)
@@ -2432,36 +1622,6 @@ In the Loki data source, for consistency and performance reasons, we changed how
The dependency to [grafana/aws-sdk](https://github.com/grafana/grafana-aws-sdk-react) is moved from [grafana/ui](https://github.com/grafana/grafana/blob/main/packages/grafana-ui/package.json) to the plugin. This means that any plugin that use SIGV4 auth need to pass a SIGV4 editor component as a prop to the `DataSourceHttpSettings` component. Issue [#43559](https://github.com/grafana/grafana/issues/43559)
<!-- 8.5.20 START -->
# 8.5.20 (2023-01-25)
### Features and enhancements
- **Chore:** Upgrade Go to 1.19.4 [v8.5.x]. [#60824](https://github.com/grafana/grafana/pull/60824), [@sakjur](https://github.com/sakjur)
<!-- 8.5.20 END -->
<!-- 8.5.15 START -->
# 8.5.15 (2022-11-08)
### Features and enhancements
- **Chore:** Upgrade Go to 1.19.2. [#56857](https://github.com/grafana/grafana/pull/56857), [@sakjur](https://github.com/sakjur)
<!-- 8.5.15 END -->
<!-- 8.5.14 START -->
# 8.5.14 (2022-10-11)
### Features and enhancements
- **Access Control:** Allow org admins to invite new users. [#55585](https://github.com/grafana/grafana/pull/55585), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
<!-- 8.5.14 END -->
<!-- 8.5.13 START -->
# 8.5.13 (2022-09-20)

View File

@@ -15,8 +15,6 @@ You can contribute to Grafana in several ways. Here are some examples:
- Organize meetups and user groups in your local area.
- Help others by answering questions about Grafana.
**Please note:** We do not currently accept contributions for translations. Please do not submit pull requests for messages.po files - they will be rejected.
For more ways to contribute, check out the [Open Source Guides](https://opensource.guide/how-to-contribute/).
### Report bugs

View File

@@ -1,17 +1,8 @@
# syntax=docker/dockerfile:1
ARG BASE_IMAGE=alpine:3.17
ARG JS_IMAGE=node:18-alpine3.17
ARG GO_IMAGE=golang:1.20.4-alpine3.17
ARG GO_SRC=go-builder
ARG JS_SRC=js-builder
FROM ${JS_IMAGE} as js-builder
FROM node:16-alpine3.15 as js-builder
ENV NODE_OPTIONS=--max_old_space_size=8000
WORKDIR /tmp/grafana
WORKDIR /grafana
COPY package.json yarn.lock .yarnrc.yml ./
COPY .yarn .yarn
@@ -22,145 +13,82 @@ RUN yarn install
COPY tsconfig.json .eslintrc .editorconfig .browserslistrc .prettierrc.js babel.config.json .linguirc ./
COPY public public
COPY tools tools
COPY scripts scripts
COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM ${GO_IMAGE} as go-builder
FROM golang:1.19.3-alpine3.15 as go-builder
# Install build dependencies
RUN if grep -i -q alpine /etc/issue; then \
apk add --no-cache gcc g++ make; \
fi
RUN apk add --no-cache gcc g++ make
WORKDIR /tmp/grafana
WORKDIR /grafana
COPY go.* ./
COPY .bingo .bingo
RUN go mod download && \
go install github.com/bwplotka/bingo@latest && \
bingo get
COPY embed.go Makefile build.go package.json ./
COPY cue.mod cue.mod
COPY kinds kinds
COPY local local
COPY go.mod go.sum embed.go Makefile build.go package.json ./
COPY packages/grafana-schema packages/grafana-schema
COPY public/app/plugins public/app/plugins
COPY public/api-spec.json public/api-spec.json
COPY pkg pkg
COPY scripts scripts
COPY conf conf
COPY .github .github
COPY LICENSE ./
COPY cue.mod cue.mod
COPY .bingo .bingo
RUN go mod verify
RUN make build-go
FROM ${BASE_IMAGE} as tgz-builder
WORKDIR /tmp/grafana
ARG GRAFANA_TGZ="grafana-latest.linux-x64-musl.tar.gz"
COPY ${GRAFANA_TGZ} /tmp/grafana.tar.gz
# add -v to make tar print every file it extracts
RUN tar x -z -f /tmp/grafana.tar.gz --strip-components=1
# helpers for COPY --from
FROM ${GO_SRC} as go-src
FROM ${JS_SRC} as js-src
# Final stage
FROM ${BASE_IMAGE}
FROM alpine:3.15.6
LABEL maintainer="Grafana Labs <hello@grafana.com>"
LABEL maintainer="Grafana team <hello@grafana.com>"
ARG GF_UID="472"
ARG GF_GID="0"
ENV PATH="/usr/share/grafana/bin:$PATH" \
GF_PATHS_CONFIG="/etc/grafana/grafana.ini" \
GF_PATHS_DATA="/var/lib/grafana" \
GF_PATHS_HOME="/usr/share/grafana" \
GF_PATHS_LOGS="/var/log/grafana" \
GF_PATHS_PLUGINS="/var/lib/grafana/plugins" \
GF_PATHS_PROVISIONING="/etc/grafana/provisioning"
GF_PATHS_CONFIG="/etc/grafana/grafana.ini" \
GF_PATHS_DATA="/var/lib/grafana" \
GF_PATHS_HOME="/usr/share/grafana" \
GF_PATHS_LOGS="/var/log/grafana" \
GF_PATHS_PLUGINS="/var/lib/grafana/plugins" \
GF_PATHS_PROVISIONING="/etc/grafana/provisioning"
WORKDIR $GF_PATHS_HOME
# Install dependencies
RUN if grep -i -q alpine /etc/issue; then \
apk add --no-cache ca-certificates bash tzdata musl-utils && \
apk info -vv | sort; \
elif grep -i -q ubuntu /etc/issue; then \
DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y ca-certificates curl tzdata musl && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*; \
else \
echo 'ERROR: Unsupported base image' && /bin/false; \
fi
RUN apk add --no-cache ca-certificates bash tzdata musl-utils
RUN apk info -vv | sort
# glibc support for alpine x86_64 only
RUN if grep -i -q alpine /etc/issue && [ `arch` = "x86_64" ]; then \
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk \
-O /tmp/glibc-2.35-r0.apk && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-bin-2.35-r0.apk \
-O /tmp/glibc-bin-2.35-r0.apk && \
apk add --force-overwrite --no-cache /tmp/glibc-2.35-r0.apk /tmp/glibc-bin-2.35-r0.apk && \
rm -f /lib64/ld-linux-x86-64.so.2 && \
ln -s /usr/glibc-compat/lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 && \
rm -f /tmp/glibc-2.35-r0.apk && \
rm -f /tmp/glibc-bin-2.35-r0.apk && \
rm -f /lib/ld-linux-x86-64.so.2 && \
rm -f /etc/ld.so.cache; \
fi
COPY --from=go-src /tmp/grafana/conf ./conf
COPY conf ./conf
RUN if [ ! $(getent group "$GF_GID") ]; then \
if grep -i -q alpine /etc/issue; then \
addgroup -S -g $GF_GID grafana; \
else \
addgroup --system --gid $GF_GID grafana; \
fi; \
fi && \
GF_GID_NAME=$(getent group $GF_GID | cut -d':' -f1) && \
mkdir -p "$GF_PATHS_HOME/.aws" && \
if grep -i -q alpine /etc/issue; then \
adduser -S -u $GF_UID -G "$GF_GID_NAME" grafana; \
else \
adduser --system --uid $GF_UID --ingroup "$GF_GID_NAME" grafana; \
fi && \
mkdir -p "$GF_PATHS_PROVISIONING/datasources" \
"$GF_PATHS_PROVISIONING/dashboards" \
"$GF_PATHS_PROVISIONING/notifiers" \
"$GF_PATHS_PROVISIONING/plugins" \
"$GF_PATHS_PROVISIONING/access-control" \
"$GF_PATHS_PROVISIONING/alerting" \
"$GF_PATHS_LOGS" \
"$GF_PATHS_PLUGINS" \
"$GF_PATHS_DATA" && \
cp conf/sample.ini "$GF_PATHS_CONFIG" && \
cp conf/ldap.toml /etc/grafana/ldap.toml && \
chown -R "grafana:$GF_GID_NAME" "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING" && \
chmod -R 777 "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING"
addgroup -S -g $GF_GID grafana; \
fi
COPY --from=go-src /tmp/grafana/bin/grafana* /tmp/grafana/bin/*/grafana* ./bin/
COPY --from=js-src /tmp/grafana/public ./public
COPY --from=go-src /tmp/grafana/LICENSE ./
RUN export GF_GID_NAME=$(getent group $GF_GID | cut -d':' -f1) && \
mkdir -p "$GF_PATHS_HOME/.aws" && \
adduser -S -u $GF_UID -G "$GF_GID_NAME" grafana && \
mkdir -p "$GF_PATHS_PROVISIONING/datasources" \
"$GF_PATHS_PROVISIONING/dashboards" \
"$GF_PATHS_PROVISIONING/notifiers" \
"$GF_PATHS_PROVISIONING/plugins" \
"$GF_PATHS_PROVISIONING/access-control" \
"$GF_PATHS_PROVISIONING/alerting" \
"$GF_PATHS_LOGS" \
"$GF_PATHS_PLUGINS" \
"$GF_PATHS_DATA" && \
cp "$GF_PATHS_HOME/conf/sample.ini" "$GF_PATHS_CONFIG" && \
cp "$GF_PATHS_HOME/conf/ldap.toml" /etc/grafana/ldap.toml && \
chown -R "grafana:$GF_GID_NAME" "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING" && \
chmod -R 777 "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING"
COPY --from=go-builder /grafana/bin/*/grafana-server /grafana/bin/*/grafana-cli ./bin/
COPY --from=js-builder /grafana/public ./public
COPY --from=js-builder /grafana/tools ./tools
EXPOSE 3000
ARG RUN_SH=./packaging/docker/run.sh
COPY ./packaging/docker/run.sh /run.sh
COPY ${RUN_SH} /run.sh
USER "$GF_UID"
USER grafana
ENTRYPOINT [ "/run.sh" ]

87
Dockerfile.ubuntu Normal file
View File

@@ -0,0 +1,87 @@
FROM node:16-alpine3.15 as js-builder
ENV NODE_OPTIONS=--max_old_space_size=8000
WORKDIR /usr/src/app/
COPY package.json yarn.lock ./
COPY packages packages
COPY .yarnrc.yml ./
COPY .yarn .yarn
COPY plugins-bundled plugins-bundled
RUN yarn install
COPY tsconfig.json .eslintrc .editorconfig .browserslistrc .prettierrc.js babel.config.json .linguirc ./
COPY public public
COPY tools tools
COPY scripts scripts
COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM golang:1.19.3 AS go-builder
WORKDIR /src/grafana
COPY go.mod go.sum embed.go ./
COPY Makefile build.go package.json ./
COPY .bingo .bingo
COPY pkg pkg/
COPY cue.mod cue.mod/
COPY packages/grafana-schema packages/grafana-schema/
COPY public/app/plugins public/app/plugins/
COPY public/api-spec.json public/api-spec.json
RUN go mod verify
RUN make build-go
FROM ubuntu:20.04
LABEL maintainer="Grafana team <hello@grafana.com>"
EXPOSE 3000
ARG GF_UID="472"
ARG GF_GID="472"
ENV PATH="/usr/share/grafana/bin:$PATH" \
GF_PATHS_CONFIG="/etc/grafana/grafana.ini" \
GF_PATHS_DATA="/var/lib/grafana" \
GF_PATHS_HOME="/usr/share/grafana" \
GF_PATHS_LOGS="/var/log/grafana" \
GF_PATHS_PLUGINS="/var/lib/grafana/plugins" \
GF_PATHS_PROVISIONING="/etc/grafana/provisioning"
WORKDIR $GF_PATHS_HOME
COPY conf conf
# curl should be part of the image
RUN apt-get update && apt-get install -y ca-certificates curl
RUN mkdir -p "$GF_PATHS_HOME/.aws" && \
addgroup --system --gid $GF_GID grafana && \
adduser --uid $GF_UID --system --ingroup grafana grafana && \
mkdir -p "$GF_PATHS_PROVISIONING/datasources" \
"$GF_PATHS_PROVISIONING/dashboards" \
"$GF_PATHS_PROVISIONING/notifiers" \
"$GF_PATHS_PROVISIONING/plugins" \
"$GF_PATHS_PROVISIONING/access-control" \
"$GF_PATHS_PROVISIONING/alerting" \
"$GF_PATHS_LOGS" \
"$GF_PATHS_PLUGINS" \
"$GF_PATHS_DATA" && \
cp conf/sample.ini "$GF_PATHS_CONFIG" && \
cp conf/ldap.toml /etc/grafana/ldap.toml && \
chown -R grafana:grafana "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING" && \
chmod -R 777 "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING"
COPY --from=go-builder /src/grafana/bin/*/grafana-server /src/grafana/bin/*/grafana-cli bin/
COPY --from=js-builder /usr/src/app/public public
COPY --from=js-builder /usr/src/app/tools tools
COPY packaging/docker/run.sh /
USER grafana
ENTRYPOINT [ "/run.sh" ]

View File

@@ -20,52 +20,43 @@ If you don't have the knowledge or time to code, consider helping with triage. T
<!-- https://textik.com/#610afa78553def29 -->
```
+-------------------+
| |
| new issue/ | +
| more info added |
| |
+---------|---------+
|
+-------------|-----------+
| |
NO +------- all info needed to ------+ YES
| | categorize the issue? | |
| | | |
| +-------------------------+ |
+------|-----------+ +------------|----------+
| | | |
| label: | | label: type/* |
| needs more info | | label: area/* |
| | | label: datasource/* |
+------------------+ | | |
+------------|----------+
|
+--------|-------+
| |
NO +---------- is duplicate? --------------------+ YES
| | | |
| +----------------+ |
| +----------------|---------------+
+------|-----+ | |
| | | add comment: |
NO +------------ can repro? ------------+ YES | |
| | | | | /duplicate of #<issue number> |
| +------------+ | | |
| | +--------------------------------+
+-------------|-------------+ |
| | +--------|---------+
| label: | | |
| triage/needs-confirmation | NO +-------- needs priority? ------+ YES
| | | | | |
+-------------|-------------+ | +------------------+ |
| | |
+-------------|------+ +-------|--------+ +----------|---------+
| | | | | |
| Assign to project ------ Done -------------- label: priority/* |
| | | | | |
+--------------------+ +----------------+ +--------------------+
+--------------------------+
+----------------+ New issue opened/ |
| | more information added |
| +-------------+------------+
| Ask for more |
| information +-------------+------------+
| | All information needed |
| +--------+ to categorize the issue? +--------+
| | | | |
| | NO +--------------------------+ YES |
| | |
+------+-------+-------------+ +------------+---------+ +----------------------------+
| | | | | |
| label: needs more info | | Needs investigation? +--YES---+ label: needs investigation |
| | | | | |
+----------------------------+ +----------------+-----+ +--------------+-------------+
NO | |
| Investigate |
+-----------+----------+ |
| label: type/* | |
| label: area/* +------------------+
| label: datasource/* |
+-----|----------+-----+
| |
| |
| +--+--------------------+ +--------------------+
| | | | label: priority/* |
| | Needs priority? +--YES---+| milestone? |
| | | | |
| +--------------------+--+ +----+---------------+
| NO | |
| | |
+----+-------------+ +---+----------+ |
| | | | |
| Close issue +----------+ Done +------+
| | | |
+------------------+ +--------------+
```
## 1. Find uncategorized issues
@@ -96,29 +87,28 @@ Given a certain [issue template](https://github.com/grafana/grafana/issues/new/c
Should explain what happened, what was expected and how to reproduce it together with any additional information that may help giving a complete picture of what happened such as screenshots, [query inspector](https://community.grafana.com/t/using-grafanas-query-inspector-to-troubleshoot-issues/2630) output and any environment related information that's applicable and/or maybe related to the reported problem:
- Grafana version:
- Data source type & version:
- OS Grafana is installed on:
- User OS & Browser:
- Grafana plugins:
- Others:
- Grafana version
- Data source type & version
- Platform & OS Grafana is installed on
- User OS & Browser + versions
- Using docker + what environment
- Which plugins
- Configuration database in use (sqlite, mysql, postgres)
- Reverse proxy in front of Grafana, what version and configuration
- Non-default configuration settings
- Development environment like Go and Node versions, if applicable
#### Enhancement requests
Enhancement requests (aka. feature requests) should be created as a [Github discussion](https://github.com/grafana/grafana/discussions). When submitting an enhancement request we ask that users focus on the problem they'd like to solve and why its a problem rather than focusing on the solution itself. To facilitate this we recommend using the following template:
- What would you like to be added?:
- Why is this needed (describe your use case and goals)\*\*?:
Should explain what enhancement or feature that the author wants to be added and why that is needed.
#### Accessibility issues
This is a mix between a bug report and enhancement request but focused on accessibility issues to help make Grafana improve keyboard navigation, screen-reader support and being accessible to everyone. The report should include relevant [WCAG criteria](https://www.w3.org/WAI/WCAG21/quickref/?versions=2.0), if applicable.
Grafana Labs is dedicated to improving our graphical user interfaces and overall experience so that our product becomes usable and accessible for people with disabilities as well as anyone else. Learn more about Grafana's commitment to [A11y](https://grafana.com/accessibility/) (accessibility).
This is a mix between a bug report and enhancement request but focused on accessibility issues to help make Grafana improve keyboard navigation, screen-reader support and being accessible to everyone. The report should include relevant WCAG criteria, if applicable.
#### Support requests
In general, if the issue description and title is perceived as a question no more information is needed. See how to categorize these requests [here](#support-requests-1).
In general, if the issue description and title is perceived as a question no more information is needed.
### Good practices
@@ -132,7 +122,7 @@ To make it easier for everyone to understand and find issues they're searching f
### Do you have all the information needed to categorize an issue?
Depending on the issue, you might not feel all this information is needed. Use your best judgement. If you cannot triage an issue using what its author provided, explain kindly to the author that they must provide the above information to clarify the problem. Label issue with `needs more info` and add any related `area/*` or `datasource/*` labels. Alternatively, use `bot/needs more info` label and the Grafana bot will request it for you.
Depending on the issue, you might not feel all this information is needed. Use your best judgement. If you cannot triage an issue using what its author provided, explain kindly to the author that they must provide the above information to clarify the problem. Label issue with `needs more detail` and add any related `area/*` or `datasource/*` labels.
If the author provides the standard information but you are still unable to triage the issue, request additional information. Do this kindly and politely because you are asking for more of the author's time.
@@ -168,7 +158,7 @@ Make sure it's not a duplicate by searching existing issues using related terms
1. Add a comment `/duplicate of #<issue number>`. GitHub will recognize this and add some additional context to the issue activity.
2. The Grafana bot will do the rest, adding the correct label and closing comment
3. Add `type/duplicate` label. Optionally add any related `area/*` or `datasource/*` labels.
3. Optionally add any related `area/*` or `datasource/*` labels.
### Bug reports
@@ -193,8 +183,8 @@ If it's not perfectly clear that it's an actual bug, quickly try to reproduce it
### Enhancement/feature?
1. Remind the contributor that enhancement/feature request should be created as a GitHub discussion. See [Enhancements requests.](https://github.com/grafana/grafana/blob/main/ISSUE_TRIAGE.md#enhancement-requests)
2. Label the issue `type/feature-request` and at least one `area/*` or `datasource/*` label.
1. Label the issue `type/feature-request` and at least one `area/*` or `datasource/*` label.
2. Move on to [prioritizing the issue](#4-prioritization-of-issues).
### Documentation issue?
@@ -225,7 +215,7 @@ There's a minor typo/error/lack of information that adds a lot of confusion for
### Support requests
1. Kindly and politely direct the issue author to the [community site](https://community.grafana.com/) and explain that GitHub is mainly used for tracking bugs and feature requests. If possible, it's usually a good idea to add some pointers to the issue author's question.
2. Label the issue with `bot/question`. The Grafana bot will automatically close the issue, and it will add the type/question label for you.
2. Close the issue and label it with `type/question`.
## 4. Prioritization of issues
@@ -306,7 +296,7 @@ In many cases the issue author or community as a whole is more suitable to contr
## Investigation of issues
When an issue has all basic information provided, but the triage responsible haven't been able to reproduce the reported problem at a first glance, the issue is labeled [`triage/needs-confirmation`](https://github.com/grafana/grafana/labels/triage%2Fneeds-confirmation). Depending on the perceived severity and/or number of [upvotes](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments), the investigation will either be delegated to another maintainer for further investigation or put on hold until someone else (maintainer or contributor) picks it up and eventually starts investigating it.
When an issue has all basic information provided, but the triage responsible haven't been able to reproduce the reported problem at a first glance, the issue is labeled [Needs investigation](https://github.com/grafana/grafana/labels/needs%20investigation). Depending on the perceived severity and/or number of [upvotes](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments), the investigation will either be delegated to another maintainer for further investigation or put on hold until someone else (maintainer or contributor) picks it up and eventually starts investigating it.
Investigating issues can be a very time consuming task, especially for the maintainers, given the huge number of combinations of plugins, data sources, platforms, databases, browsers, tools, hardware, integrations, versions and cloud services, etc that are being used with Grafana. There is a certain number of combinations that are more common than others, and these are in general easier for maintainers to investigate.
@@ -318,16 +308,19 @@ Even if you don't have the time or knowledge to investigate an issue we highly r
We have some automation that triggers on comments or labels being added to issues. Many of these automated behaviors are defined in [commands.json](https://github.com/grafana/grafana/blob/main/.github/commands.json). Or in other [GitHub Actions](https://github.com/grafana/grafana/tree/main/.github/workflows)
- Add /duplicate `#<issue number>` to have Grafana label & close issue with an appropriate message.
- Add `bot/question` and the bot will close it with an appropriate message.
[Read more on bot actions](https://github.com/grafana/grafana/blob/main/.github/bot.md)
## External PRs
Part of issue triage should also be triaging of external PRs. Main goal should be to make sure PRs from external contributors have an owner/reviewer and are not forgotten.
1. Check new external PRs which do not have a reviewer. You can easily search for pull requests made by external contributors by using the label: `pr/external` in your [query search](https://github.com/grafana/grafana/pulls?q=is%3Aopen+is%3Apr+label%3Apr%2Fexternal) Note: external PRs are automatically labeled with `pr/external` upon creation.
2. Check if there is a link to an existing issue. The link to a existing issue should be in the description section, underneath “Which issue(s) does this PR fix?:”.
3. If not and you know which issue it is solving, add the link yourself, otherwise ask the author to link the issue or create one.
4. Assign a reviewer based on who was handling the linked issue or what code or feature does the PR touches (look at who was the last to make changes there if all else fails).
1. Check new external PRs which do not have a reviewer.
1. Check if there is a link to an existing issue.
1. If not and you know which issue it is solving, add the link yourself, otherwise ask the author to link the issue or create one.
1. Assign a reviewer based on who was handling the linked issue or what code or feature does the PR touches (look at who was the last to make changes there if all else fails).
## Appendix

View File

@@ -15,14 +15,12 @@ packages/grafana-e2e-selectors/
packages/grafana-runtime/
packages/grafana-toolkit/
packages/grafana-ui/
packages/jaeger-ui-components/
packaging/
kinds/
pkg/kinds/
pkg/kindsys/
pkg/registry/corekind/
pkg/coremodel/
pkg/framework/coremodel/
grafana-mixin/
public/app/plugins/datasource/tempo
public/app/features/explore/TraceView/components
cue/
public/img/icons/solid/
public/img/icons/unicons/
```

View File

@@ -7,13 +7,12 @@ WIRE_TAGS = "oss"
-include local/Makefile
include .bingo/Variables.mk
.PHONY: all deps-go deps-js deps build-go build-backend build-server build-cli build-js build build-docker-full build-docker-full-ubuntu lint-go golangci-lint test-go test-js gen-ts test run run-frontend clean devenv devenv-down protobuf drone help gen-go gen-cue fix-cue
.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-full build-docker-full-ubuntu lint-go golangci-lint test-go test-js gen-ts test run run-frontend clean devenv devenv-down protobuf drone help gen-go gen-cue
GO = go
GO_FILES ?= ./pkg/...
SH_FILES ?= $(shell find ./scripts -name *.sh)
GO_BUILD_FLAGS += $(if $(GO_BUILD_DEV),-dev)
GO_BUILD_FLAGS += $(if $(GO_BUILD_DEV),-dev)
GO_BUILD_FLAGS += $(if $(GO_BUILD_TAGS),-build-tags=$(GO_BUILD_TAGS))
all: deps build
@@ -47,8 +46,7 @@ $(SPEC_TARGET): $(SWAGGER) ## Generate API Swagger specification
SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -m -w pkg/server -o $(SPEC_TARGET) \
-x "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" \
-x "github.com/prometheus/alertmanager" \
-i pkg/api/swagger_tags.json \
--exclude-tag=alpha
-i pkg/api/swagger_tags.json
swagger-api-spec: gen-go $(SPEC_TARGET) $(MERGED_SPEC_TARGET) validate-api-spec
@@ -67,31 +65,17 @@ openapi3-gen: swagger-api-spec ## Generates OpenApi 3 specs from the Swagger 2 a
##@ Building
gen-cue: ## Do all CUE/Thema code generation
@echo "generate code from .cue files"
go generate ./pkg/plugins/plugindef
go generate ./kinds/gen.go
go generate ./public/app/plugins/gen.go
go generate ./pkg/kindsys/report.go
go generate ./pkg/framework/coremodel
go generate ./public/app/plugins
gen-go: $(WIRE) gen-cue
@echo "generate go files"
$(WIRE) gen -tags $(WIRE_TAGS) ./pkg/server ./pkg/cmd/grafana-cli/runner
fix-cue: $(CUE)
@echo "formatting cue files"
$(CUE) fix kinds/**/*.cue
$(CUE) fix public/app/plugins/**/**/*.cue
gen-jsonnet:
go generate ./devenv/jsonnet
build-go: $(MERGED_SPEC_TARGET) gen-go ## Build all Go binaries.
@echo "build go files"
$(GO) run build.go $(GO_BUILD_FLAGS) build
build-backend: ## Build Grafana backend.
@echo "build backend"
$(GO) run build.go $(GO_BUILD_FLAGS) build-backend
build-server: ## Build Grafana server.
@echo "build server"
$(GO) run build.go $(GO_BUILD_FLAGS) build-server
@@ -132,13 +116,13 @@ test-go-integration: ## Run integration tests for backend with flags.
test-go-integration-postgres: devenv-postgres ## Run integration tests for postgres backend with flags.
@echo "test backend integration postgres tests"
$(GO) clean -testcache
$(GO) list './pkg/...' | xargs -I {} sh -c 'GRAFANA_TEST_DB=postgres go test -run Integration -covermode=atomic -timeout=2m {}'
$(GO) list './pkg/...' | xargs -I {} sh -c 'GRAFANA_TEST_DB=postgres go test -run Integration -covermode=atomic -timeout=30m {}'
.PHONY: test-go-integration-mysql
test-go-integration-mysql: devenv-mysql ## Run integration tests for mysql backend with flags.
@echo "test backend integration mysql tests"
$(GO) clean -testcache
$(GO) list './pkg/...' | xargs -I {} sh -c 'GRAFANA_TEST_DB=mysql go test -run Integration -covermode=atomic -timeout=2m {}'
$(GO) list './pkg/...' | xargs -I {} sh -c 'GRAFANA_TEST_DB=mysql go test -run Integration -covermode=atomic -timeout=30m {}'
test-js: ## Run tests for frontend.
@echo "test frontend"
@@ -164,17 +148,12 @@ shellcheck: $(SH_FILES) ## Run checks for shell scripts.
build-docker-full: ## Build Docker image for development.
@echo "build docker container"
DOCKER_BUILDKIT=1 \
docker build \
--tag grafana/grafana:dev .
docker build --tag grafana/grafana:dev .
build-docker-full-ubuntu: ## Build Docker image based on Ubuntu for development.
@echo "build docker container"
DOCKER_BUILDKIT=1 \
docker build \
--build-arg BASE_IMAGE=ubuntu:20.04 \
--build-arg GO_IMAGE=golang:1.20.4 \
--tag grafana/grafana:dev-ubuntu .
docker build --tag grafana/grafana:dev-ubuntu -f ./Dockerfile.ubuntu .
##@ Services
@@ -239,12 +218,5 @@ drone: $(DRONE)
$(DRONE) lint .drone.yml --trusted
$(DRONE) --server https://drone.grafana.net sign --save grafana/grafana
# Generate an Emacs tags table (https://www.gnu.org/software/emacs/manual/html_node/emacs/Tags-Tables.html) for Starlark files.
scripts/drone/TAGS: $(shell find scripts/drone -name '*.star')
etags --lang none --regex="/def \(\w+\)[^:]+:/\1/" --regex="/\s*\(\w+\) =/\1/" $^ -o $@
format-drone:
buildifier -r scripts/drone
help: ## Display this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

33
PLUGIN_DEV.md Normal file
View File

@@ -0,0 +1,33 @@
# Plugin development
This document is not meant as a complete guide for developing plugins but more as a changelog for changes in
Grafana that can impact plugin development. Whenever you as a plugin author encounter an issue with your plugin after
upgrading Grafana please check here before creating an issue.
## Plugin development resources
- [Grafana plugin developer guide](https://grafana.com/docs/grafana/latest/developers/plugins/)
- [Webpack Grafana plugin template project](https://github.com/CorpGlory/grafana-plugin-template-webpack)
- [Simple JSON datasource plugin](https://github.com/grafana/simple-json-datasource)
## Changes in Grafana v4.6
This version of Grafana has big changes that will impact a limited set of plugins. We moved from systemjs to webpack
for built-in plugins and everything internal. External plugins still use systemjs but now with a limited
set of Grafana components they can import. Plugins can depend on libs like lodash & moment and internal components
like before using the same import paths. However since everything in Grafana is no longer accessible, a few plugins could encounter issues when importing a Grafana dependency.
[List of exposed components plugins can import/require](https://github.com/grafana/grafana/blob/main/public/app/features/plugins/plugin_loader.ts#L48)
If you think we missed exposing a crucial lib or Grafana component let us know by opening an issue.
### Deprecated components
The angular directive `<spectrum-picker>` is now deprecated (will still work for a version more) but we recommend plugin authors
upgrade to new `<color-picker color="ctrl.color" onChange="ctrl.onSparklineColorChange"></color-picker>`
## Changes in Grafana v6.0
### DashboardSrv.ts
If you utilize [DashboardSrv](https://github.com/grafana/grafana/commit/8574dca081002f36e482b572517d8f05fd44453f#diff-1ab99561f9f6a10e1fafcddc39bc1d65) in your plugin code, `dash` was renamed to `dashboard`.

View File

@@ -18,7 +18,7 @@ Grafana allows you to query, visualize, alert on and understand your metrics no
## Get started
- [Get Grafana](https://grafana.com/get)
- [Installation guides](https://grafana.com/docs/grafana/latest/setup-grafana/installation/)
- [Installation guides](http://docs.grafana.org/installation/)
Unsure if Grafana is for you? Watch Grafana in action on [play.grafana.org](https://play.grafana.org/)!

View File

@@ -14,6 +14,7 @@ Grafana Labs will send you a response indicating the next steps in handling your
## Security announcements
We will post a summary, remediation, and mitigation details for any patch containing security fixes on the Grafana blog. The security announcement blog posts will be tagged with the [security tag](https://grafana.com/tags/security/).
We maintain a category on the community site called [Security Announcements](https://community.grafana.com/c/support/security-announcements),
where we will post a summary, remediation, and mitigation details for any patch containing security fixes.
You can also track security announcements via the [RSS feed](https://grafana.com/tags/security/index.xml).
You can also subscribe to email updates to this category if you have a grafana.com account and sign on to the community site or track updates via an [RSS feed](https://community.grafana.com/c/support/security-announcements.rss).

View File

@@ -66,15 +66,6 @@ enable_gzip = false
cert_file =
cert_key =
# Unix socket gid
# Changing the gid of a file without privileges requires that the target group is in the group of the process and that the process is the file owner
# It is recommended to set the gid as http server user gid
# Not set when the value is -1
socket_gid = -1
# Unix socket mode
socket_mode = 0660
# Unix socket path
socket = /tmp/grafana.sock
@@ -85,11 +76,6 @@ cdn_url =
# `0` means there is no timeout for reading the request.
read_timeout = 0
# This setting enables you to specify additional headers that the server adds to HTTP(S) responses.
[server.custom_response_headers]
#exampleHeader1 = exampleValue1
#exampleHeader2 = exampleValue2
#################################### Database ############################
[database]
# You can configure the database connection by specifying type, host, name, user and password
@@ -139,18 +125,9 @@ path = grafana.db
# For "sqlite3" only. cache mode setting used for connecting to the database
cache_mode = private
# For "sqlite3" only. Enable/disable Write-Ahead Logging, https://sqlite.org/wal.html. Default is false.
wal = false
# For "mysql" only if migrationLocking feature toggle is set. How many seconds to wait before failing to lock the database for the migrations, default is 0.
locking_attempt_timeout_sec = 0
# For "sqlite" only. How many times to retry query in case of database is locked failures. Default is 0 (disabled).
query_retries = 0
# For "sqlite" only. How many times to retry transaction in case of database is locked failures. Default is 5.
transaction_retries = 5
#################################### Cache server #############################
[remote_cache]
# Either "redis", "memcached" or "database" default is "database"
@@ -162,12 +139,6 @@ type = database
# memcache: 127.0.0.1:11211
connstr =
# prefix prepended to all the keys in the remote cache
prefix =
# This enables encryption of values stored in the remote cache
encryption =
#################################### Data proxy ###########################
[dataproxy]
@@ -244,9 +215,6 @@ google_analytics_ua_id =
# Google Analytics 4 tracking code, only enabled if you specify an id here
google_analytics_4_id =
# When Google Analytics 4 Enhanced event measurement is enabled, we will try to avoid sending duplicate events and let Google Analytics 4 detect navigation changes, etc.
google_analytics_4_send_manual_page_views = false
# Google Tag Manager ID, only enabled if you specify an id here
google_tag_manager_id =
@@ -262,9 +230,6 @@ rudderstack_sdk_url =
# Rudderstack Config url, optional, used by Rudderstack SDK to fetch source config
rudderstack_config_url =
# Intercom secret, optional, used to hash user_id before passing to Intercom via Rudderstack
intercom_secret =
# Application Insights connection string. Specify an URL string to enable this feature.
application_insights_connection_string =
@@ -346,15 +311,6 @@ content_security_policy = false
# $ROOT_PATH is server.root_url without the protocol.
content_security_policy_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
# Enable adding the Content-Security-Policy-Report-Only header to your requests.
# Allows you to monitor the effects of a policy without enforcing it.
content_security_policy_report_only = false
# Set Content Security Policy Report Only template used when adding the Content-Security-Policy-Report-Only header to your requests.
# $NONCE in the template includes a random nonce.
# $ROOT_PATH is server.root_url without the protocol.
content_security_policy_report_only_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
# Controls if old angular plugins are supported or not. This will be disabled by default in future release
angular_support_enabled = true
@@ -369,9 +325,6 @@ data_keys_cache_cleanup_interval = 1m
#################################### Snapshots ###########################
[snapshots]
# set to false to remove snapshot functionality
enabled = true
# snapshot sharing options
external_enabled = true
external_snapshot_url = https://snapshots.raintank.io
@@ -426,11 +379,11 @@ verify_email_enabled = false
login_hint = email or username
password_hint = password
# Default UI theme ("dark" or "light" or "system")
# Default UI theme ("dark" or "light")
default_theme = dark
# Default UI language (supported IETF language tag, such as en-US)
default_language = en-US
# Default locale (supported IETF language tag, such as en-US)
default_locale = en-US
# Path to a custom home page. Users are only redirected to this if the default home dashboard is used. It should match a frontend route and contain a leading slash.
home_page =
@@ -452,17 +405,10 @@ user_invite_max_lifetime_duration = 24h
# Enter a comma-separated list of usernames to hide them in the Grafana UI. These users are shown to Grafana admins and to themselves.
hidden_users =
[service_accounts]
# When set, Grafana will not allow the creation of tokens with expiry greater than this setting.
token_expiration_day_limit =
[auth]
# Login cookie name
login_cookie_name = grafana_session
# Disable usage of Grafana build-in login solution.
disable_login = false
# The maximum lifetime (duration) an authenticated user can be inactive before being required to login at next visit. Default is 7 days (7d). This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month). The lifetime resets at each successful token rotation (token_rotation_interval_minutes).
login_maximum_inactive_lifetime_duration =
@@ -483,7 +429,6 @@ signout_redirect_url =
# Set to true to attempt login with OAuth automatically, skipping the login screen.
# This setting is ignored if multiple OAuth providers are configured.
# Deprecated, use auto_login option for specific provider instead.
oauth_auto_login = false
# OAuth state max age cookie duration in seconds. Defaults to 600 seconds.
@@ -504,9 +449,6 @@ sigv4_verbose_logging = false
# Set to true to enable Azure authentication option for HTTP-based datasources
azure_auth_enabled = false
# Use email lookup in addition to the unique ID provided by the IdP
oauth_allow_insecure_email_lookup = false
#################################### Anonymous Auth ######################
[auth.anonymous]
# enable anonymous access
@@ -525,7 +467,6 @@ hide_version = false
[auth.github]
enabled = false
allow_sign_up = true
auto_login = false
client_id = some_id
client_secret =
scopes = user:email,read:org
@@ -538,17 +479,11 @@ allowed_organizations =
role_attribute_path =
role_attribute_strict = false
allow_assign_grafana_admin = false
skip_org_role_sync = false
tls_skip_verify_insecure = false
tls_client_cert =
tls_client_key =
tls_client_ca =
#################################### GitLab Auth #########################
[auth.gitlab]
enabled = false
allow_sign_up = true
auto_login = false
client_id = some_id
client_secret =
scopes = api
@@ -560,13 +495,11 @@ allowed_groups =
role_attribute_path =
role_attribute_strict = false
allow_assign_grafana_admin = false
skip_org_role_sync = false
#################################### Google Auth #########################
[auth.google]
enabled = false
allow_sign_up = true
auto_login = false
client_id = some_client_id
client_secret =
scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
@@ -575,7 +508,6 @@ token_url = https://accounts.google.com/o/oauth2/token
api_url = https://www.googleapis.com/oauth2/v1/userinfo
allowed_domains =
hosted_domain =
skip_org_role_sync = false
#################################### Grafana.com Auth ####################
# legacy key names (so they work in env variables)
@@ -590,19 +522,16 @@ allowed_organizations =
[auth.grafana_com]
enabled = false
allow_sign_up = true
auto_login = false
client_id = some_id
client_secret =
scopes = user:email
allowed_organizations =
skip_org_role_sync = false
#################################### Azure AD OAuth #######################
[auth.azuread]
name = Azure AD
enabled = false
allow_sign_up = true
auto_login = false
client_id = some_client_id
client_secret =
scopes = openid email profile
@@ -620,7 +549,6 @@ name = Okta
icon = okta
enabled = false
allow_sign_up = true
auto_login = false
client_id = some_id
client_secret =
scopes = openid profile email groups
@@ -632,7 +560,6 @@ allowed_groups =
role_attribute_path =
role_attribute_strict = false
allow_assign_grafana_admin = false
skip_org_role_sync = false
#################################### Generic OAuth #######################
[auth.generic_oauth]
@@ -640,7 +567,6 @@ name = OAuth
icon = signin
enabled = false
allow_sign_up = true
auto_login = false
client_id = some_id
client_secret =
scopes = user:email
@@ -695,14 +621,13 @@ username_claim =
jwk_set_url =
jwk_set_file =
cache_ttl = 60m
expect_claims = {}
expected_claims = {}
key_file =
role_attribute_path =
role_attribute_strict = false
auto_sign_up = false
url_login = false
allow_assign_grafana_admin = false
skip_org_role_sync = false
#################################### Auth LDAP ###########################
[auth.ldap]
@@ -750,10 +675,6 @@ managed_identity_client_id =
# If enabled, cache permissions in a in memory cache
permission_cache = true
# Reset basic roles permissions on boot
# Warning left to true, basic roles permissions will be reset on every boot
reset_basic_roles = false
#################################### SMTP / Emailing #####################
[smtp]
enabled = false
@@ -965,17 +886,10 @@ max_attempts = 3
min_interval = 10s
[unified_alerting.screenshots]
# Enable screenshots in notifications. You must have either installed the Grafana image rendering
# plugin, or set up Grafana to use a remote rendering service.
# Enable screenshots in notifications. This option requires the Grafana Image Renderer plugin.
# For more information on configuration options, refer to [rendering].
capture = false
# The timeout for capturing screenshots. If a screenshot cannot be captured within the timeout then
# the notification is sent without a screenshot. The maximum duration is 30 seconds. This timeout
# should be less than the minimum Interval of all Evaluation Groups to avoid back pressure on alert
# rule evaluation.
capture_timeout = 10s
# The maximum number of screenshots that can be taken at the same time. This option is different from
# concurrent_render_request_limit as max_concurrent_screenshots sets the number of concurrent screenshots
# that can be taken at the same time for all firing alerts where as concurrent_render_request_limit sets
@@ -992,10 +906,6 @@ upload_external_image_storage = false
# For example: `disabled_labels=grafana_folder`
disabled_labels =
[unified_alerting.state_history]
# Enable the state history functionality in Unified Alerting. The previous states of alert rules will be visible in panels and in the UI.
enabled = true
#################################### Alerting ############################
[alerting]
# Enable the legacy alerting sub-system and interface. If Unified Alerting is already enabled and you try to go back to legacy alerting, all data that is part of Unified Alerting will be deleted. When this configuration section and flag are not defined, the state is defined at runtime. See the documentation for more details.
@@ -1113,7 +1023,6 @@ url = https://grafana.com
[grafana_com]
url = https://grafana.com
api_url = https://grafana.com/api
#################################### Distributed tracing ############
# Opentracing is deprecated use opentelemetry instead
@@ -1191,7 +1100,6 @@ signed_url_expiration =
account_name =
account_key =
container_name =
sas_token_expiration_days =
[external_image_storage.local]
# does not require any configuration
@@ -1207,11 +1115,6 @@ renderer_token = -
# Concurrent render request limit affects when the /render HTTP endpoint is used. Rendering many images at the same time can overload the server,
# which this setting can help protect against by only allowing a certain amount of concurrent requests.
concurrent_render_request_limit = 30
# Determines the lifetime of the render key used by the image renderer to access and render Grafana.
# This setting should be expressed as a duration. Examples: 10s (seconds), 5m (minutes), 2h (hours).
# Default is 5m. This should be more than enough for most deployments.
# Change the value only if image rendering is failing and you see `Failed to get the render key from cache` in Grafana logs.
render_key_lifetime = 5m
[panels]
# here for to support old env variables, can remove after a few months
@@ -1326,10 +1229,20 @@ license_path =
# enable = feature1,feature2
enable =
# Some features are enabled by default, see:
# https://grafana.com/docs/grafana/next/setup-grafana/configure-grafana/feature-toggles/
# To enable features by default, set `Expression: "true"` in:
# https://github.com/grafana/grafana/blob/main/pkg/services/featuremgmt/registry.go
# The new prometheus visual query builder
promQueryBuilder = true
# The new loki visual query builder
lokiQueryBuilder = true
# Experimental Explore to Dashboard workflow
explore2Dashboard = true
# Command Palette
commandPalette = true
# Use dynamic labels in CloudWatch datasource
cloudWatchDynamicLabels = true
# feature1 = true
# feature2 = false
@@ -1406,24 +1319,3 @@ full_reindex_interval = 5m
# Defines the frequency of partial index updates based on recent changes such as dashboard updates.
# This is a temporary settings that might be removed in the future.
index_update_interval = 10s
# Move an app plugin referenced by its id (including all its pages) to a specific navigation section
# Dependencies: needs the `topnav` feature to be enabled
# Format: <Plugin ID> = <Section ID> <Sort Weight>
[navigation.app_sections]
# Move a specific app plugin page (referenced by its `path` field) to a specific navigation section
# Format: <Page URL> = <Section ID> <Sort Weight>
[navigation.app_standalone_pages]
#################################### Secure Socks5 Datasource Proxy #####################################
[secure_socks_datasource_proxy]
enabled = false
root_ca_cert =
client_key =
client_cert =
server_name =
# The address of the socks5 proxy datasources should connect to
proxy_address =

View File

@@ -24,8 +24,6 @@ bind_dn = "cn=admin,dc=grafana,dc=org"
# Search user bind password
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
bind_password = 'grafana'
# We recommend using variable expansion for the bind_password, for more info https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#variable-expansion
# bind_password = '$__env{LDAP_BIND_PASSWORD}'
# Timeout in seconds (applies to each host specified in the 'host' entry (space separated))
timeout = 10
@@ -60,7 +58,7 @@ org_role = "Admin"
# org_id = 1
[[servers.group_mappings]]
group_dn = "cn=editors,ou=groups,dc=grafana,dc=org"
group_dn = "cn=users,ou=groups,dc=grafana,dc=org"
org_role = "Editor"
[[servers.group_mappings]]

View File

@@ -11,7 +11,7 @@ apiVersion: 1
# folder: my_first_folder
# # <duration, required> interval of the rule group evaluation
# interval: 60s
# # <list, required> list of rules that are part of the rule group
# # <list, required> list of rules that are part of the rule group
# rules:
# # <string, required> unique identifier for the rule
# - uid: my_id_1
@@ -23,7 +23,7 @@ apiVersion: 1
# # evaluation - should be obtained via the API
# data:
# - refId: A
# datasourceUid: "__expr__"
# datasourceUid: "-100"
# model:
# conditions:
# - evaluator:
@@ -40,7 +40,7 @@ apiVersion: 1
# type: query
# datasource:
# type: __expr__
# uid: "__expr__"
# uid: "-100"
# expression: 1==0
# intervalMs: 1000
# maxDataPoints: 43200
@@ -53,7 +53,7 @@ apiVersion: 1
# # <string> state of the alert rule when no data is returned
# # possible values: "NoData", "Alerting", "OK", default = NoData
# noDataState: Alerting
# # <string> state of the alert rule when the query execution
# # <string> state of the alert rule when the query execution
# # fails - possible values: "Error", "Alerting", "OK"
# # default = Alerting
# executionErrorState: Alerting
@@ -62,11 +62,10 @@ apiVersion: 1
# # <map<string, string>> map of strings to attach arbitrary custom data
# annotations:
# some_key: some_value
# # <map<string, string> map of strings to filter and
# # <map<string, string> map of strings to filter and
# # route alerts
# labels:
# team: sre_team_1
# isPaused: false
# # List of alert rule UIDs that should be deleted
# deleteRules:
@@ -104,7 +103,7 @@ apiVersion: 1
# # <list<string>> The labels by which incoming alerts are grouped together. For example,
# # multiple alerts coming in for cluster=A and alertname=LatencyHigh would
# # be batched into a single group.
# #
# #
# # To aggregate by all possible labels, use the special value '...' as
# # the sole label name, for example:
# # group_by: ['...']
@@ -128,18 +127,18 @@ apiVersion: 1
# mute_time_intervals:
# - abc
# # <duration> How long to initially wait to send a notification for a group
# # of alerts. Allows to collect more initial alerts for the same group.
# # of alerts. Allows to collect more initial alerts for the same group.
# # (Usually ~0s to few minutes), default = 30s
# group_wait: 30s
# # <duration> How long to wait before sending a notification about new alerts that
# # are added to a group of alerts for which an initial notification has
# # already been sent. (Usually ~5m or more), default = 5m
# group_interval: 5m
# group_internval: 5m
# # <duration> How long to wait before sending a notification again if it has already
# # been sent successfully for an alert. (Usually ~3h or more), default = 4h
# repeat_interval: 4h
# # <list> Zero or more child routes
# routes:
# routes:
# ...
# # List of orgIds that should be reset to the default policy

View File

@@ -67,15 +67,6 @@
;cert_file =
;cert_key =
# Unix socket gid
# Changing the gid of a file without privileges requires that the target group is in the group of the process and that the process is the file owner
# It is recommended to set the gid as http server user gid
# Not set when the value is -1
;socket_gid =
# Unix socket mode
;socket_mode =
# Unix socket path
;socket =
@@ -86,11 +77,6 @@
# `0` means there is no timeout for reading the request.
;read_timeout = 0
# This setting enables you to specify additional headers that the server adds to HTTP(S) responses.
[server.custom_response_headers]
#exampleHeader1 = exampleValue1
#exampleHeader2 = exampleValue2
#################################### Database ####################################
[database]
# You can configure the database connection by specifying type, host, name, user and password
@@ -108,8 +94,7 @@
# Example: mysql://user:secret@host:port/database
;url =
# For "postgres", use either "disable", "require" or "verify-full"
# For "mysql", use either "true", "false", or "skip-verify".
# For "postgres" only, either "disable", "require" or "verify-full"
;ssl_mode = disable
# Database drivers may support different transaction isolation levels.
@@ -141,18 +126,9 @@
# For "sqlite3" only. cache mode setting used for connecting to the database. (private, shared)
;cache_mode = private
# For "sqlite3" only. Enable/disable Write-Ahead Logging, https://sqlite.org/wal.html. Default is false.
;wal = false
# For "mysql" only if migrationLocking feature toggle is set. How many seconds to wait before failing to lock the database for the migrations, default is 0.
;locking_attempt_timeout_sec = 0
# For "sqlite" only. How many times to retry query in case of database is locked failures. Default is 0 (disabled).
;query_retries = 0
# For "sqlite" only. How many times to retry transaction in case of database is locked failures. Default is 5.
;transaction_retries = 5
################################### Data sources #########################
[datasources]
# Upper limit of data sources that Grafana will return. This limit is a temporary configuration and it will be deprecated when pagination will be introduced on the list data sources API.
@@ -169,12 +145,6 @@
# memcache: 127.0.0.1:11211
;connstr =
# prefix prepended to all the keys in the remote cache
; prefix =
# This enables encryption of values stored in the remote cache
;encryption =
#################################### Data proxy ###########################
[dataproxy]
@@ -249,10 +219,7 @@
;google_analytics_ua_id =
# Google Analytics 4 tracking code, only enabled if you specify an id here
;google_analytics_4_id =
# When Google Analytics 4 Enhanced event measurement is enabled, we will try to avoid sending duplicate events and let Google Analytics 4 detect navigation changes, etc.
;google_analytics_4_send_manual_page_views = false
;google_analytics_4_id =
# Google Tag Manager ID, only enabled if you specify an id here
;google_tag_manager_id =
@@ -269,9 +236,6 @@
# Rudderstack Config url, optional, used by Rudderstack SDK to fetch source config
;rudderstack_config_url =
# Intercom secret, optional, used to hash user_id before passing to Intercom via Rudderstack
;intercom_secret =
# Controls if the UI contains any links to user feedback forms
;feedback_links_enabled = true
@@ -347,14 +311,6 @@
# $ROOT_PATH is server.root_url without the protocol.
;content_security_policy_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
# Enable adding the Content-Security-Policy-Report-Only header to your requests.
# Allows you to monitor the effects of a policy without enforcing it.
;content_security_policy_report_only = false
# Set Content Security Policy Report Only template used when adding the Content-Security-Policy-Report-Only header to your requests.
# $NONCE in the template includes a random nonce.
# $ROOT_PATH is server.root_url without the protocol.
;content_security_policy_report_only_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
# Controls if old angular plugins are supported or not. This will be disabled by default in future release
;angular_support_enabled = true
@@ -375,9 +331,6 @@
#################################### Snapshots ###########################
[snapshots]
# set to false to remove snapshot functionality
;enabled = true
# snapshot sharing options
;external_enabled = true
;external_snapshot_url = https://snapshots.raintank.io
@@ -416,7 +369,7 @@
# Set this value to automatically add new users to the provided organization (if auto_assign_org above is set to true)
;auto_assign_org_id = 1
# Default role new users will be automatically assigned (if auto_assign_org above is set to true)
# Default role new users will be automatically assigned (if disabled above is set to true)
;auto_assign_org_role = Viewer
# Require email validation before sign up completes
@@ -429,8 +382,8 @@
# Default UI theme ("dark" or "light")
;default_theme = dark
# Default UI language (supported IETF language tag, such as en-US)
;default_language = en-US
# Default locale (supported IETF language tag, such as en-US)
;default_locale = en-US
# Path to a custom home page. Users are only redirected to this if the default home dashboard is used. It should match a frontend route and contain a leading slash.
;home_page =
@@ -452,18 +405,10 @@
# Enter a comma-separated list of users login to hide them in the Grafana UI. These users are shown to Grafana admins and themselves.
; hidden_users =
[service_accounts]
# Service account maximum expiration date in days.
# When set, Grafana will not allow the creation of tokens with expiry greater than this setting.
; token_expiration_day_limit =
[auth]
# Login cookie name
;login_cookie_name = grafana_session
# Disable usage of Grafana build-in login solution.
;disable_login = false
# The maximum lifetime (duration) an authenticated user can be inactive before being required to login at next visit. Default is 7 days (7d). This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month). The lifetime resets at each successful token rotation.
;login_maximum_inactive_lifetime_duration =
@@ -484,7 +429,6 @@
# Set to true to attempt login with OAuth automatically, skipping the login screen.
# This setting is ignored if multiple OAuth providers are configured.
# Deprecated, use auto_login option for specific provider instead.
;oauth_auto_login = false
# OAuth state max age cookie duration in seconds. Defaults to 600 seconds.
@@ -505,12 +449,6 @@
# Set to true to enable Azure authentication option for HTTP-based datasources.
;azure_auth_enabled = false
# Set to skip the organization role from JWT login and use system's role assignment instead.
; skip_org_role_sync = false
# Use email lookup in addition to the unique ID provided by the IdP
;oauth_allow_insecure_email_lookup = false
#################################### Anonymous Auth ######################
[auth.anonymous]
# enable anonymous access
@@ -529,7 +467,6 @@
[auth.github]
;enabled = false
;allow_sign_up = true
;auto_login = false
;client_id = some_id
;client_secret = some_secret
;scopes = user:email,read:org
@@ -542,13 +479,11 @@
;role_attribute_path =
;role_attribute_strict = false
;allow_assign_grafana_admin = false
;skip_org_role_sync = false
#################################### GitLab Auth #########################
[auth.gitlab]
;enabled = false
;allow_sign_up = true
;auto_login = false
;client_id = some_id
;client_secret = some_secret
;scopes = api
@@ -560,13 +495,11 @@
;role_attribute_path =
;role_attribute_strict = false
;allow_assign_grafana_admin = false
;skip_org_role_sync = false
#################################### Google Auth ##########################
[auth.google]
;enabled = false
;allow_sign_up = true
;auto_login = false
;client_id = some_client_id
;client_secret = some_client_secret
;scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
@@ -575,25 +508,21 @@
;api_url = https://www.googleapis.com/oauth2/v1/userinfo
;allowed_domains =
;hosted_domain =
;skip_org_role_sync = false
#################################### Grafana.com Auth ####################
[auth.grafana_com]
;enabled = false
;allow_sign_up = true
;auto_login = false
;client_id = some_id
;client_secret = some_secret
;scopes = user:email
;allowed_organizations =
;skip_org_role_sync = false
#################################### Azure AD OAuth #######################
[auth.azuread]
;name = Azure AD
;enabled = false
;allow_sign_up = true
;auto_login = false
;client_id = some_client_id
;client_secret = some_client_secret
;scopes = openid email profile
@@ -603,15 +532,12 @@
;allowed_groups =
;role_attribute_strict = false
;allow_assign_grafana_admin = false
# prevent synchronizing users organization roles
;skip_org_role_sync = false
#################################### Okta OAuth #######################
[auth.okta]
;name = Okta
;enabled = false
;allow_sign_up = true
;auto_login = false
;client_id = some_id
;client_secret = some_secret
;scopes = openid profile email groups
@@ -623,14 +549,12 @@
;role_attribute_path =
;role_attribute_strict = false
;allow_assign_grafana_admin = false
;skip_org_role_sync = false
#################################### Generic OAuth ##########################
[auth.generic_oauth]
;enabled = false
;name = OAuth
;allow_sign_up = true
;auto_login = false
;client_id = some_id
;client_secret = some_secret
;scopes = user:email,read:org
@@ -686,7 +610,7 @@
;jwk_set_url = https://foo.bar/.well-known/jwks.json
;jwk_set_file = /path/to/jwks.json
;cache_ttl = 60m
;expect_claims = {"aud": ["foo", "bar"]}
;expected_claims = {"aud": ["foo", "bar"]}
;key_file = /path/to/key/file
;role_attribute_path =
;role_attribute_strict = false
@@ -736,11 +660,6 @@
#################################### Role-based Access Control ###########
[rbac]
;permission_cache = true
# Reset basic roles permissions on boot
# Warning left to true, basic roles permissions will be reset on every boot
#reset_basic_roles = false
#################################### SMTP / Emailing ##########################
[smtp]
;enabled = false
@@ -1072,7 +991,6 @@
# Url used to import dashboards directly from Grafana.com
[grafana_com]
;url = https://grafana.com
;api_url = https://grafana.com/api
#################################### Distributed tracing ############
# Opentracing is deprecated use opentelemetry instead
@@ -1146,7 +1064,6 @@
;account_name =
;account_key =
;container_name =
;sas_token_expiration_days =
[external_image_storage.local]
# does not require any configuration
@@ -1162,11 +1079,6 @@
# Concurrent render request limit affects when the /render HTTP endpoint is used. Rendering many images at the same time can overload the server,
# which this setting can help protect against by only allowing a certain amount of concurrent requests.
;concurrent_render_request_limit = 30
# Determines the lifetime of the render key used by the image renderer to access and render Grafana.
# This setting should be expressed as a duration. Examples: 10s (seconds), 5m (minutes), 2h (hours).
# Default is 5m. This should be more than enough for most deployments.
# Change the value only if image rendering is failing and you see `Failed to get the render key from cache` in Grafana logs.
;render_key_lifetime = 5m
[panels]
# If set to true Grafana will allow script tags in text panels. Not recommended as it enable XSS vulnerabilities.
@@ -1318,24 +1230,3 @@
# Enable or disable loading other base map layers
;enable_custom_baselayers = true
# Move an app plugin referenced by its id (including all its pages) to a specific navigation section
# Dependencies: needs the `topnav` feature to be enabled
[navigation.app_sections]
# The following will move an app plugin with the id of `my-app-id` under the `starred` section
# my-app-id = admin
# Move a specific app plugin page (referenced by its `path` field) to a specific navigation section
[navigation.app_standalone_pages]
# The following will move the page with the path "/a/my-app-id/starred-content" from `my-app-id` to the `starred` section
# /a/my-app-id/starred-content = starred
#################################### Secure Socks5 Datasource Proxy #####################################
[secure_socks_datasource_proxy]
; enabled = false
; root_ca_cert =
; client_key =
; client_cert =
; server_name =
# The address of the socks5 proxy datasources should connect to
; proxy_address =

View File

@@ -10,7 +10,8 @@ This directory contains guides for contributors to the Grafana project.
The `style-guides` directory contains style guides for the Grafana software project and documentation.
- [Backend style guide](backend/style-guide.md) for how to style and format backend functionality and code.
- [Backend style guide](style-guides/backend.md) for how to style and format backend functionality and code.
- [Documentation style guide](style-guides/documentation-style-guide.md) for how to style and format documentation.
- [Frontend style guide](style-guides/frontend.md) for how to style and format the user-facing functionality and code.
- [Redux framework](style-guides/redux.md) for designing the Grafana redux framework.
- [Themes style guide](style-guides/themes.md) for designing and updating Grafana themes.

View File

@@ -4,9 +4,9 @@ Are you looking to take on contributions with bigger impact? These guides help y
Learn more about the backend architecture:
- Part 1: [Services](../backend/services.md)
- Part 2: [Communication](../backend/communication.md)
- Part 3: [Database](../backend/database.md)
- Part 1: [Services](backend/services.md)
- Part 2: [Communication](backend/communication.md)
- Part 3: [Database](backend/database.md)
Learn more about the frontend architecture:

View File

@@ -62,7 +62,7 @@ You can now make SQL queries in any of your [command handlers](communication.md#
```go
func (s *MyService) DeleteDashboard(ctx context.Context, cmd *models.DeleteDashboardCommand) error {
if err := s.SQLStore.WithDbSession(ctx, func(sess *db.Session) error {
if err := s.SQLStore.WithDbSession(ctx, func(sess *sqlstore.DBSession) error {
_, err := sess.Exec("DELETE FROM dashboards WHERE dashboard_id=?", cmd.DashboardID)
return err
})

View File

@@ -0,0 +1,81 @@
# Errors
Grafana introduced its own error type `github.com/grafana/grafana/pkg/util/errutil.Error`
in June 2022. It's built on top of the Go `error` interface extended to
contain all the information necessary by Grafana to handle errors in an
informative and safe way.
Previously, Grafana has passed around regular Go errors and have had to
rely on bespoke solutions in API handlers to communicate informative
messages to the end-user. With the new `errutil.Error`, the API handlers
can be slimmed as information about public messaging, structured data
related to the error, localization metadata, log level, HTTP status
code, and so forth are carried by the error.
## Basic use
### Declaring errors
For a service, declare the different categories of errors that may occur
from your service (this corresponds to what you might want to have
specific public error messages or their templates for) by globally
constructing variables using the `errutil.NewBase(status, messageID, opts...)`
function.
The status code loosely corresponds to HTTP status codes and provides a
default log level for errors to ensure that the request logging is
properly informing administrators about various errors occurring in
Grafana (e.g. `StatusBadRequest` is generally speaking not as relevant
as `StatusInternal`). All available status codes live in the `errutil`
package and have names starting with `Status`.
The messageID is constructed as `<servicename>.<error-identifier>` where
the `<servicename>` corresponds to the root service directory per
[the package hierarchy](package-hierarchy.md) and `<error-identifier>`
is a short identifier using dashes for word separation that identifies
the specific category of errors within the service.
To set a static message sent to the client when the error occurs, the
`errutil.WithPublicMessage(message string)` option may be appended to
the NewBase function call. For dynamic messages or more options, refer
to the `errutil` package's GoDocs.
Errors are then constructed using the `Base.Errorf` method, which
functions like the [fmt.Errorf](https://pkg.go.dev/fmt#Errorf) method
except that it creates an `errutil.Error`.
```go
package main
import (
"errors"
"github.com/grafana/grafana/pkg/util/errutil"
"example.org/thing"
)
var ErrBaseNotFound = errutil.NewBase(errutil.StatusNotFound, "main.not-found", errutil.WithPublicMessage("Thing not found"))
func Look(id int) (*Thing, error) {
t, err := thing.GetByID(id)
if errors.Is(err, thing.ErrNotFound) {
return nil, ErrBaseNotFound.Errorf("did not find thing with ID %d: %w", id, err)
}
return t, nil
}
```
Check out [errutil's GoDocs](https://pkg.go.dev/github.com/grafana/grafana@v0.0.0-20220621133844-0f4fc1290421/pkg/util/errutil)
for details on how to construct and use Grafana style errors.
### Handling errors in the API
API handlers use the `github.com/grafana/grafana/pkg/api/response.Err`
function to create responses based on `errutil.Error`s.
> **Note:** (@sakjur 2022-06) `response.Err` requires all errors to be
> `errutil.Error` or it'll be considered an internal server error.
> This is something that should be fixed in the near future to allow
> fallback behavior to make it possible to correctly handle Grafana
> style errors if they're present but allow fallback to a reasonable
> default otherwise.

View File

@@ -19,11 +19,11 @@ package example
type Service struct {
logger log.Logger
cfg *setting.Cfg
sqlStore db.DB
sqlStore *sqlstore.SQLStore
}
// ProvideService provides Service as dependency for other services.
func ProvideService(cfg *setting.Cfg, sqlStore db.DB) (*Service, error) {
func ProvideService(cfg *setting.Cfg, sqlStore *sqlstore.SQLStore) (*Service, error) {
s := &Service{
logger: log.New("service"),
cfg: cfg,
@@ -76,7 +76,7 @@ package server
import (
"github.com/google/wire"
"github.com/grafana/grafana/pkg/example"
"github.com/grafana/grafana/pkg/infra/db"
"github.com/grafana/grafana/pkg/services/sqlstore"
)
var wireBasicSet = wire.NewSet(
@@ -98,7 +98,7 @@ func Initialize(cla setting.CommandLineArgs, opts Options, apiOpts api.ServerOpt
return &Server{}, nil
}
func InitializeForTest(cla setting.CommandLineArgs, opts Options, apiOpts api.ServerOptions, sqlStore db.DB) (*Server, error) {
func InitializeForTest(cla setting.CommandLineArgs, opts Options, apiOpts api.ServerOptions, sqlStore *sqlstore.SQLStore) (*Server, error) {
wire.Build(wireExtsTestSet)
return &Server{}, nil
}

View File

@@ -1,98 +0,0 @@
# Backend
This document gives an overview of the directory structure, and ongoing refactorings.
For more information on developing for the backend:
- [Backend style guide](/contribute/backend/style-guide.md)
- [Architecture](/contribute/architecture)
## Central folders of Grafana's backend
| folder | description |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| /pkg/api | HTTP handlers and routing. Almost all handler funcs are global which is something we would like to improve in the future. Handlers should be associated with a struct that refers to all dependencies. |
| /pkg/cmd | The binaries that we build: grafana-server and grafana-cli. |
| /pkg/components | A mix of third-party packages and packages we have implemented ourselves. Includes our packages that have out-grown the util package and don't naturally belong somewhere else. |
| /pkg/infra | Packages in infra should be packages that are used in multiple places in Grafana without knowing anything about the Grafana domain. |
| /pkg/services | Packages in services are responsible for persisting domain objects and manage the relationship between domain objects. Services should communicate with each other using DI when possible. Most of Grafana's codebase still relies on global state for this. Any new features going forward should use DI. |
| /pkg/tsdb | All backend implementations of the data sources in Grafana. Used by both Grafana's frontend and alerting. |
| /pkg/util | Small helper functions that are used in multiple parts of the codebase. Many functions are placed directly in the util folders which is something we want to avoid. Its better to give the util function a more descriptive package name. Ex `errutil`. |
## Central components of Grafana's backend
| package | description |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| /pkg/bus | The bus is described in more details under [Communication](/contribute/backend/communication.md) |
| /pkg/models | This is where we keep our domain model. This package should not depend on any package outside standard library. It does contain some references within Grafana but that is something we should avoid going forward. |
| /pkg/registry | Package for managing services. |
| /pkg/services/alerting | Grafana's alerting services. The alerting engine runs in a separate goroutine and shouldn't depend on anything else within Grafana. |
| /pkg/services/sqlstore | Currently where the database logic resides. |
| /pkg/setting | Anything related to Grafana global configuration should be dealt with in this package. |
## Dependency management
Refer to [UPGRADING_DEPENDENCIES.md](https://github.com/grafana/grafana/blob/main/UPGRADING_DEPENDENCIES.md).
## Ongoing refactoring
These issues are not something we want to address all at once but something we will improve incrementally. Since Grafana is released at a regular schedule the preferred approach is to do this in batches. Not only is it easier to review, but it also reduces the risk of conflicts when cherry-picking fixes from main to release branches. Please try to submit changes that span multiple locations at the end of the release cycle. We prefer to wait until the end because we make fewer patch releases at the end of the release cycle, so there are fewer opportunities for complications.
### Global state
Global state makes testing and debugging software harder and it's something we want to avoid when possible. Unfortunately, there is quite a lot of global state in Grafana.
We want to migrate away from this by using the `inject` package to wire up all dependencies either in `pkg/cmd/grafana-server/main.go` or self-registering using `registry.RegisterService` ex https://github.com/grafana/grafana/blob/main/pkg/services/cleanup/cleanup.go#L25.
### Limit the use of the init() function
Only use the init() function to register services/implementations.
### Settings refactoring
The plan is to move all settings to from package level vars in settings package to the [setting.Cfg](https://github.com/grafana/grafana/blob/df917663e6f358a076ed3daa9b199412e95c11f4/pkg/setting/setting.go#L210) struct. To access the settings, services and components can inject this setting.Cfg struct:
[Cfg struct](https://github.com/grafana/grafana/blob/df917663e6f358a076ed3daa9b199412e95c11f4/pkg/setting/setting.go#L210)
[Injection example](https://github.com/grafana/grafana/blob/df917663e6f358a076ed3daa9b199412e95c11f4/pkg/services/cleanup/cleanup.go#L20)
### Reduce the use of GoConvey
We want to migrate away from using GoConvey. Instead, we want to use stdlib testing, because it's the most common approach in the Go community and we think it will be easier for new contributors. Read more about how we want to write tests in the [style guide](/contribute/backend/style-guide.md).
### Refactor SqlStore
The `sqlstore` handlers all use a global xorm engine variable. Refactor them to use the `SqlStore` instance.
### Avoid global HTTP handler functions
Refactor HTTP handlers so that the handler methods are on the HttpServer instance or a more detailed handler struct. E.g (AuthHandler). This ensures they get access to HttpServer service dependencies (and Cfg object) and can avoid global state.
### Date comparison
Store newly introduced date columns in the database as epochs if they require date comparison. This permits a unified approach for comparing dates against all the supported databases instead of handling dates differently for each database. Also, by comparing epochs, we no longer need error pruning transformations to and from other time zones.
### Avoid use of the simplejson package
Use of the `simplejson` package (`pkg/components/simplejson`) in place of types (Go structs) results in code that is difficult to maintain. Instead, create types for objects and use the Go standard library's [`encoding/json`](https://golang.org/pkg/encoding/json/) package.
### Provisionable\*
All new features that require state should be possible to configure using config files. For example:
- [Data sources](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/datasources)
- [Alert notifiers](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/notifiers)
- [Dashboards](https://github.com/grafana/grafana/tree/main/pkg/services/provisioning/dashboards)
Today its only possible to provision data sources and dashboards but this is something we want to support all over Grafana.
### Use context.Context "everywhere"
The package [context](https://golang.org/pkg/context/) should be used and propagated through all the layers of the code. For example the `context.Context` of an incoming API request should be propagated to any other layers being used such as the bus, service and database layers. Utility functions/methods normally doesn't need `context.Context` To follow best practices, any function/method that receives a context.Context argument should receive it as its first argument.
To be able to solve certain problems and/or implement and support certain features making sure that `context.Context` is passed down through all layers of the code is vital. Being able to provide contextual information for the full life-cycle of an API request allows us to use contextual logging, provide contextual information about the authenticated user, create multiple spans for a distributed trace of service calls and database queries etc.
Code should use `context.TODO` when it's unclear which Context to use or it is not yet available (because the surrounding function has not yet been extended to accept a `context.Context` argument).
More details in [Services](/contribute/backend/services.md), [Communication](/contribute/backend/communication.md) and [Database](/contribute/backend/database.md).
[Original design doc](https://docs.google.com/document/d/1ebUhUVXU8FlShezsN-C64T0dOoo-DaC9_r-c8gB2XEU/edit#).

View File

@@ -1,103 +0,0 @@
# Errors
Grafana introduced its own error type `github.com/grafana/grafana/pkg/util/errutil.Error`
in June 2022. It's built on top of the Go `error` interface extended to
contain all the information necessary by Grafana to handle errors in an
informative and safe way.
Previously, Grafana has passed around regular Go errors and have had to
rely on bespoke solutions in API handlers to communicate informative
messages to the end-user. With the new `errutil.Error`, the API handlers
can be slimmed as information about public messaging, structured data
related to the error, localization metadata, log level, HTTP status
code, and so forth are carried by the error.
## Basic use
### Declaring errors
For a service, declare the different categories of errors that may occur
from your service (this corresponds to what you might want to have
specific public error messages or their templates for) by globally
constructing variables using the `errutil.NewBase(status, messageID, opts...)`
function.
The status code loosely corresponds to HTTP status codes and provides a
default log level for errors to ensure that the request logging is
properly informing administrators about various errors occurring in
Grafana (e.g. `StatusBadRequest` is generally speaking not as relevant
as `StatusInternal`). All available status codes live in the `errutil`
package and have names starting with `Status`.
The messageID is constructed as `<servicename>.<errorIdentifier>` where
the `<servicename>` corresponds to the root service directory per
[the package hierarchy](package-hierarchy.md) and `<errorIdentifier>`
is a camelCased short identifier that identifies the specific category
of errors within the service.
Errors should be grouped together (i.e. share `errutil.Base`) based on
their public facing properties, a single messageID should represent a
translatable string and what metadata is carried with it.
_service.MissingRequiredFields_ and _service.MessageTooLong_ are likely
to be two different errors that are both validation failures, as their
user-friendly expansions are likely different. This is the maximization
rule of declaring as many `errutil.Error`s as you need public message
structures.
The other side of this is that even though a login service's
"user is ratelimited", "user does not exist", "wrong username", and
"wrong password" are reasonable errors to separate between internally,
for security reasons the end-user should not be told which particular
error they struck. This means that they should share the same base (such
as _login.Failed_). This is the minimization rule of grouping together
distinct logged errors that provide the same information via the API.
To set a static message sent to the client when the error occurs, the
`errutil.WithPublicMessage(message string)` option may be appended to
the NewBase function call. For dynamic messages or more options, refer
to the `errutil` package's GoDocs.
Errors are then constructed using the `Base.Errorf` method, which
functions like the [fmt.Errorf](https://pkg.go.dev/fmt#Errorf) method
except that it creates an `errutil.Error`.
```go
package main
import (
"errors"
"github.com/grafana/grafana/pkg/util/errutil"
"example.org/thing"
)
var ErrBaseNotFound = errutil.NewBase(errutil.StatusNotFound, "main.notFound", errutil.WithPublicMessage("Thing not found"))
func Look(id int) (*Thing, error) {
t, err := thing.GetByID(id)
if errors.Is(err, thing.ErrNotFound) {
return nil, ErrBaseNotFound.Errorf("did not find thing with ID %d: %w", id, err)
}
return t, nil
}
```
Errors consider themselves to be both its `errutil.Base` or
`errutil.Template` and whatever errors it wraps for the purposes of the
`errors.Is` function.
Check out the package and method documentation for
github.com/grafana/grafana/pkg/util/errutil for details on how to
construct and use Grafana style errors. This documentation is
unfortunately not readily available on pkg.go.dev because Grafana is not
fully Go modules compatible, but can be viewed using
[godoc](https://go.dev/cmd/godoc/) from the Grafana directory.
### Handling errors in the API
API handlers use the `github.com/grafana/grafana/pkg/api/response.Err`
or `github.com/grafana/grafana/pkg/api/response.ErrWithFallback`
(same signature as `response.Error`) function to create responses based
on `errutil.Error`.
Using `response.Err` requires all errors to be Grafana style errors.

View File

@@ -1,211 +0,0 @@
# Backend style guide
Grafana's backend has been developed for a long time with a mix of code styles. This guide explains how we want to write Go code in the future.
Unless stated otherwise, use the guidelines listed in the following articles:
- [Effective Go](https://golang.org/doc/effective_go.html)
- [Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
- [Go: Best Practices for Production Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style)
## Linting and formatting
To ensure consistency across the Go codebase, we require all code to pass a number of linter checks.
We use the standard following linters:
- [gofmt](https://golang.org/cmd/gofmt/)
- [golint](https://github.com/golang/lint)
- [go vet](https://golang.org/cmd/vet/)
In addition to the standard linters, we also use:
- [revive](https://revive.run/) with a [custom config](https://github.com/grafana/grafana/blob/main/conf/revive.toml)
- [GolangCI-Lint](https://github.com/golangci/golangci-lint)
- [gosec](https://github.com/securego/gosec)
To run all linters, use the `lint-go` Makefile target:
```bash
make lint-go
```
## Testing
We value clean and readable code, that is loosely coupled and covered by unit tests. This makes it easier to collaborate and maintain the code.
Tests must use the standard library, `testing`. For assertions, prefer using [testify](https://github.com/stretchr/testify).
The majority of our tests uses [GoConvey](http://goconvey.co/) but that's something we want to avoid going forward.
In the `sqlstore` package we do database operations in tests and while some might say that's not suited for unit tests. We think they are fast enough and provide a lot of value.
### Integration Tests
We run unit and integration tests separately, to help keep our CI pipeline running smoothly and provide a better developer experience.
To properly mark a test as being an integration test, you must format your test function definition as follows, with the function name starting with `TestIntegration` and the check for `testing.Short()`:
```
func TestIntegrationFoo(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
// function body
}
```
If you do not follow this convention, your integration test may be run twice or not run at all.
### Assertions
Use respectively [`assert.*`](https://github.com/stretchr/testify#assert-package) functions to make assertions that
should _not_ halt the test ("soft checks") and [`require.*`](https://github.com/stretchr/testify#require-package)
functions to make assertions that _should_ halt the test ("hard checks"). Typically you want to use the latter type of
check to assert that errors have or have not happened, since continuing the test after such an assertion fails is
chaotic (the system under test will be in an undefined state) and you'll often have segfaults in practice.
### Sub-tests
Use [`t.Run`](https://golang.org/pkg/testing/#T.Run) to group sub-test cases, since it allows common setup and teardown
code, plus lets you run each test case in isolation when debugging. Don't use `t.Run` to e.g. group assertions.
### Cleanup
Use [`t.Cleanup`](https://golang.org/pkg/testing/#T.Cleanup) to clean up resources in tests. It's a less fragile choice than `defer`, since it's independent of which
function you call it in. It will always execute after the test is over in reverse call order (last `t.Cleanup` first, same as `defer`).
### Mock
Optionally, we use [`mock.Mock`](https://github.com/stretchr/testify#mock-package) package to generate mocks. This is
useful when you expect different behaviours of the same function.
#### Tips
- Use `Once()` or `Times(n)` to make this mock only works `n` times.
- Use `mockedClass.AssertExpectations(t)` to guarantee that the mock is called the times asked.
- If any mock set is not called or its expects more calls, the test fails.
- You can pass `mock.Anything` as argument if you don't care about the argument passed.
- Use `mockedClass.AssertNotCalled(t, "FunctionName")` to assert that this test is not called.
#### Example
This is an example to easily create a mock of an interface.
Given this interface:
```go
func MyInterface interface {
Get(ctx context.Context, id string) (Object, error)
}
```
Mock implementation should be like this:
```go
import
func MockImplementation struct {
mock.Mock
}
func (m *MockImplementation) Get(ctx context.Context, id string) error {
args := m.Called(ctx, id) // Pass all arguments in order here
return args.Get(0).(Object), args.Error(1)
}
```
And use it as the following way:
```go
objectToReturn := Object{Message: "abc"}
errToReturn := errors.New("my error")
myMock := &MockImplementation{}
defer myMock.AssertExpectations(t)
myMock.On("Get", mock.Anything, "id1").Return(objectToReturn, errToReturn).Once()
myMock.On("Get", mock.Anything, "id2").Return(Object{}, nil).Once()
anyService := NewService(myMock)
resp, err := anyService.Call("id1")
assert.Equal(t, resp.Message, objectToReturn.Message)
assert.Error(t, err, errToReturn)
resp, err = anyService.Call("id2")
assert.Nil(t, err)
```
#### Mockery
When an interface to test is too big, it's annoying to mock each function manually. To avoid this, you can
use [`mockery`](https://github.com/vektra/mockery) library to generate the mocks.
The command is like the following (there are more options documented if you need to use another one):
```
mockery --name InterfaceName --structname MockImplementationName --inpackage --filename my_implementation_mock.go
```
- `--name`: Interface to mock
- `--structname`: Mock implementation name
- `--inpackage`: To use the same package name as the interface
- `--filename`: Your mock generated file name
If any interface signature changes, executing the command again updates the mock.
Additionally, you can put `go:generate` command on the top of the file as a comment. It's useful because some IDEs
like Goland and Visual Studio Code allows executing scripts from the IDE.
```
package <package>
import (
...
)
//go:generate mockery --name InterfaceName --structname MockImplementationName --inpackage --filename my_implementation_mock.go
```
## Globals
As a general rule of thumb, avoid using global variables, since they make the code difficult to maintain and reason
about, and to write tests for. The Grafana codebase currently does use a lot of global variables, especially when
it comes to configuration, but that is a problem we're trying to solve.
## Pointers
In general, use value types and only reach for pointers when there's a real need. The reason being that pointers
increase the risk of bugs, since a pointer can be nil and dereferencing a nil pointer leads to a panic (AKA segfault).
Valid reasons to use a pointer include (but not necessarily limited to):
- You might need to pass a modifiable argument to a function
- Copying an object might incur a performance hit (benchmark to check your assumptions, copying is often faster than
allocating heap memory)
- You might _need_ `nil` to tell if a variable isn't set, although usually it's better to use the type's zero
value to tell instead
## Database
In database related code, we follow certain patterns.
### Foreign keys
While they can be useful, we don't generally use foreign key constraints in Grafana, for historical and
technical reasons. See this [comment](https://github.com/grafana/grafana/issues/3269#issuecomment-383328548) by Torkel
for context.
### Unique columns
If a column, or column combination, should be unique, add a corresponding uniqueness constraint through a migration.
## JSON
The simplejson package is used a lot throughout the backend codebase, but it's legacy, so if at all possible
avoid using it in new code. Use [json-iterator](https://github.com/json-iterator/go) instead, which is a more performant
drop-in alternative to the standard [encoding/json](https://golang.org/pkg/encoding/json/) package. While encoding/json
is a fine choice, profiling shows that json-iterator may be 3-4 times more efficient for encoding. We haven't profiled
its parsing performance yet, but according to json-iterator's own benchmarks, it appears even more superior in this
department.

View File

@@ -72,7 +72,7 @@ We make use of a tool called [**Betterer**](https://phenomnomnominal.github.io/b
## Backend-specific guidelines
Please refer to the [backend style guidelines](/contribute/backend/style-guide.md).
Please refer to the [backend style guidelines](/contribute/style-guides/backend.md).
## Code review

View File

@@ -18,7 +18,7 @@ We recommend using [Homebrew](https://brew.sh/) for installing any missing depen
```
brew install git
brew install go
brew install node@18
brew install node@16
npm install -g yarn
```
@@ -149,13 +149,13 @@ go test -covermode=atomic -tags=integration ./pkg/...
To run PostgreSQL and MySQL integration tests locally, you need to start the docker blocks for MySQL and/or PostgreSQL test data sources by running `make devenv sources=mysql_tests,postgres_tests`. When your test data sources are running, you can execute integration tests by running:
```bash
make test-go-integration-mysql
GRAFANA_TEST_DB=mysql go test -covermode=atomic -tags=integration ./pkg/...
```
and/or
```bash
make test-go-integration-postgres
GRAFANA_TEST_DB=postgres go test -covermode=atomic -tags=integration ./pkg/...
```
### Run end-to-end tests

View File

@@ -1,7 +1,235 @@
# Contribute to our documentation
Welcome. We're glad you're here to help make our technical documentation even better.
We provide these guidelines to help our contributors make additions or corrections to our documentation.
For our style guide and writing guidelines, see [Writers' Toolkit](https://grafana.com/docs/writers-toolkit/).
## Welcome
If you're interested in contributing to the Writers' Toolkit, refer to the [Writers' Toolkit](https://github.com/grafana/writers-toolkit) repository.
Welcome. We're glad you're here to help make our technical documentation even better. We develop content that leads our users to success using Grafana products. Technical accuracy is our primary consideration, and we value the use of inclusive language. We regard your feedback as a gift - thanks for reading through these guidelines.
### Intended audience
We write these guidelines for contributors who are interested in improving our technical content.
## Understanding the structure of Grafana documentation
All Grafana Enterprise and OSS documentation is located in the [Grafana open source project](https://github.com/grafana/grafana) GitHub repository: https://github.com/grafana/grafana/tree/main/docs/sources.
- The **sources** directory organizes content by topic areas, for example **administration** and **alerting**.
- Topic directories include an `_index.md` file, which provides an overview of the topic, and optionally includes subtopics that provide more detail.
> The `_index.md` file is required.
### Writing in markdown
We write technical documentation using [Markdown](https://en.wikipedia.org/wiki/Markdown). We've put together a short guide to help you how to structure and format your content.
To access the markdown guide, refer to [Markdown style guide](documentation-markdown-guide.md).
## Ways to contribute
We're thrilled that you are considering contributing to the documentation. You can contribute content in the following ways:
- [Request a change](#request-a-change)
- [Edit a topic](#edit-a-topic)
- [Write a topic](#write-a-topic)
### Request a change
Request a change when you want to make a suggestion about a topic, but don't want to provide an edit that generates a pull request. Requesting a change gives you the freedom to express your ideas without committing language. Your suggestion can reflect a small change to wording or can reflect larger, more substantive changes.
GitHub captures your request as an **Issue** logged against the repository.
Before you begin:
- Create a GitHub account.
To request a change, complete the following steps:
1. While viewing the topic, click **Request a change**.
The Issue title auto-populates with the location of the file about which you are requesting a change.
![Request a change](request-change.png)
2. Enter a change request description.
3. Add the **type/docs** label.
4. Click **Submit new issue**.
### Edit a topic
If you want to recommend a small change, such as suggesting a correction to a topic, you can edit the topic directly in GitHub. You are not required to fork and clone the repo to use this approach.
Other small changes might include:
- Adding steps to a task
- Adding clarifying language to a concept
- Providing an example
Before you begin:
- Create a GitHub account.
To edit a topic, complete the following steps:
1. While viewing the topic you want to edit, click **Edit this page**.
![Edit a topic](edit-file.png)
2. Add your changes to the topic.
3. Scroll to the bottom of the page and enter a branch name.
For example, enter `clarified dashboard panel definition`.
4. Click **Commit**.
GitHub prompts you to create a PR.
5. Complete the prompts provided in the body of the PR.
6. Click **Create pull request**.
### Write a topic
At Grafana Labs, we use the principles of topic-based authoring when we write technical documentation. Topic-based authoring provides guidelines for writing three _types_ of technical documentation: concept, task, and reference. Before you begin writing, establish the topic type you want to write.
#### Understanding topic types
Technical content is divided into three topic types: concept, task, and reference.
- **Concept**: A concept topic explains _what_ a feature (or idea) is, and why it is important.
- **Task**: A task topic explains _how_ to complete an end user procedure in the system. Task topics contain steps.
- **Reference** A reference topic contains lookup information that a user might consult when they complete a task. Documenting a list of values with descriptions is a common form of reference topic.
**Example**
Suppose you are writing content for a site called _Doggie handbook_. You might organize your topics like this:
**Concepts**
- What a dog is
- Brief history of dogs
- Why you might want a dog
- Tasks dogs can be trained to do
**Tasks**
- Feed the dog
- Groom the dog
- Train the dog
**References**
- List of dog equipment you will need
- Table of breeds that includes breed name, size range, short or long hair, and type of dog
#### Prepare your environment
Before you begin writing, we recommend that you fork and clone the Grafana repository so that you can use a text editor locally to create branches, commit your changes, and create a PR.
While this document doesn't include git commands or descriptions of Github operations, you might find these links useful.
- [Install git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git): We store all source code, including documentation, in Git repositories.
- [Fork a repo](https://docs.github.com/en/get-started/quickstart/fork-a-repo): Locate the repo you want to clone, and fork it.
- [Clone a repo](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository): Clone the repository to your local machine.
- [Create a branch](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging): Before you make change, create a branch. Do not push changes against the `main` branch.
- [Create a PR](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request): After you add, commit, and push your changes, create a PR in Github.
#### Use a documentation template to contribute a topic
We have provided documentation templates that align with each topic type:
- [Concept](templates/doc-concept-template.md)
- [Task](templates/doc-task-template.md)
- [Reference](templates/doc-reference-template.md)
Each template provides additional usage and formatting guidelines. We recommend that you make a copy of whichever template you are using, then add content.
> Remove any unused content before you commit your changes.
#### View a local build
Prior to pushing your changes, you can view a local build of the documentation so that you can review your work.
To view a local build:
1. Install [Docker](https://www.docker.com/products/docker-desktop).
1. Run Docker.
1. Navigate to the **docs** root directory.
1. Run `make build`.
1. Open `localhost:3002` to review your changes.
## Push changes and create a PR
When you are ready for other people to review your work, perform the following tasks.
1. [Add](https://git-scm.com/docs/git-add) your changes, which prepares your content for the next commit.
1. [Commit](https://git-scm.com/docs/git-commit) your changes.
1. [Push](https://git-scm.com/docs/git-push) your changes to Github.
1. [Create a PR](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) in Github.
The docs build system automatically conducts a series of tests to ensure that the content doesn't conflict with other content in the docs repository.
### Understanding the PR review and approval workflow
When a PR is added to the repo with a label associated with `docs`, it will be reviewed by a member of the technical writing team. Depending on the size of the PR and the priority of other work, the PR will either be immediately reviewed and merged (minor fixes typically follow this pattern) or the PR will be triaged and placed in the backlog of work or moved into further development.
## Join our community
For general discussions on documentation, youre welcome to join the `#docs` channel on our [public Grafana Slack](http://slack.raintank.io) team.
## Reference: Top five writing tips
While we don't provide a comprehensive style guide in this document, here's a few writing tips to help the writing process.
### Consider the audience
Write for an audience that is computer literate and has general technical knowledge, but is not necessarily familiar with Grafana or the finer points of observability.
Pretend you are explaining your topic to a brand new Grafana user or developer.
### Write clear and concise sentences and paragraphs
Use the following sentence structure when you write: _subject_—_verb_—_object_. If you are telling a user to do something, write an imperative sentence. For example “Enter the refresh rate time interval and click Save.”
- You can also start a sentence with an _if_ clause, which positions the condition before the action.
- Limit the number of words in a sentence to 20..
### Use active voice
Active voice makes the performer of the action the subject
of the sentence. When you write in passive voice, the recipient of the action (and not the performer) becomes the subject of the sentence.
Active-voice sentences are more direct and clearly identify _who_ is doing _what_. Not all tasks are completed by a user; sometimes the system can also be a performer (and by extension, the subject of the sentence). When you write in active voice you clearly make that distinction, which results in more engaging and less wordy content.
| Use (active) | Avoid (passive) |
| ----------------------------------------------------- | -------------------------------------------------------------------- |
| After you upgrade the software, restart the computer. | After the software has been upgraded, the computer can be restarted. |
| Click **OK** to save the dashboard. | The dashboard is saved when the **OK** button is clicked. |
| Create a dashboard. | A dashboard is created by you. |
### Avoid obscure non-English words and abbreviations
Users might be unfamiliar with some non-English words and abbreviations such as _per_, _vs_, and _via_. Latin abbreviations in particular, like _i.e._, _e.g._, and _etc._, are vague.
| Use | Dont use |
| ------------ | ----------- |
| through | via |
| that is | i.e. |
| according to | per, as per |
| and so on | etc. |
### Write self-contained topics
Thanks to search engines, every page in the documentation might be a reader's entry point. This means that each page needs to be self-contained and make sense on its own. The reader should not need to read other topics in order to perform the task or understand the concept.
However, try to be helpful and link to related information. Using the _Doggie handbook_ example, the concept topic that explains what dogs can be trained to do might link to the Train the dog task.

View File

@@ -0,0 +1,152 @@
# Markdown style guide
This guide for Markdown style helps keep contributions consistent across all documentation created for Grafana products. Refer to the guide and update its sections as needed when a Subject Matter Expert answers a question on Markdown style, or a decision is made about how to apply Markdown.
## Headers
In Markdown, the number of "#" symbols creates different heading levels, similar to HTML heading levels:
**Example**
- \# is \<h1>.
- \#\# is \<h2>.
- \#\#\# is \<h3>.
Start your document with a single `#` for the title of the page. Add the sub-headings with two `##`.
## Bold and emphasis
- Make text **bold** using two asterisks.
**Example:** It is `**important**` to use GitHub-flavored Markdown emoji consistently.
- Make text `_emphasized_` using single ` _underscores_`. Do not use the single asterisk, it can be easily confused with bold.
**Example:** GitHub-flavored markdown emoji should _only_ appear in specific cases.
## Links and references
Create links to other website by wrapping the display text in square brackets, and the web URL in curved brackets.
\[text to display](www.website.com)
**Example:** For more information on including emoji in GitHub-flavored markdown, refer to the [webfx page on emoji](https://www.webfx.com/tools/emoji-cheat-sheet/) for a list of emoji.
## Block quotes
Include block quotes inside text using right-facing arrows:
**Example**
> Any important information
> about emoji can be separated into
> a blockquote.
## Code blocks
Code blocks written with markdown can show off syntax highlighting specific to different languages. Use three back tics to create a code block:
```
function testNum(a) {
if (a > 0) {
return "positive";
} else {
return "NOT positive";
}
}
```
Write the name of the language after the first set of back tics, no spaces, to show specific syntax highlighting. For example; "\```javascript" produces the following:
```javascript
function testNum(a) {
if (a > 0) {
return 'positive';
} else {
return 'NOT positive';
}
}
```
## Tables
Construct a table by typing the table headings, and separating them with a "|" character. Then, add a second line of dashes ("-") separated by another "|" character. When constructing the table cells, separate each cell data with another "|".
**Example**
Heading one | Heading two
\------------|------------
Cell one data| Cell two data
Will publish as:
| Heading one | Heading two |
| ------------- | ------------- |
| Cell one data | Cell two data |
## Lists
### Numbered lists
To avoid inconsistent list numbering, use repetitive list numbering:
\1. First
\1. Second
\1. Third
The list above will always display as:
1. First
2. Second
3. Third
### Unordered lists
Build a list of points - an unordered or unnumbered list - by using "\-" (hyphen) characters.
**Example**
- First
- Another item
- The last list item
## Images
_Do not_ use image shortcodes at this time.
Include images in a document using the following syntax:
```
![Alt text](link to image, starting with /static/img/docs/ if it is to an internal image "Title of image in sentence case")
```
> **Note:** Alt text does not appear when the user hovers the mouse over the image, but title text does.
**Examples:**
- \!\[Grafana logo](/link/to/grafanalogo/logo.png "Grafana logo")
- \!\[Example](/static/img/docs/folder_name/alert_test_rule.png "Example title")
This follows the format of "!", alt text wrapped in "[]" and the link URL wrapped in "()".
You can also use HTML such as the following:
```
<img src="example.png"
alt="Example image"
style="float: left; margin-right: 5px;" />
```
In most cases, use the markdown syntax rather than the HTML syntax. Only use the HTML if you need to change the image in ways unsupported by Markdown.
## Comments
You can include comments that will not appear in published markdown using the following syntax:
\[comment]: <> (Comment text to display)
The word "comment" wrapped in "[]" followed by a ":", a space, "<>", and then the comment itself wrapped in "()".

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

View File

@@ -0,0 +1,42 @@
DELETE THIS LINE: If draft = false, then the document will not be built in the doc site. If the date is earlier than the build date, than the document will not show in the build site. Use these settings to control whether future content is shown in the doc site.
+++
draft = "false"
date = "yyyy-mm-dd"
title = "Title in sentence case"
description = "Description in title case"
keywords = ["grafana", "enter", "keywords", "here"]
type = "docs"
[menu.docs]
name = "Name of topic"
identifier = "identifier"
parent = "menu parent"
weight = 100
+++
# Concept
The title of the concept topic will generally be a noun or a gerund. Examples include Templates, Templating, Dashboards, and panels.
Concepts are topic types for any information that doesn't involve task lists or reference information. Ideally you use concept elements to explain concepts, ideas, overviews, workflows, and the like. In the intro section, this first paragraph or two, you should explain to the user what to expect in this topic or section.
[Permissions overview](https://grafana.com/docs/grafana/latest/permissions/overview/) is an example of a concept topic.
## Idea
Concept topics or sections explain _what_ and _why_. They do not explain _how_. If you are a new user, you might look for concept information to learn about what Grafana is, why it might be useful to you, and what the general workflow is.
## Workflow
Continuing the example in the previous section, here is a sample Grafana workflow.
1. Install Grafana. <link to task for installing Grafana>
1. Set up data sources. <link to data sources concept topic, which links to data source task topics>
1. Create panels. <link to panel concept topic, which links to tasks>
1. Create dashboards. <link to panel concept topic, which links to tasks>
1. Enter queries. <link to query editor concept topic>
1. Add users. <link to user management concept topic, which links to tasks>
1. Create playlists. <link to Playlist topic that contains concept information and tasks>
## Next steps
Concept tasks often link to related information, including _tasks_ related to the concept and _reference_ topics related to the concept.

View File

@@ -0,0 +1,75 @@
DELETE THIS LINE: If draft = false, then the document will not be built in the doc site. If the date is earlier than the build date, than the document will not show in the build site. Use these settings to control whether future content is shown in the doc site.
+++
draft = "false"
date = "yyyy-mm-dd"
title = "Title in sentence case"
description = "Description in title case"
keywords = ["grafana", "enter", "keywords", "here"]
type = "docs"
[menu.docs]
name = "Name of topic"
identifier = "identifier"
parent = "menu parent"
weight = 100
+++
# Reference
The _reference_ topic type is for storing reference information, such as extensive tables, lists, or other information that is used as support for a task. Reference topics are also designed for API information.
Often reference topics are linked from _task_ topics, because they contain information the user needs in order to perform a task.
[Grafana CLI](https://grafana.com/docs/grafana/latest/administration/cli/) is one example of a reference topic.
## Lists
Lists of commands or parameters are often organized in reference topics. The information you need to present will dictate the format.
- They might
- be in
- unordered lists.
[Configuration](https://grafana.com/docs/grafana/latest/installation/configuration/) is an example of lists.
## Tables
If you have a large list of things to store in a table, then you are probably dealing with reference information. Hugo accepts either tables in Markdown or in HTML format, so use whichever is easier for you.
The [Glossary](https://grafana.com/docs/grafana/latest/guides/glossary/) provides an example of reference data in a table.
### Empty markdown table
While you might not need a heading for each table, headings are a good way to chunk information if you have several tables. They also make the content easy to skim. Use headings or intro paragraphs like this one to explain to the reader what the information in the table is used for.
| | | | | | |
| :-- | :-- | :-: | :-: | --: | --: |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
### Empty HTML table
And here is intro text, similar to the paragraph in the previous section. Do not add local styling to the table. The website CSS will take care of that for you.
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
## API documentation
API documentation is always a reference topic rather than a task topic, but it has its own rules.

View File

@@ -0,0 +1,57 @@
+++
draft = "false"
date = "yyyy-mm-dd"
title = "Title in sentence case"
description = "Description in title case"
keywords = ["grafana", "enter", "keywords", "here"]
type = "docs"
[menu.docs]
name = "Name of topic"
identifier = "identifier"
parent = "menu parent"
weight = 100
+++
# Task
A _task_ topic is intended for a procedure that describes how to accomplish a task. It lists a series of steps that users follow to produce an intended outcome. It tells the reader _how_ to do something. [Install Grafana plugins](https://grafana.com/docs/grafana/latest/plugins/installation/) and [Playlist](https://grafana.com/docs/grafana/latest/reference/playlist/) are examples of task topics. Playlist includes a small amount of concept information in the introduction, which is appropriate.
Always include an introduction of a short paragraph or two to explain what the task is for, perhaps give the reader an idea of what the outcome will be.
In most cases, each topic should only contain one task. If you have several very short, related tasks, then you might combine them into one topic.
In the case of a long task, then you probably won't need any headings except for the h1 at the top of the page.
1. Start with step one.
1. Use second-person imperative tense.
1. Basically, "You, do this" with every sentence.
1. Do not use the third-person "user" for steps you want the reader ("you") to perform.
1. Write steps that contain one action, possibly two related actions, such as copy and paste a thing or save and quit the program.
If a sentence is not telling the reader to do something, then it is not a step. You can use nested images or paragraphs like this one to add information if necessary.
In many cases, you should tell the reader what the outcome should be so that they know when they are done.
## One-step task
Some tasks are so short, they only contain one step.
Write one-step tasks as simple sentences, not as unordered lists or numbered lists.
## Short task
Short tasks can be grouped. How short constitutes "short" is a judgment call based on number of steps and how long individual steps are.
1. Use your judgment.
1. Ask your coworkers or someone on the Comm team for advice if you aren't sure.
## Next steps
If the task you are writing leads naturally to one or more other tasks, then include links after the task to help the reader figure out where to go next.
Thanks to internet search engines, every page in the documentation could be page one. Pretend you are explaining your task to a new Grafana user who just walked in off the street.
## Testing
It is a good practice to have someone else test the task you have written. If they can successfully complete the task using _only_ what the steps you have written, not guessing or using their inherent knowledge, then your task has passed the test. However, it is very common to find you have skipped steps, because _you_ are very familiar with Grafana and the topic you are explaining.
New users or people from other teams are very helpful for these tests.

View File

@@ -55,8 +55,6 @@ When to use which log level?
Use a contextual logger to include additional key/value pairs attached to `context.Context`, e.g. `traceID`, to allow correlating logs with traces and/or correlate logs with a common identifier.
You must [Enable tracing in Grafana](#2-enable-tracing-in-grafana) to get a traceID
Example:
```go
@@ -154,7 +152,7 @@ A distributed trace is data that tracks an application request as it flows throu
### Usage
Grafana currently supports two tracing implementations, [OpenTelemetry](https://opentelemetry.io/) and [OpenTracing](https://opentracing.io/). OpenTracing is deprecated, but still supported until we remove it. The two different implementations implements the `Tracer` and `Span` interfaces, defined in the _pkg/infra/tracing_ package, which you can use to create traces and spans. To get a hold of a `Tracer` you would need to get it injected as dependency into your service, see [Services](services.md) for more details.
Grafana currently supports two tracing implementations, [OpenTelemetry](https://opentelemetry.io/) and [OpenTracing](https://opentracing.io/). OpenTracing is deprecated, but still supported until we remove it. The two different implementations implements the `Tracer` and `Span` interfaces, defined in the _pkg/infra/tracing_ package, which you can use to create traces and spans. To get a hold of a `Tracer` you would need to get it injected as dependency into your service, see [Services](../../architecture/backend/services.md) for more details.
Example:
@@ -243,38 +241,36 @@ Be **careful** to not expose any sensitive information in span names, attribute
### How to collect, visualize and query traces (and correlate logs with traces) locally
#### 1. Start Jaeger
1. Start Jaeger
```bash
make devenv sources=jaeger
```
```bash
make devenv sources=jaeger
```
#### 2. Enable tracing in Grafana
2. Enable tracing in Grafana
To enable tracing in Grafana, you must set the address in your config.ini file
opentelemetry tracing (recommended):
opentelemetry tracing (recommended):
```ini
[tracing.opentelemetry.jaeger]
address = http://localhost:14268/api/traces
```
```ini
[tracing.opentelemetry.jaeger]
address = http://localhost:14268/api/traces
```
opentracing tracing (deprecated/not recommended):
opentracing tracing (deprecated/not recommended):
```ini
[tracing.jaeger]
address = localhost:6831
```
```ini
[tracing.jaeger]
address = localhost:6831
```
3. Search/browse collected logs and traces in Grafana Explore
#### 3. Search/browse collected logs and traces in Grafana Explore
You need provisioned gdev-jaeger and gdev-loki datasources, see [developer dashboard and data sources](https://github.com/grafana/grafana/tree/main/devenv#developer-dashboards-and-data-sources) for setup instructions.
You need provisioned gdev-jaeger and gdev-loki datasources, see [developer dashboard and data sources](https://github.com/grafana/grafana/tree/main/devenv#developer-dashboards-and-data-sources) for setup instructions.
Open Grafana explore and select gdev-loki datasource and use the query `{filename="/var/log/grafana/grafana.log"} | logfmt`.
Open Grafana explore and select gdev-loki datasource and use the query `{filename="/var/log/grafana/grafana.log"} | logfmt`.
You can then inspect any log message that includes a `traceID` and from there click on `gdev-jaeger` to split view and inspect the trace in question.
You can then inspect any log message that includes a `traceID` and from there click on `gdev-jaeger` to split view and inspect the trace in question.
4. Search/browse collected traces in Jaeger UI
#### 4. Search/browse collected traces in Jaeger UI
You can open http://localhost:16686 to use the Jaeger UI for browsing and searching traces.
You can open http://localhost:16686 to use the Jaeger UI for browsing and searching traces.

View File

@@ -1,87 +1,48 @@
# Internationalization
Grafana uses the [i18next](https://www.i18next.com/) framework for managing translating phrases in the Grafana frontend.
Grafana uses the [LinguiJS](https://github.com/lingui/js-lingui) framework for managing translating phrases in the Grafana frontend.
## tl;dr
**Please note:** We do not currently accept contributions for translations. Please do not submit pull requests for grafana.json files - they will be rejected.
- Use `<Trans i18nKey="search-results.panel-link">Go to {{ pageTitle }}</Trans>` in code to add a translatable phrase
- Translations are stored in JSON files in `public/locales/{locale}/grafana.json`
- Use `<Trans id="search-results.panel-link">Go to {panel.title}</Trans>` in code to add a translatable phrase
- Translations are stored in .po files in `public/locales/{locale}/messages.po`
- If a particular phrase is not available in the a language then it will fall back to English
- To update phrases in English, edit the default phrase in the component's source, then run `yarn i18n:extract`. Do not edit the `en-ES/grafana.json` or update the english phrase in Crowdin
- To update phrases in any translated language, edit the phrase in Crowdin. Do not edit the `{locale}/grafana.json`
## How to add a new translation phrase
### JSX
1. For JSX children, use the `<Trans />` component from `app/core/internationalization` with the `i18nKey`, ensuring it conforms to the guidelines below, with the default english translation. e.g.
1. Use one of `@lingui/macro`'s React components with the `id`, ensuring it conforms to the guidelines below, with the default english translation. e.g.
```jsx
import { Trans } from 'app/core/internationalization';
import { Trans } from @lingui/macro
const SearchTitle = ({ term }) => (
<Trans i18nKey="search-page.results-title">
Results for <em>{{ term }}</em>
const SearchTitle = ({term}) => (
<Trans id="search-page.results-title">
Results for {term}
</Trans>
);
```
Prefer using `<Trans />` for JSX children, and `t()` for props and other javascript usage.
Prefer using the JSX components (compared to the plain javascript functions, see below) where possible for phrases. Many props can (and probably should) be changed to accept the `React.ReactNode` instead of `string` for phrases put into the DOM.
When translating in grafana-ui, use a relative path to import `<Trans />` and `t()` from `src/utils/i18n`.
Note that our tooling must be able to statically analyse the code to extract the phrase, so the `i18nKey` can not be dynamic. e.g. the following will not work:
Note that Lingui must be able to statically analyse the code to extract the phrase, so the `id` can not be dynamic. e.g. the following will not work:
```jsx
const ErrorMessage = ({ id, message }) => <Trans i18nKey={`errors.${id}`}>There was an error: {{ message }}</Trans>;
const ErrorMessage = ({ id, message }) => <Trans id={`errors.${id}`}>There was an error: {message}</Trans>;
```
2. Upon reload, the default English phrase will appear on the page.
3. Before submitting your PR, run the `yarn i18n:extract` command to extract the messages you added into the `grafana.json` file and make them available for translation.
### Plain JS usage
Sometimes you may need to translate a string cannot be represented in JSX, such as `placeholder` props. Use the `t` macro for this.
```jsx
import { t } from "app/core/internationalization"
const placeholder = t('form.username-placeholder','Username');
return <input type="value" placeholder={placeholder}>
```
Interpolating phrases is a bit more verbose. Make sure the placeholders in the string match the values passed in the object - there's no type safety here!
```jsx
const placeholder = t('page.greeting', 'Hello {{ username }}', { username });
```
While the `t` function can technically be used outside of React functions (e.g, in actions/reducers), aim to keep all UI phrases within the React UI functions.
## How to add a new language
1. Add new locale in Crowdin and sync files to repo
1. Grafana OSS Crowdin project -> "dot dot dot" menu in top right -> Target languages
2. Grafana OSS Crowdin project -> Integrations -> Github -> Sync Now
3. If Crowdin's locale code is different from our IETF language tag, add a custom mapping in Project Settings -> Language mapping
2. Update `public/app/core/internationalization/constants.ts` (add new constant, and add to `LOCALES`)
3. Update `public/locales/i18next-parser.config.js` to add the new locale to `locales`
4. Run `yarn i18n:extract` and commit the result
3. Before submitting your PR, run the `yarn i18n:extract` command to extract the messages you added into the `messages.po` file and make them available for translation.
## How translations work in Grafana
Grafana uses the [i18next](https://www.i18next.com/) framework for managing translating phrases in the Grafana frontend. It:
Grafana uses the [LinguiJS](https://github.com/lingui/js-lingui) framework for managing translating phrases in the Grafana frontend. It:
- Marks up phrases within our code for extraction
- Extracts phrases into messages catalogues for translating in external systems
- "Compiles" the catalogues to a format that can be used in the website
- Manages the user's locale and putting the translated phrases in the UI
English phrases remain in our Javascript bundle in the source components (as the `<Trans />` or `t()` default phrase). At runtime, we don't need to load any messages for en-US. If the user's language preference is set to another language, Grafana will load that translations's messages JSON before the initial render.
### Phrase ID naming convention
We set explicit IDs for phrases to make it easier to identify phrases out of context, and to track where they're used. IDs follow a naming scheme that includes _where_ the phrase is used. The exception is the rare case of single reoccuring words like "Cancel", but default to using a feature/phrase specific phrase.
@@ -96,83 +57,137 @@ For components used all over the site, use just two segments:
- `footer.update`
- `navigation.home`
### I18next context
### Top-level provider
We rely on a global i18next singleton (that lives inside the i18next) for storing the i18next config/context.
In [AppWrapper.tsx](/public/app/AppWrapper.tsx) the app is wrapped with `I18nProvider` from `public/app/core/internationalization/index.tsx` where the Lingui instance is created with the user's preferred locale. This sets the appropriate context and allows any component from `@lingui/macro` to use the translations for the user's preferred locale.
### Message format
Lingui uses the [ICU MessageFormat](https://unicode-org.github.io/icu/userguide/format_parse/messages/) for the phrases in the .po catalogues. ICU has special syntax especially for describing plurals across multiple languages. For more details see the [Lingui docs](https://lingui.js.org/ref/message-format.html).
### Plain JS usage
See [Lingui Docs](https://lingui.js.org/ref/macro.html#t) for more details.
Sometimes you may need to translate a string cannot be represented in JSX, such as `placeholder` props. Use the `t` macro for this.
```jsx
import { t } from "@lingui/macro"
const placeholder = t({
id: 'form.username-placeholder',
message: `Username`
});
return <input type="value" placeholder={placeholder}>
```
While the `t` macro can technically be used outside of React functions (e.g, in actions/reducers), aim to keep all UI phrases within the React UI functions.
## Examples
See [i18next](https://www.i18next.com/) and [react-i18next](https://react.i18next.com/) documentation for more details.
See the [Lingui docs](https://lingui.js.org/ref/macro.html#usage) for more details.
### Basic usage
For fixed phrases:
```jsx
import { Trans } from 'app/core/internationalization';
import { Trans } from '@lingui/macro';
<Trans i18nKey="page.greeting">Hello user!</Trans>;
<Trans id="page.greeting">Hello user!</Trans>;
```
To interpolate variables, include it as an object child. It's weird syntax, but Trans will do it's magic to make it work:
You can include variables, just like regular JSX. Prefer using "simple" variables to make the extracted phrase easier to read for translators
```jsx
import { Trans } from 'app/core/internationalization';
import { Trans } from '@lingui/macro';
<Trans i18nKey="page.greeting">Hello {{ name: user.name }}!</Trans>;
// Bad - translators will see: Hello {0}
<Trans id="page.greeting">Hello {user.name}!</Trans>;
// Good - translators will see: Hello {userName}
const userName = user.name;
<Trans i18nKey="page.greeting">Hello {{ userName }}!</Trans>;
<Trans id="page.greeting">Hello {userName}!</Trans>;
```
Variables must be strings (or, must support calling `.toString()`, which we almost never want).
```jsx
import { Trans } from 'app/core/internationalization';
import { Trans } from '@lingui/macro';
// This will not work
const userName = <strong>user.name</strong>;
<Trans i18nKey="page.greeting">Hello {{ userName }}!</Trans>;
<Trans id="page.greeting">Hello {userName}!</Trans>;
// Instead, put the JSX inside the phrase directly
const userName = user.name;
<Trans i18nKey="page.greeting">
Hello <strong>{{ userName }}</strong>!
<Trans id="page.greeting">
Hello <strong>{userName}</strong>!
</Trans>;
```
### React components and HTML tags
Both HTML tags and React components can be included in a phase. The Trans function will handle interpolating it's children properly
Both HTML tags and React components can be included in a phase. The Lingui macro will replace them with placeholder tags for the translators
```js
import { Trans } from "app/core/internationalization"
import { Trans } from "@lingui/macro"
<Trans i18nKey="page.explainer">
const randomVariable = "variable"
<Trans id="page.explainer">
Click <button>here</button> to <a href="https://grafana.com">learn more.</a>
</Trans>
// ↓ is in the grafana.json file like
{
"page": {
"explainer": "Click <0>here</0> to <1>learn more</1>"
}
}
// ↓ is transformed by macros into
<Trans
id="page.explainer"
defaults="Click <0>here</0> to <1>learn more</1>"
components={[
<button />,
<Text />
]}
/>
// ↓ is in the messages.po file like ↓
msgid "page.explainer"
msgstr "Click <0>here</0> to <1>learn more</1>"
```
### Plurals
Plurals require special handling to make sure they can be translating according to the rules of each locale (which may be more complex that you think!). Use the `<Trans />` component, with the `count` prop.
See the [Lingui docs](https://lingui.js.org/ref/macro.html#id1) for more details.
Plurals require special handling to make sure they can be translating according to the rules of each locale (which may be more complex that you think!). Use the `<Plural />` component and specify the plural forms for the default language (English). The message will be extracted into a form where translators can extend it with rules for other locales.
```js
import { Trans } from 'app/core/internationalization';
import { Plural } from "@lingui/macro"
<Trans i18nKey="newMessages" count={messages.length}>
You got {{ count: messages.length }} messages.
</Trans>;
<Plural
id="sharing.shared-with"
value={sharedCount}
none="Not shared with anyone"
one="Shared with one person"
other="Shared with # people"
/>
// ↓ is transformed by macros into ↓
<Trans
id="example.plurals"
values={{ sharedCount }}
defaults="{sharedCount, plural, none {Not shared with anyone}, one {Shared with one person}, other {Shared with # people}"
/>
// sharedCount = 0 -> Not shared with anyone
// sharedCount = 1 -> Shared with one person
// sharedCount = 3 -> Shared with # people
```
Once extracted with `yarn i18n:extract` you will need to manually fill in the grafana.json message catalogues with the additional plural forms. See the [react-i18next docs](https://react.i18next.com/latest/trans-component#plural) for more details.
### Date and time
[Lingui has functions](https://lingui.js.org/ref/core.html#I18n.date) to format dates and times according to the convention to the user's preferred locale, based on the browser [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) API. However, as displaying dates and times is fundamental to Grafana, guidelines have not been established for this yet.
## Documentation

View File

@@ -13,6 +13,7 @@ The following checklist/summary should give you a quick overview of what to ask/
- Reviewed and approved?
- All checks passed?
- Proper pull request title?
- Milestone assigned?
- Add to changelog/release notes?
- Needs backporting?
@@ -39,18 +40,10 @@ See [formatting guidelines](create-pull-request.md#formatting-guidelines) for mo
### Assign a milestone
Several things in the Grafana release process requires at least pull requests to be in a milestone, for example [generating changelog/release notes](#include-in-changelog-and-release-notes).
A milestone **should** be added to every pull request. Several things in the Grafana release process requires at least pull requests to be in a milestone, for example [generating changelog/release notes](#include-in-changelog-and-release-notes).
This makes it easier to track what changes go into a certain release. Without this information, release managers have to go through git commits which is not an efficient process.
That being said, _you don't have to assign a milestone manually_ to a pull request.
Instead, when it is merged & closed then a bot will look for the most appropriate miletone and assign it to the pull request.
That milestone should always reflect the branch that the pull request is merged into.
For every major and minor release there is a milestone ending with `.x` (e.g. `10.0.x` for the 10.0.x releases).
Pull requests targetting `main` should use the `.x` milestone of the next minor (or major) version (you can find that version number inside the `package.json` file).
Backport pull requestss should use the version of the target branch (e.g. `9.4.x` for the `v9.4.x` branch).
### Include in changelog and release notes?
At Grafana we generate the [changelog](https://github.com/grafana/grafana/blob/main/CHANGELOG.md) and [release notes](https://grafana.com/docs/grafana/latest/release-notes/) based on merged pull requests. Including changes in the changelog/release notes is very important to provide a somewhat complete picture of what changes a Grafana release actually includes.
@@ -85,15 +78,15 @@ The changelog/release notes are divided into sections and here's a description o
**Features and enhancements:**
Labeled with `add to changelog` and any of the other section rules don't apply.
Milestone assigned and labeled with `add to changelog` and any of the other section rules don't apply.
**Bug fixes:**
Labeled with `add to changelog` and either labeled with `type/bug` or the pull request title contains `fix` or `fixes`.
Milestone assigned and labeled with `add to changelog` and either labeled with `type/bug` or the pull request title contains `fix` or `fixes`.
**Plugin development fixes & changes:**
Labeled with `area/grafana/toolkit`, `area/grafana/ui` or `area/grafana/runtime`.
Milestone assigned and labeled with `area/grafana/toolkit`, `area/grafana/ui` or `area/grafana/runtime`.
**Deprecations:**
@@ -142,14 +135,6 @@ Some examples when backport is not required:
- The change is supposed to be released in the next major/minor release, e.g. v8.0.0, but the release branch, e.g. v8.0.x, has not yet been created.
#### Required labels
To ensure that we don't backport pull requests that don't need to be backported, i.e. implement new features, and only backport pull requests that address bugs, have a product approval, or refer to docs changes, backport labels need to be followed by either:
- `type/bug` label: Pull requests which address bugs,
- `product-approved` label: Urgent fixes which need product approval, in order to get merged,
- `type/docs` label: Docs changes`.
> **Note:** You can still backport a pull request after it's been merged.
## Doing the actual merge

View File

@@ -0,0 +1,194 @@
# Backend style guide
Grafana's backend has been developed for a long time with a mix of code styles. This guide explains how we want to write Go code in the future.
Unless stated otherwise, use the guidelines listed in the following articles:
- [Effective Go](https://golang.org/doc/effective_go.html)
- [Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
- [Go: Best Practices for Production Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style)
## Linting and formatting
To ensure consistency across the Go codebase, we require all code to pass a number of linter checks.
We use the standard following linters:
- [gofmt](https://golang.org/cmd/gofmt/)
- [golint](https://github.com/golang/lint)
- [go vet](https://golang.org/cmd/vet/)
In addition to the standard linters, we also use:
- [revive](https://revive.run/) with a [custom config](https://github.com/grafana/grafana/blob/main/conf/revive.toml)
- [GolangCI-Lint](https://github.com/golangci/golangci-lint)
- [gosec](https://github.com/securego/gosec)
To run all linters, use the `lint-go` Makefile target:
```bash
make lint-go
```
## Testing
We value clean and readable code, that is loosely coupled and covered by unit tests. This makes it easier to collaborate and maintain the code.
Tests must use the standard library, `testing`. For assertions, prefer using [testify](https://github.com/stretchr/testify).
The majority of our tests uses [GoConvey](http://goconvey.co/) but that's something we want to avoid going forward.
In the `sqlstore` package we do database operations in tests and while some might say that's not suited for unit tests. We think they are fast enough and provide a lot of value.
### Assertions
Use respectively [`assert.*`](https://github.com/stretchr/testify#assert-package) functions to make assertions that
should _not_ halt the test ("soft checks") and [`require.*`](https://github.com/stretchr/testify#require-package)
functions to make assertions that _should_ halt the test ("hard checks"). Typically you want to use the latter type of
check to assert that errors have or have not happened, since continuing the test after such an assertion fails is
chaotic (the system under test will be in an undefined state) and you'll often have segfaults in practice.
### Sub-tests
Use [`t.Run`](https://golang.org/pkg/testing/#T.Run) to group sub-test cases, since it allows common setup and teardown
code, plus lets you run each test case in isolation when debugging. Don't use `t.Run` to e.g. group assertions.
### Cleanup
Use [`t.Cleanup`](https://golang.org/pkg/testing/#T.Cleanup) to clean up resources in tests. It's a less fragile choice than `defer`, since it's independent of which
function you call it in. It will always execute after the test is over in reverse call order (last `t.Cleanup` first, same as `defer`).
### Mock
Optionally, we use [`mock.Mock`](https://github.com/stretchr/testify#mock-package) package to generate mocks. This is
useful when you expect different behaviours of the same function.
#### Tips
- Use `Once()` or `Times(n)` to make this mock only works `n` times.
- Use `mockedClass.AssertExpectations(t)` to guarantee that the mock is called the times asked.
- If any mock set is not called or its expects more calls, the test fails.
- You can pass `mock.Anything` as argument if you don't care about the argument passed.
- Use `mockedClass.AssertNotCalled(t, "FunctionName")` to assert that this test is not called.
#### Example
This is an example to easily create a mock of an interface.
Given this interface:
```go
func MyInterface interface {
Get(ctx context.Context, id string) (Object, error)
}
```
Mock implementation should be like this:
```go
import
func MockImplementation struct {
mock.Mock
}
func (m *MockImplementation) Get(ctx context.Context, id string) error {
args := m.Called(ctx, id) // Pass all arguments in order here
return args.Get(0).(Object), args.Error(1)
}
```
And use it as the following way:
```go
objectToReturn := Object{Message: "abc"}
errToReturn := errors.New("my error")
myMock := &MockImplementation{}
defer myMock.AssertExpectations(t)
myMock.On("Get", mock.Anything, "id1").Return(objectToReturn, errToReturn).Once()
myMock.On("Get", mock.Anything, "id2").Return(Object{}, nil).Once()
anyService := NewService(myMock)
resp, err := anyService.Call("id1")
assert.Equal(t, resp.Message, objectToReturn.Message)
assert.Error(t, err, errToReturn)
resp, err = anyService.Call("id2")
assert.Nil(t, err)
```
#### Mockery
When an interface to test is too big, it's annoying to mock each function manually. To avoid this, you can
use [`mockery`](https://github.com/vektra/mockery) library to generate the mocks.
The command is like the following (there are more options documented if you need to use another one):
```
mockery --name InterfaceName --structname MockImplementationName --inpackage --filename my_implementation_mock.go
```
- `--name`: Interface to mock
- `--structname`: Mock implementation name
- `--inpackage`: To use the same package name as the interface
- `--filename`: Your mock generated file name
If any interface signature changes, executing the command again updates the mock.
Additionally, you can put `go:generate` command on the top of the file as a comment. It's useful because some IDEs
like Goland and Visual Studio Code allows executing scripts from the IDE.
```
package <package>
import (
...
)
//go:generate mockery --name InterfaceName --structname MockImplementationName --inpackage --filename my_implementation_mock.go
```
## Globals
As a general rule of thumb, avoid using global variables, since they make the code difficult to maintain and reason
about, and to write tests for. The Grafana codebase currently does use a lot of global variables, especially when
it comes to configuration, but that is a problem we're trying to solve.
## Pointers
In general, use value types and only reach for pointers when there's a real need. The reason being that pointers
increase the risk of bugs, since a pointer can be nil and dereferencing a nil pointer leads to a panic (AKA segfault).
Valid reasons to use a pointer include (but not necessarily limited to):
- You might need to pass a modifiable argument to a function
- Copying an object might incur a performance hit (benchmark to check your assumptions, copying is often faster than
allocating heap memory)
- You might _need_ `nil` to tell if a variable isn't set, although usually it's better to use the type's zero
value to tell instead
## Database
In database related code, we follow certain patterns.
### Foreign keys
While they can be useful, we don't generally use foreign key constraints in Grafana, for historical and
technical reasons. See this [comment](https://github.com/grafana/grafana/issues/3269#issuecomment-383328548) by Torkel
for context.
### Unique columns
If a column, or column combination, should be unique, add a corresponding uniqueness constraint through a migration.
## JSON
The simplejson package is used a lot throughout the backend codebase, but it's legacy, so if at all possible
avoid using it in new code. Use [json-iterator](https://github.com/json-iterator/go) instead, which is a more performant
drop-in alternative to the standard [encoding/json](https://golang.org/pkg/encoding/json/) package. While encoding/json
is a fine choice, profiling shows that json-iterator may be 3-4 times more efficient for encoding. We haven't profiled
its parsing performance yet, but according to json-iterator's own benchmarks, it appears even more superior in this
department.

View File

@@ -0,0 +1,345 @@
# Documentation style guide
This style guide applies to all documentation created for Grafana products.
For information about how to write technical documentation, refer to the following resources:
- [Google Technical Writing courses](https://developers.google.com/tech-writing)
- [Divio documentation system](https://documentation.divio.com/)
- [Vue writing principles](https://v3.vuejs.org/guide/contributing/writing-guide.html#principles)
## Contributing
The _Documentation style guide_ is a living document. Add to it whenever a style decision is made or a question is answered regarding style, grammar, or word choice.
## Published guides
For all items that are not covered in this guide, refer to the [Google developer documentation style guide](https://developers.google.com/style) and the [Microsoft style guide](https://docs.microsoft.com/en-us/style-guide/welcome/), in that order.
## Spelling
To catch common misspellings, the [codespell](https://github.com/codespell-project/codespell) tool is run for every change.
## Inclusive language
Avoid using charged language.
### Allowing and blocking
When referring to _allowing_ or _blocking_ content or traffic, use a form of _allow_ or _block_:
- (noun) _allowlist_ or _blocklist_
- (verb) _allow_ or _block_
Example: _To **allow** outgoing traffic, add the IP to the **allowlist**._
Avoid _whitelist_ or _blacklist_.
### Primary and secondary
To describe relationships between nodes or processes, there are several options:
- Use _primary_, _main_, or _parent_, instead of _master_.
- Use _secondary_, _replica_, or _child_, instead of _slave_.
Avoid _master_ or _slave_.
## Grafana-specific style
The following guidelines are specific to Grafana documentation. For the most part, these are _guidelines_ are not rigid rules. If you have questions, then please ask in the #docs channel of Grafana Slack.
### General
Per the [Voice and tone](https://developers.google.com/style/tone) section of the Google developer documentation style guide:
> In your documents, aim for a voice and tone that's conversational, friendly, and respectful without being overly colloquial or frivolous; a voice that's casual and natural and approachable, not pedantic or pushy. Try to sound like a knowledgeable friend who understands what the developer wants to do.
- Use active voice:
- Active: Grafana displays the heatmap visualization.
- Passive: The heatmap visualization is displayed.
- Write directly to the reader:
- Use: "After you create a dashboard, you can add a panel to it."
- Avoid: "After you create a dashboard, it is possible to add a panel to it."
- Write in the imperative second person:
- "Click the panel."
- "Close the window."
- Write in present tense:
- Use: "The panel opens."
- Avoid: "The panel will open."
- Do not use an ampersand (&) as an abbreviation for _and_.
- **Exceptions:** If an ampersand is used in the Grafana UI, then match the UI.
- Avoid using internal jargon or slang.
- Do not use two spaces after a period; use one space after a sentence.
- Remove any extra space characters at the end of a paragraph.
- Aim for your sentences to be fewer than 25 words. Instead, use smaller complete phrases or change the format, such as using a list.
- Aim for paragraphs to be three sentences or fewer. Make the text more concise, use more headings, or both.
### File naming conventions
- Files that are displayed in the help system should have names that are all lowercase, no spaces. Use hyphens instead of spaces. Example: glossary.md
- Documentation file names should match the title. **Note:** This only applies to new files at this time. Do not change the names of older files unless directed to do so.
- Internal reference file names should be all uppercase except the file extension. Example: CONTRIBUTING.md
- Image file names should be descriptive and unique. Also, add the software version number that the image applies to or the screenshot was taken in. Example: share-dashboard-link-7-3.png
### Headings
- Write headings in sentence case, not title case.
- This is sentence case
- This is Title Case
- Task topic headings start with a verb.
- Write a query
- Create a dashboard
- Concept and reference topic headings should be nouns or gerunds. Examples: Contributing to docs, Visualizations, Style guide
#### Heading don'ts
- Avoid stacked headings, which is following one heading with another heading.
- Avoid skipping heading levels. For example, an h1 should be followed by an h2 rather than an h3.
- Avoid having just one lower-level heading. For example, h1, h2, h2, h3, h3, h2, h2 is a good order. Do not go h1, h2, h3, h2, h3, h2.
- Avoid using hyphens in headings.
- Do not include parenthetical words like (Important!) in headings.
#### Step-by-step headings
In most cases, headings should not be numbered steps.
However, sometimes we need to use headings as numbered steps. This is mostly in cases where each step is complex or a series of other procedures. For example, in [Getting started with Grafana and Prometheus](https://grafana.com/docs/grafana/latest/getting-started/getting-started-prometheus/).
If that is the case, then use the following format for headings:
##### Step 1. Install the software
##### Step 2. Run the software
### Images
- Preferred format is .png
- File extension should be all lowercase.
- Preferred DPI is 72.
- Assume all graphics will be exclusively viewed on the web.
- Maximum image size is 3840px X 2160px.
- Screenshots should be readable, but not too large.
- _Do not_ use image shortcodes. Follow the guidance in [Markdown style guide](../documentation/documentation-markdown-guide.md#Images).
- Markdown image links are preferred. Only use the HTML image links if you need to style the image in ways unsupported in Markdown.
- When you name a file, follow the [file naming conventions](#file-naming-conventions). Example: image-name-7-3.png
### Unordered lists
Here are a few general rules about unordered lists. For more guidance, refer to [Lists](https://developers.google.com/style/lists) in the [Google developer style guide](https://developers.google.com/style/).
- List items should begin with a capital letter unless there is a strong reason not to. For example, you are listing case-sensitive parameters.
- List items should end with periods if they are complete sentences. If one item in a list ends with a period, then apply periods to all of them.
### Capitalization
- Grafana, Loki, and Prometheus are always capitalized unless part of a code block.
- API names are always Title Case, followed by "API"—for example, "Dashboard Permissions API"
- Abbreviations are always capitalized (such as API, HTTP, ID, JSON, SQL, or URL) unless they are part of a code block.
- Menu and submenu titles always use sentence case: capitalize the first word, and lowercase the rest.
- "Dashboards" when referring to the submenu title.
- "Keyboard shortcuts" when referring to the submenu topic.
- Generic and plural versions are always lowercase.
- Lowercase "dashboard" when referring to a dashboard generally.
- Lowercase "dashboards" when referring to multiple dashboards.
- **Exceptions:** If a term is lowercased in the Grafana UI, then match the UI.
#### Git, GitHub
Git is always capitalized, unless part of a code block. GitHub is the correct spelling and capitalization.
#### Integrations
In general, "integration" is not capitalized. Only capitalize it if it is capitalized in the UI or part of a proper noun, like the name of a specific integration.
The first letter of the name of an integration is always capitalized, even if the original named source is lowercase.
**Examples:**
- MySQL Integration
- CockroachDB Integration
- Etcd Integration
- I installed an integration on my local Grafana.
#### Kubernetes objects
Capitalize Kubernetes objects such as Job, Pod, and StatefulSet when it is clear you are specifically talking about them and not generic jobs, pods, or whatever.
Introduce the object as "Kubernetes XX" on the first usage, then just the object in subsequent uses.
**Example:**
Create the Kubernetes Job and check the logs to retrieve the generated token:
The Job requires the token be submitted as …
### Links and references
When referencing another document, use "Refer to" rather than alternatives such as "See" or "Check out."
Always give the reader some idea of what to expect in the reference. Avoid blind references, such as, "Refer to [this file](link)."
When possible, use the exact title of the page or section you are linking to as the link text.
**Example**
Refer to the [Documentation style guide](documentation-style-guide.md) for information about word usage and capitalization guidelines.
### Notes, tips, cautions, and warnings
Grafana documentation uses notes, tips, cautions, and warnings. Notes are the most common. The format for all of them is indented, bold, sentence case:
```
> **Note:**
```
#### Notes
Notes provide additional information that the user should be extra aware of. For example:
> **Note:** This page describes a feature for Grafana 7.0 beta.
#### Tips
Tips describe alternate or more efficient ways of doing things. Rarely used.
#### Cautions
Cautions warn the user that they should proceed with caution. Use cautions to emphasize the potential downside of a course of action.
> **Caution:** If you turn off authentication requirements, then anyone can access your Grafana instance. This poses a considerable security risk.
#### Warnings
Warnings tell the user not to do something. For example:
> **Warning:** Grafana does not back up your dashboards. If you delete a dashboard, then you might not be able to recover it.
### Command line examples
- Do not assume everyone is using Linux. Make sure instructions include enough information for Windows and Mac users to successfully complete procedures.
- Do not add `$` before commands. Make it easy for users to copy and paste commands.
- **Right:** `sudo yum install grafana`
- **Wrong:** `$ sudo yum install grafana`
- Include `sudo` before commands that require `sudo` to work.
For terminal examples and Grafana configuration, use a `bash` code block:
```bash
sudo yum install grafana
```
For HTTP request/response, use an `http` code block:
```http
GET /api/dashboards/id/1/permissions HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
### Word usage
Grafana products has some words, abbreviations, and terms particular to the Grafana discourse community.
#### changelog
One word, not two.
**Example**
- Read the full changelog.
**Exception:**
- When referring to the file containing the official changelog, use the filename: `CHANGELOG.md`.
#### checkout, check out
Two words if used as a verb, one word if used as a noun.
**Examples**
- Check out these new features!
- Proceed to checkout.
#### data source
Two words, not one.
**Exceptions:**
- "datasource" used as an identifier
- "datasource" in a URL
- Use "data source" instead of "datasource" unless used as an identifier, in code, or as part of a URL.
- Spell out "repository" and avoid the shorter "repo."
- Use "Unix" as the preferred spelling (as opposed to "UNIX", or "unix") when referring to the family of operating systems.
#### display (verb)
_Display_ is a transitive verb, which means it always needs a direct object.
- Correct, active voice: Grafana displays your list of active alarms.
- Correct, but passive voice: Your list of active alarms is displayed.
- Incorrect: The list of active alarms displays.
#### drawer
Do not use. This is developer jargon that refers to a UI panel. Refer to the panel or feature by its proper name.
#### intro, introduction
"Introduction" is the preferred word. Use "intro" if there are space constraints (like on the side menu) or you are specifically trying for a less formal, more conversational tone.
#### metadata
One word, not two.
#### mixin
One word, not two. Also, not hyphenated.
#### open source, open-source
Do not hyphenate when used as an adjective unless the lack of hyphen would cause confusion. For example: _Open source software design is the most open open-source system I can imagine._
Do not hyphenate when it is used as a noun. For example: _Open source is the best way to develop software._
#### plugin, plug in
Two words if used as a verb, one word if used as a noun. Do not use _plug-in_.
**Examples**
- Plug in the appliance.
- Download the plugin.
#### setup, set up
Two words if used as a verb, one word if used as a noun.
**Examples**
- Set up the workspace.
- Initial setup might take five minutes.
#### node_exporter, windows_exporter
When referencing the Prometheus data source exporters, always use "node_exporter" and "windows_exporter" when referring to those tools.
**Correct:** node_exporter, windows_exporter
**Incorrect:** Node Exporter, node exporter, Windows Exporter, Windows exporter, windows exporter.
#### web server
Two words, not one.
**Correct:** web server
**Incorrect:** webserver
### MS SQL Server
Always use "MS SQL" when referring to MS SQL Server application.
Incorrect UI spellings will be corrected in a later version of Grafana.

View File

@@ -25,15 +25,14 @@ import { GrafanaTheme2 } from '@grafana/data';
import { useStyles2 } from '@grafana/ui';
import { css } from '@emotion/css';
function Foo(props: FooProps) {
const styles = useStyles2(getStyles);
// Use styles with className
}
const getComponentStyles = (theme: GrafanaTheme2) => css`
padding: ${theme.spacing.md};
`;
const getStyles = (theme: GrafanaTheme2) =>
css({
padding: theme.spacing(1, 2),
});
const Foo: FC<FooProps> = () => {
const styles = useStyles2(getComponentsStyles);
// Use styles with className
};
```
#### Get the theme object
@@ -94,7 +93,7 @@ Example use cases:
| -------------------------- | ------------------------------------------------------------ |
| theme.colors.border.weak | Primary border for panels and panes and other subtle borders |
| theme.colors.border.medium | For stronger borders like inputs |
| theme.colors.border.strong | For even stronger border like hover highlighted border |
| theme.colors.border.strong | For even stronger border like hover highighted border |
### Actions

Some files were not shown because too many files have changed in this diff Show More