Commit Graph

14929 Commits

Author SHA1 Message Date
Matheus Macabu
2e2e89a816 [release-11.5.6] Dependencies: Bump github.com/openfga/openfga to v1.8.13 to address CVE-2025-48371 (#106118)
* Dependencies: Bump github.com/openfga/openfga to v1.8.13 to address CVE-2025-48371

* Static: Fix failing unit test import
2025-06-09 13:06:46 +02:00
Sofia Papagiannaki
17c961c11c [release-11.5.6]: Fix static tests (#106133) 2025-05-28 16:04:01 +03:00
github-actions[bot]
40ed88fe86 apply security patch: release-11.5.5/security-patch-202505051005.patch 2025-05-21 20:58:38 +00:00
github-actions[bot]
59fc4b9e98 apply security patch: release-11.5.5/404-202504151210.patch 2025-05-21 20:58:37 +00:00
Matheus Macabu
c0e2889cea [release-11.5.5] Dependencies: Bump packages in modules with incorrect dependencies or outside of workspace (#105461)
Dependencies: Bump golang.org/x to latest
2025-05-15 14:52:51 +02:00
Matheus Macabu
f4ad2eb9ec [release-11.5.5] Dependencies: Bump github.com/blevesearch/bleve/v2 from v2.4.3 to v2.5.0 (#105441)
Dependencies: Bump github.com/blevesearch/bleve/v2 from v2.4.3 to v2.5.0
2025-05-15 12:05:26 +02:00
Matheus Macabu
2aa89a90a2 [release-11.5.5] Dependencies: Bump github.com/openfga/openfga from v1.8.5 to v1.8.12 (#105373)
Dependencies: Bump github.com/openfga/openfga from v1.8.5 to v1.8.12
2025-05-14 14:17:25 +02:00
William Wernert
2ba6cf30cd [release-11.5.5] Alerting: Ensure field validators return the proper type (#105288)
Alerting: Ensure field validators return the proper type (#104050)

* Ensure field validators return the proper type

This ensures correct error propagation through services up to
the API layer.

* Move error wrapping up to call site

(cherry picked from commit 820c338414)
2025-05-13 08:49:40 -04:00
Matheus Macabu
919f46426c [release-11.5.5] Dependencies: Unpin and bump github.com/getkin/kin-openapi from v0.126.0 to v0.132.0 (#105252)
Dependencies: Unpin and bump github.com/getkin/kin-openapi from v0.126.0 to v0.132.0
2025-05-12 14:52:30 +02:00
Matheus Macabu
2e24578a72 [release-11.5.5] Chore: Bump Go version to 1.24.3 (#105109)
Chore: Bump Go version to 1.24.3
2025-05-08 16:08:08 +02:00
Kevin Minehart
7b1be85980 [release-11.5.5] Backport workflow fixes (#104694)
* Copy workflows and actions from main

* add zizmor.yml
2025-04-29 11:47:01 -05:00
github-actions[bot]
6c64b04c39 apply security patch: release-11.5.4/365-202504020730.patch
commit 27ee68a7899680bcf0763aa6a7b35d93829fa767
Author: Andres Martinez Gotor <andres.martinez@grafana.com>
Date:   Mon Mar 31 12:15:52 2025 +0200

    Sanitize paths before evaluating access to route
2025-04-22 13:47:05 +00:00
Kevin Yu
1db6d349a7 [release-11.5.4] Prometheus: Add support for cloud partners Prometheus data sources (#103942)
Prometheus: Add support for cloud partners Prometheus data sources (#103482)

* wip

* Add prom flavor support for data source variables and export/import dashboards (#103321)

* add dashboard and data source var selection

* use match plugin id instead

* use updated matchpluginid

* formatting

* cleanup

* regex anchor

* update error msg

* Alerting: Clean up prometheus-flavored types and functions (#103703)

* clean up types and utility functions for dealing with
prometheus-flavored data sources

* Refactor alerting datasource types to use constants as source of truth

* Alerting: Clean up prometheus-flavored types and functions on the bac… (#103716)

Alerting: Clean up prometheus-flavored types and functions on the backend

* add matchPluginId tests

* Update matchPluginId func to bidirectional (#103746)

* update matchpluginid func to bidirectional

* lint

* formatting

* use actual isSupportedExternalRulesSourceType in test

* add tests in datasource_srv

* betterer

* remove type assertion

* remove unnecessary case

* use satisifies to not have to convert tuple to an array of string

* add prometheus_flavor test

---------

Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Alexander Akhmetov <me@alx.cx>
(cherry picked from commit fd6fd91115)
2025-04-14 09:47:18 -07:00
xavi
684fbc089e [release-11.5.4] [IAM] Prepend AppSubURL to redirectURI before validating it (#103771)
[IAM] Prepend AppSubURL to redirectURI before validating it (#103475)

(cherry picked from commit 5053aa576d)
2025-04-11 14:00:33 +02:00
Andreas Christou
63ba7b6c34 [release-11.5.4] Azure: Add support for custom namespace and custom metrics variable queries (#103650)
Azure: Add support for custom namespace and custom metrics variable queries (#99279)

* Add custom metric namespace and metric name queries

* Fix outdated type

* Support specifying custom

- Add custom support to getMetricNamespaces
- Ensure the customNamespace is specified in getMetricNames calls

* Update data source tests

* Support custom namespace/metrics variable queries

- Add tests

* Add fields to variable editor

- Update tests
- Update docs
- Update selectors

* Remove unneeded Promise.resolve

* Add comment

* Don't mutate expected path

* Lint

* Update docs/sources/datasources/azure-monitor/template-variables/index.md

Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>

* Update docs/sources/datasources/azure-monitor/template-variables/index.md

Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>

* Update docs

* Update conditionals

* Lint

---------

Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
(cherry picked from commit e01d8ad5b5)

# Conflicts:
#	pkg/tsdb/azuremonitor/kinds/dataquery/types_dataquery_gen.go
2025-04-08 21:34:22 +01:00
Mariell Hoversholm
bf3f23b558 [release-11.5.4] Go: Bump to 1.24.2 (#103525)
Go: Bump to 1.24.2

It is not likely we are actually affected by the CVEs, but updating proactively is not a bad idea nonetheless.

Fixes: CVE-2025-22871
Fixes: https://github.com/grafana/grafana-operator-experience-squad/issues/1311
2025-04-08 17:24:33 +02:00
Matheus Macabu
797c085005 [release-11.5.4] Dependencies: Bump github.com/redis/go-redis/v9 to 9.6.3 to address CVE-2025-29923 (#102865)
Dependencies: Bump github.com/redis/go-redis/v9 from 9.6.1 to 9.6.3
2025-03-26 11:43:27 +01:00
Denis Vodopianov
6932c6af7e Chore: Update CVE-affected dependencies (#102709)
Chore: Update CVE-affected golang-gwt dependencies
2025-03-24 16:23:58 +01:00
Ashley Harrison
be1aa19642 [release-11.5.3] Org redirection: Fix linking between orgs (#102089)
Org redirection: Fix linking between orgs (#102021)

* don't trim path

* add unit test

(cherry picked from commit f3fb9592da)
2025-03-13 12:15:42 +02:00
grafana-delivery-bot[bot]
7abc79cb2e [release-11.5.3] Alerting: Re-encrypt existing contact points before get and patch in legacy config API (#101819)
Alerting: Re-encrypt existing contact points before get and patch in legacy config API (#101263)

* Test covering Get+Save interaction for newly secret fields

* Alerting: Re-encrypt existing contact points before get and patch

(cherry picked from commit b73c59547c)

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2025-03-07 17:23:45 -05:00
Robby Milo
96d15d9091 [v11.5] Remove relref shortcodes (#101707)
* manually replce all shared relrefs

* relref replace - grafana v11.5

* Merge branch 'master' into robbymilo/relref-replace-grafana-11.5

* manual fixes

* replace ref shortcodes

* Merge branch 'master' into robbymilo/relref-replace-grafana-11.5

* update readme

* update test

---------

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2025-03-06 17:48:00 +02:00
Matheus Macabu
cd63f38f47 [release-11.5.3] Chore: Bump dependencies to address security issues (#101627)
* Chore: Bump github.com/go-jose/go-jose/v3 to v3.0.4

* Chore: Bump github.com/ua-parser/uap-go to v0.0.0-20250213224047-9c035f085b90

* Chore: Bump golang.org/x/net to v0.36.0

* Chore: Use github.com/moby/moby version 27.4.1 instead of 26.0.0

* Chore: Bump github.com/openfga/openfga to v1.8.5
2025-03-06 10:12:17 +01:00
Matheus Macabu
29d35ec39c [release-11.5.3] Chore: Bump Go to 1.23.7 (#101581)
Chore: Bump Go to 1.23.7
2025-03-05 09:59:05 +01:00
Matheus Macabu
9db9662213 [release-11.5.3] Chore: Update golang.org/x/crypto and golang.org/x/oauth2 to address security issues (#101278)
Chore: Update golang.org/x/crypto and golang.org/x/ouath2 to address security issues (#101268)

- CVE-2025-22869 and Go issue https://go.dev/issue/71931.
- CVE-2025-22868 and Go issue https://go.dev/issue/71490.

(cherry picked from commit 3aedb9159e)
2025-02-26 08:42:00 +01:00
Jack Baldry
478ab85845 [release-11.5.3] Rename Explore Apps to App Drilldown (#101259)
Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
2025-02-25 04:03:36 +02:00
Kevin Minehart
e79330dc08 [release-11.5.3] CI: Remove unused release_publisher scripts (#101158)
* CI: Remove unused release_publisher scripts (#101019)

* Remove the unused `release_publisher` script.
* Remove the "whats new check" in Drone.
* Automatically set the What's New URL in releases based on the tagged version.

(cherry picked from commit 49e5f77dd1)

* rerun?
2025-02-24 18:57:34 +02:00
Matheus Macabu
61fbc0310f [release-11.5.3] Chore: Bump glog in pkg/codegen to v1.2.4 to fix vulnerability (#101141)
Chore: Bump glog in pkg/codegen to v1.2.4 to fix vulnerability (#101126)

Chore: Bump glog pkg/codegen to v1.2.4 to fix vulnerability
(cherry picked from commit 35b218fe10)
2025-02-21 16:09:43 +02:00
grafana-delivery-bot[bot]
6aee3a5c75 [release-11.5.3] IAM: fix grafana_com OAuth connector config overriding (#101070) 2025-02-20 17:44:09 +01:00
Matthew Jacobson
6700924913 [release-11.5.3] Alerting: Fix token-based Slack image upload to work with channel names (#101078)
Alerting: Fix token-based Slack image upload to work with channel names

Upgrades grafana/alerting to be46240 which includes the v11.5 fix.
2025-02-20 10:28:19 -05:00
github-actions[bot]
880e5fecb9 apply security patch: release-11.5.2/317-202502130459.patch
commit 4fee27d372e0e4f00a60ecef1d9640bd8165c1c8
Author: AgnesToulet <35176601+AgnesToulet@users.noreply.github.com>
Date:   Tue Feb 11 10:57:05 2025 +0100

    Dashboards: Prevent title longer than 5 000 characters

    (cherry picked from commit f9e0789210004b0bd7902255644ef348ae7b3aa8)
2025-02-18 20:54:59 +00:00
grafana-delivery-bot[bot]
0faf11835b [release-11.5.2] Metrics: Use correct gatherer in graphite bridge (#100628)
Metrics: Use correct gatherer in graphite bridge (#100624)

(cherry picked from commit 5a74a1a0f6)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2025-02-13 15:30:44 -05:00
grafana-delivery-bot[bot]
6c3e9e5976 [release-11.5.2] IAM: log error when malformed json arrays are found in SSO configs (#100649)
IAM: Log error when malformed json arrays are found in SSO configs (#99896)

(cherry picked from commit eeadb7e771)
2025-02-13 18:37:38 +01:00
grafana-delivery-bot[bot]
3881a173fe [release-11.5.2] AuthN: Refetch user on "ErrUserAlreadyExists" (#100582)
AuthN: Refetch user on "ErrUserAlreadyExists" (#100346)

* AuthN: Refetch user on "ErrUserAlreadyExists"

(cherry picked from commit 0b4c622df8)

Co-authored-by: Karl Persson <23356117+kalleep@users.noreply.github.com>
2025-02-13 12:03:29 +01:00
Moustafa Baiou
fb0d6be79e Alerting: Allow specifying uid for new rules added to groups (#99858)
When modifying rule groups the `uid` can be specified but only if the rule already existed in the DB. If the rule is new the update would be rejected.

This updates the RuleGroup provisioning apis to allow specifying the `uid` when creating/updating rule groups.

Additionally, the RuleGroupIdx was not being updated when rules were reordered in the group.

Context: https://github.com/grafana/terraform-provider-grafana/pull/1971#issuecomment-2599223897
Relates to: https://github.com/grafana/terraform-provider-grafana/issues/1928

Fixes: #98283
(cherry picked from commit 7dee4d1808)
2025-02-12 09:10:39 -05:00
Yuri Tseretyan
2728e5cf14 Alerting: Refactor integration tests (#99519)
---------

Signed-off-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
(cherry picked from commit af663dadc7)
2025-02-12 09:10:39 -05:00
grafana-delivery-bot[bot]
b11b012240 [release-11.5.2] CloudMigrations: save snapshot of alert rule groups (#100184)
CloudMigrations: save snapshot of alert rule groups (#100109)

(cherry picked from commit fde475e3d9)

Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
2025-02-07 10:50:52 +01:00
grafana-delivery-bot[bot]
d75d140554 [v11.5.x] Plugin Metrics: Eliminate data race in plugin metrics middleware (#100078)
Plugin Metrics: Eliminate data race in plugin metrics middleware (#99396)

fix: eliminate data race in plugin metrics middleware

A data race was detected when multiple goroutines accessed the `MetricsMiddleware`
simultaneously. The race occurred because a single `MetricsMiddleware` instance
was being shared across goroutines while its `BaseHandler` field was being
modified during middleware chain setup.

Fix by creating a new `MetricsMiddleware` instance for each middleware chain,
while safely sharing the thread-safe Prometheus metrics and plugin registry.
This maintains proper metrics collection while eliminating the mutable shared
state that caused the race condition.

Original error was detected here:

```
WARNING: DATA RACE
Read at 0x00c0039c0790 by goroutine 4486:
  github.com/grafana/grafana-plugin-sdk-go/backend.(*ErrorSourceMiddleware).CallResource()
      /Users/clord/src/grafana/irm-devstack/.devenv/state/go/pkg/mod/github.com/grafana/grafana-plugin-sdk-go@v0.261.0/backend/error_source_middleware.go:93 +0x40
  github.com/grafana/grafana-plugin-sdk-go/backend.BaseHandler.CallResource()
  ...

```

(cherry picked from commit e74cf72d99)

Co-authored-by: Christopher Lord <christopher.lord@grafana.com>
2025-02-04 20:08:52 +02:00
grafana-delivery-bot[bot]
5acb12be61 [v11.5.x] Alerting: Call RLock() before reading sendAlertsTo map (#99880)
Alerting: Call RLock() before reading sendAlertsTo map (#99812)

* Alerting: Call RLock() before reading sendAlertsTo map

* defer unlocking

* drive-tru fix for another lock

* less time holding the lock in SyncAndApplyConfigFromDatabase

(cherry picked from commit 39f212a965)

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2025-01-31 14:45:51 +01:00
Yuri Tseretyan
9c7139ee7a [v11.5.x] Alerting: k8s receivers api encrypt existing unencrypted secureFields on update (#99847)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-30 16:42:33 -07:00
grafana-delivery-bot[bot]
86fcf80315 [v11.5.x] Azure: Correctly set application insights resource values (#99599)
* Azure: Correctly set application insights resource values (#99214)

Correctly set resource values

(cherry picked from commit 30ee8b9813)

* Fix test

---------

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2025-01-28 18:57:47 +00:00
grafana-delivery-bot[bot]
fb0204c8df [v11.5.x] Azure: Improve resource request error handling (#99259)
Azure: Improve resource request error handling (#99017)

* Improve resource request error handling

- Correctly parse JSON responses
- Log erroneous failures in JSON marshalling/unmarshalling
- Correctly set response status code
- Do not attempt to use the response writer as it will be nil

* Minor change

* Improve type assertion handling

(cherry picked from commit f6194931f5)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2025-01-20 15:17:04 +02:00
Mariell Hoversholm
940d71250b Security: Update to Go 1.23.5 - Backport to v11.5.x (#99122)
* feat: update to Go 1.23.5

* chore: make drone

* chore: make update-workspace

* fix: 1.23.5, not 1.23.4

* fix: update in Makefile

* CI: Force re-build
2025-01-17 09:30:36 +01:00
Alexander Zobnin
cbb688e910 Zanzana: Remove usage from legacy access control (#98883)
* Zanzana: Remove usage from legacy access control

* remove unused

* remove zanzana client from services where it's not used

* remove unused metrics

* fix linter
2025-01-14 10:26:15 +01:00
Giuseppe Guerra
7480c9eb54 Plugins: Disable SRI checks for filesystem plugins (#98673)
* Plugins: Disable SRI checks for filesystem plugins

* Plugins: Disable SRI checks for filesystem plugins

* Update tests

* Lint

* Check for cdn enabled rather than just plugin class

* ops

* Update tests

* lint
2025-01-14 09:51:01 +01:00
Gabriel MABILLE
4c86de2678 Chore: Update authlib (#98870)
* Chore: Update authlib

* AccessChecker -> AccessClient
2025-01-14 09:42:17 +01:00
Ieva
9b34a56d7c AuthZ service: Take action sets into account when checking folder create permissions (#98751)
take action sets into account when checking folder create permissions
2025-01-14 08:33:42 +00:00
Mariell Hoversholm
05ea05d64e Chore: Bump Go to 1.23.4 (#98853)
* Chore: Bump Go to 1.23.4

This is done in preparation of updating the App SDK library we import, as it has bumped its Go version to 1.23.4 as well.

* Chore: make update-workspace
2025-01-14 09:28:44 +01:00
Matthew Jacobson
6883a4b294 Alerting: Regenerate swagger spec (#98914) 2025-01-14 01:23:45 +02:00
maicon
766d645d82 Filewalkwithme/unistore refactor folder service to hit folder apiserver (#98409)
Refactor folder service to use Unified Storage

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
2025-01-13 18:15:35 -03:00
Nathan Marrs
009d7f42b3 Feature Toggles: Add two test feature toggles to test potential AB test setup (#98844)
* add two dummy feature toggles to use for testing potential AB testing setup

* update betterer

* update auto generated files

* fix camelcase test case
2025-01-13 13:13:13 -08:00