Upgrades the version of Go used to build Grafana v9.1.x to 1.19.1.
Backport of Chore: Upgrade Go to 1.19.1 #54902
Backport of Chore: Update swagger to v0.30.2 #55159
* 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>
The length of the identifier from the underlying library is 9 or more characters depending on the rate at which the identifiers are generated. See https://pkg.go.dev/github.com/teris-io/shortid
The test previously made the assumption that the length will always be 10, which would intermittently fail.
(cherry picked from commit 647997cc4c)
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
This restores the FromAlert header to prometheus for Grafana managed alert Queries.
It does this by reverting "Prometheus: Remove middleware for custom headers (#51518)" , but also changing it so it is only the FromAlert header.
This reverts commit 2372501368.
(cherry picked from commit 27288276a2)
Co-authored-by: Kyle Brandt <kyle@grafana.com>
* Update grafana version tag to 9.0.5
The user doing cut and paste will not notice and will install a old version of Grafana
* Update version to 9.1.0
Current latest tag is 9.1.0: https://hub.docker.com/r/grafana/grafana/tags
(cherry picked from commit a09e4b0e4f)
Co-authored-by: Saverio Proto <zioproto@gmail.com>
This commit fixes a bug where queries from datasources such as InfluxDB that returned no data would not create a DatasourceNoData alert, but instead an error "can only reduce type series, got type noData".
(cherry picked from commit 7d20766ae9)
Co-authored-by: George Robinson <george.robinson@grafana.com>
Having it doesn't prevent pulling any images, so it's easier if it's everywhere
(cherry picked from commit a44c0040a9)
Co-authored-by: Julien Duchesne <julien.duchesne@grafana.com>
* apply security fix for admin only folder migration (#482)
* Data source: prevent from using auth proxy header as custom data source header (#474)
* applying changes from 446/fix-user-escalation-through-auth-proxy
* linting
* only validate custom headers if auth proxy is enabled
* import ordering
* add links to CVE
* clean up
* remove typo
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
(cherry picked from commit 0100a6aa9645313b25a79a17d947cbf936cc4e76)
(cherry picked from commit c048378ad5)
* Explore: Add feature tracking events (#54514)
* refactor: repair tests
* refactor: clean up
* feat: add details to change of data source
* refactor: remove duplicate tracking
* refactor: make tracking reusable in an easier way
* refactor: add property
* refactor: change data for time picker
* refactor: change tracking label for time picker
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* refactor: store tracking in explore component
* refactor: add index signature
* refactor: remove ?
* refactor: split into 3 callbacks
* refactor: apply suggestions from code review
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
(cherry picked from commit dbbab6e95c)
* refactor: remove unrelated changes
* Loki: Fix running queries without an `expr`
* rever previous change
* only dispatch `initQuery` if the DS is uninitialized
* moved `isUninitialized` to static var
(cherry picked from commit a3ff758874)
Co-authored-by: Sven Grossmann <Svennergr@gmail.com>
* updated imported dashboards
* Adds check for MetricDefinitionsQuery in migration
* Removed delete from migratio
* switched back to const for migratedQ
* Added depreacted to MetricDefinitionQuery
(cherry picked from commit 1e9f5a5080)
Co-authored-by: Yaelle Chaudy <42030685+yaelleC@users.noreply.github.com>
* TablePanel/StatPanel: Fix values not being visible when background transparent
* Maintain backwards compatibility
(cherry picked from commit 32c4245efd)
Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
* OAuth: Allow assigning Server Admin (#54780)
* extract errors to errors file
* implement oauth server admin assignment
* add server admin tests
* deduplicate autoAssignOrgRole
* deduplicate strict setting
* deduplicate strict setting
* add support for generic oauth
* add role attribute strict support for generic oauth
* add support for github/gitlab
* assignGrafanaAdmin option is here to stay
* unify similar errors
* add config option
* add okta server admin mapping
* remove never used Company attribute
* unify generic oauth role extract with other methods
* case insensitive role match as in azure
* add ini settings
* add server admin to devenv
* remove duplicate fields
* add documentation to oauth
* fix titlecase test
* implement doc feedback
(cherry picked from commit ef245874da)
* Auth: Restore legacy behavior and add deprecation notice for empty org role in oauth (#55118)
* Auth: Add deprecation notice for empty org role
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* fix recasts
* fix azure tests missing logger
* Adding test to gitlab oauth
* Covering more cases
* Cover more options
* Add role attributestrict check fail
* Adding one more edge case test
* Using legacy for gitlab
* Yet another edge case YAEC
* Reverting github oauth to legacy
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Not using token
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Nit.
* Adding warning in docs
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* add warning to generic oauth
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Be more precise
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Adding warning to github oauth
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Adding warning to gitlab oauth
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Adding warning to okta oauth
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Add docs about mapping to AzureAD
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Clarify oauth_skip_org_role_update_sync
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Nit.
* Nit on Azure AD
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Reorder docs index
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Fix typo
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: gamab <gabi.mabs@gmail.com>
(cherry picked from commit 00e7324bf6)
* Auth: Allow admins to manually change oauth user role if `oauth_skip_org_role_update_sync` is enabled (#55182)
* Auth: Allow admins to change oauth user info it it's not synced.
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Update public/app/features/admin/UserAdminPage.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Add missing import
* Simplify init
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* SAML: Add option to skip org role sync (#55230)
* SAML: Add option to skip org role sync
* Modify frontend accordingly
* Remove update from config option name
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Remove update from config option name
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Fix typo
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: gamab <gabi.mabs@gmail.com>
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
(cherry picked from commit 3e2e9f93b9)
* Update gitlab_oauth_test.go
* Update gitlab_oauth_test.go