Commit Graph

77 Commits

Author SHA1 Message Date
Todd Treece
c6663ce6be
Chore: Ensure go.work.sum is updated (#89996) 2024-07-03 12:49:03 -04:00
ismail simsek
c538d7ca6f
Chore: Update go.mod go.sum and go.work.sum files (#89992)
* Update go.mod go.sum and go.work.sum files

* set owners
2024-07-03 14:08:44 +02:00
Isabella Siu
3ac109e759
AWS: Update deprecated aws-sdk functions from env variable versions (#89643) 2024-06-26 11:56:39 -04:00
Karl Persson
eea7319a67
Zanzana: sqlite data store (#89486)
* Zanzana: Add sqlite3 store

* Zanzana: Initilize sqlite store with migrations
2024-06-25 09:52:33 +02:00
Marcus Andersson
04f39457cf
Chore: Remove sensitive information from presigned URLs prior to logging (#87035)
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2024-06-24 14:53:42 +02:00
Ryan McKinley
5e95c1bdf8
Storage: Move grpc helper from entity store to resource store (#89490) 2024-06-20 22:32:19 +03:00
Kevin Minehart
78e9226ad8
CI: Add bump-version action to the release PR workflow (#89491) 2024-06-20 13:15:09 -05:00
Ryan McKinley
6834038e91
Storage: Add new resource module and move some utilities (#89443) 2024-06-20 16:11:21 +03:00
ismail simsek
e5a50a7db8
InfluxDB: Fix sending range info on variable editor (#89347)
send range info in range field
2024-06-19 08:23:21 +02:00
Kristin Laemmert
50244ed4a1
Experimental Feature Toggle: databaseReadReplica (#89232)
This adds a version of the SQLStore that includes a ReadReplica. The primary DB can be accessed directly - from the caller's standpoint, there is no difference between the SQLStore and ReplStore unless they wish to explicitly call the ReadReplica() and use that for the DB sessions.

Currently only the stats service GetSystemStats and GetAdminStats are using the ReadReplica(); if it's misconfigured or if the databaseReadReplica feature flag is not turned on, it will fall back to the usual (SQLStore) behavior.

Testing requires a database and read replica - the replication should already be configured. I have been testing this locally with a docker mysql setup (https://medium.com/@vbabak/docker-mysql-master-slave-replication-setup-2ff553fceef2) and the following config:

[feature_toggles]
databaseReadReplica = true

[database]
type = mysql
name = grafana
user = grafana
password = password
host = 127.0.0.1:3306

[database_replica]
type = mysql
name = grafana
user = grafana
password = password
host = 127.0.0.1:3307
2024-06-18 11:07:15 -04:00
Karl Persson
606a74d0af
Zanzana: Initial work to run openFGA as embedded or standalone service (#89211)
* Zanana: Initial work to run zanana as ebeddedn or standalone

* Add addr settings for when remote client is used.

* sync dependencies

* Lock mysql driver version
---------

Co-authored-by: Dan Cech <dcech@grafana.com>
2024-06-18 10:04:18 +02:00
Kevin Minehart
a250706305
CI: Make pkg/build its own module, remove unused Grafana modules in go.mo… (#89243)
* Make pkg/build its own module, remove unused Grafana modules in go.mod/go.sum

* fix go.work format

* log errors on file close errors
2024-06-14 19:35:30 +03:00
Will Browne
74230937f4
Plugins: Update plugin SDK Go to 0.235.0 (#89153)
update plugin SDK go to 0.235.0
2024-06-13 15:14:39 +02:00
Gabriel MABILLE
afcb5a855c
AuthZ: embed an authorization server (#89018)
* AuthZ: embed an authorization server

* CODEOWNERS

* Remove swagger

* WIP

* Flatten structure and inject wireset

* sync mod files

* Rename authorization package

* Fix swagger gen

* CODEOWNERS

* Use itf instead of impl

---------

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2024-06-13 11:41:35 +02:00
Santiago
12d5251c12
Alerting: Alertmanager configuration sync loop (#88822)
* make the config sync happen on each call to ApplyConfig(), fix tests

* send autogen config

* add fake autogen function for tests

* update stale comments, tidy things up, make linter happy

* add auto-gen routes only if the feature toggle is enabled

* remove unnecessary fake autogen function

* throttle configuration syncs

* restore pkg/services/store/entity/sqlstash/sql_storage_server.go

* test sync loop in ApplyConfig, skip invalid autogen routes

* restore conf/defaults.ini

* restore conf/defaults.ini

* avoid skipping invalid auto-gen routes in SaveAndApplyConfig

* test that autogenFn is called and its errors are returned

* add debug message about the sync interval not having elapsed

* collapse two log lines into one
2024-06-12 10:13:34 +02:00
Kyle Cunningham
8aa1bbe27c
Table Panel: Enable text wrapping (#86895)
* Calculate row height

* Move things around

* Update getItemSize to use text bounding box

* Update types

* Cleanups and reminders

* Calculate line height

* Update line height calculation

* Remove debugging

* Add cell option editing

* Prettier

* Use field configured for text wrapping

* Add TODO

* Make sure column configuration is correct

* Update height heuristic and hover behavior

* Disable overflow on hover with text wrapping

* Update heuristic

* Clean things up

* Color background cell options

* Fix tests

* Prettier

* React deps

* Remove old hook dep

* Fix type errors

* Update label and description for editor

* Fix non-wrapped case

* Make sure color background works

* Prettier

* Address review comments

* fix prettier

* Add heuristic for field sizing

* Fix up logic

* Prettier

* Fix test

* Oh prettier 🙈

* Don't wrap text on non-string fields

* Add wrapping to color text cell

* Prettier

* Fix option not showing for auto cell type

* Move longest field guessing into function

* Clean things up

* Add tests

* Make sure text won't flake

* Prettier

* Remove spurious import

* Ignore any in this case

* Add alpha label

* Prettier

* Fix typecheck

* Fix crash when sampling when there are undefined records

* Update heuristic to take into account long strings

* Prettier

* Update scale factors

* Update field index selection

* Prettier

---------

Co-authored-by: jev forsberg <jev.forsberg@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2024-06-07 23:15:33 +07:00
ismail simsek
56bf666b0c
Chore: Bump promlib to v0.0.6 (#88876)
bump promlib v0.0.6
2024-06-06 22:13:01 +02:00
Isabella Siu
cd15e9732d
Cloudwatch: Use the metric map from grafana-aws-sdk (#88733) 2024-06-06 21:25:54 +03:00
ismail simsek
808cf75ff8
InfluxDB: Use json-iterator package for json operations (#88562)
* return error early

* enable gzip between grafana and influxdb

* use json-iterator package for json operations

* revert gzip changes

* update test

* go mod tidy
go work sync
2024-06-06 20:14:53 +03:00
Will Browne
7d8722b561
API server: Add shutdown func to interface (#88827)
add shutdown func to interface
2024-06-06 15:18:54 +01:00
Dave Henderson
ca1379bad3
chore: A few updates for the pkg/build/wire fork (#88813)
* chore: A few updates for the pkg/build/wire fork

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

* chore: run go work sync

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

---------

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
2024-06-06 16:09:27 +03:00
Marcus Efraimsson
2403665998
Chore: Remove legacydata package (#88790)
* Chore: Remove legacydata package

* remove unused dependency

* sdk v0.234.0
2024-06-05 22:31:06 +02:00
ismail simsek
08276bd8e7
InfluxDB: Revert calculation of maxPointsEnforced value (#88809)
revert calculation of maxPointsEnforced
2024-06-05 21:43:04 +02:00
Santiago
9f9928d41a
Alerting: Update grafana/alerting (#88363)
* Alerting: Update grafana/alerting

* make tests pass by implementing yaml unmarshallers and deleting fields with omitempty in their yaml tags

* go mod tidy

* fix tests by implementing not calling GettableApiAlertingConfig.UnmarshalYAML from GettableApiAlertingConfig.UnmarshalJSON

* cleanup, reduce diff

* fix more tests

* update grafana/alerting to latest commit, delete global section from configs in tests

* bring back YAML unmarshaller for GettableApiAlertingConfig

* update alerting package dependency to point to main

* skip test for sns notifier
2024-06-04 20:29:37 +02:00
Leonor Oliveira
ade96dbdbd
Introduce Comparator interface (#88016)
* Introduce Comparator interface

* Add compare implementation everywhere

* Add comment explaining what Compare should do

* Lint
2024-05-29 09:42:24 +02:00
Kyle Brandt
a738cb42d8
Prometheus: Update dependency to v0.52.0 (#87809)
* Prometheus: Update dependency to v0.52.0

* go work sync

* fix panics in tests

* go work sync

* prometheus v0.52.0

* handle errors

* Update pkg/services/ngalert/sender/sender_test.go

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>

* Update pkg/services/ngalert/sender/sender_test.go

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>

---------

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2024-05-28 15:22:20 +02:00
Misi
aac6e6dfd9
Auth: Update SAML lib to improve HTTP-Post binding (#88287)
* Update lib and docs for HTTP-Post binding

* Improve docs

* fix spelling

* Regenerate go.sum and go.work.sum
2024-05-27 14:56:52 +02:00
Giuseppe Guerra
2b54ce6c51
Chore: Bump google.golang.org/grpc to 1.64.0 (#88219)
* Bump google.golang.org/grpc to 1.64.0

* Address grpc.Dial deprecation notices

* go mod tidy

* Update go.work.sum

* go work sync
2024-05-27 12:44:39 +02:00
Jon Cole
67b90ceba5
Azure: Load custom clouds from ini file (#87667)
* Load custom clouds from config file

* Update docs

* Use the correct list of clouds, add test, fix error condition handling

* Remove on custom cloud from sample.ini and docs

* Remove unnecessary else block

* Use cached json instead of serializing with each request

* Update grafana-azure-sdk-go version to v2.0.4

* update configure-grafana entry for clouds_config

* fix lint errors

* fix lint errors

---------

Co-authored-by: Jeremy Angel (from Dev Box) <jeremyangel@microsoft.com>
2024-05-24 17:40:04 +01:00
Ryan McKinley
ffc2702552
Plugins: Support Admission validation hooks (#87718) 2024-05-24 18:45:16 +03:00
Scott Lepper
cac40795a5
sql expressions - logging (#88193)
* sql expressions - logging
2024-05-22 17:18:46 -04:00
Fayzal Ghantiwala
7a2fbad0c8
Alerting: Add options to configure TLS for HA using Redis (#87567)
* Add Alerting HA Redis Client TLS configs

* Add test to ping miniredis with mTLS

* Update .ini files and docs

* Add tests for unified alerting ha redis TLS settings

* Fix malformed go.sum

* Add modowner

* Fix lint error

* Update docs and use dstls config
2024-05-14 14:21:42 +01:00
Andres Martinez Gotor
ae152af119
Upgrade grafana-plugin-sdk-go to v0.230.0 (#87706) 2024-05-13 13:23:30 +02:00
Andrej Ocenas
d912703634
Chore: Updated go.work.sum file (#87622)
* Updated file

* fix quote character issue in workspace check

---------

Co-authored-by: Todd Treece <todd.treece@grafana.com>
2024-05-10 14:59:44 +02:00
lean.dev
b009536329
Caching: Implement mtls-enabled memcached integration (#84171)
* fix merge

* fix conflicts

* updating generated feature toggle code

* Fix go mod owner

* fix merge

* add dependency

* fix dependencies

* workspace sync

* go get

* work sync

* trying something

* fix

* add docs for tls config

* work sync

* adjust go mod

* try something

* move import to the correct file

---------

Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
2024-05-09 15:12:08 -04:00
Scott Lepper
4b38253b20
Sql Expressions: use display name for sql tables (#87530) 2024-05-08 16:43:55 -04:00
Marcus Efraimsson
41b29ff93c
Chore: Migrate to use buf for protobuf generation (#87407)
* Chore: Migrate to use buf for protobuf generation

* fix codeowners

* fixes after review

* docs/tooling for installing buf

* add back codeowners

* Update upgrading-dependencies.md

Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>

* sdk v0.229.0

---------

Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
2024-05-08 15:42:40 +02:00
Karl Persson
2d8570e85e
IDToken: Reuse claims from authlib (#87437)
* bump authlib version

* Reuse claims from authlib
2024-05-07 16:46:43 +02:00
Charandas
0c59baf62d
ext_jwt: switch to new authlib (#87157) 2024-05-03 12:59:37 -07:00
Isabella Siu
5aeaeb6e90
Cloudwatch: Update grafana-aws-sdk to fix sts endpoints (#87326)
Cloudwatch: update grafana-aws-sdk to fix sts endpoints
2024-05-03 11:43:28 -04:00
owensmallwood
40558899e4
Unified Storage: Adds health check service for entity server (#86471) 2024-05-01 11:36:44 -06:00
Marcus Efraimsson
2fc99375df
Chore: Upgrade otel dependencies (#86994)
* Chore: Upgrade otel dependencies

* sdk changes

* ignore deprecated go.opentelemetry.io/otel/exporters/jaeger for now

* use latest commit from sdk branch

* sdk v0.228.0
2024-04-30 15:12:45 +02:00
Andreas Christou
125ac18fa3
AzureMonitor: Enable session ID header for Log Analytics (#86320)
* Enable option

- Update sdk

* Sync go.work
2024-04-30 13:10:04 +01:00
Scott Lepper
7505af2886
Chore: Update go-duck dependency to v0.0.18 (#87073)
* Chore: Update go-duck dependency to v0.0.18
2024-04-29 14:46:19 -04:00
Marcus Efraimsson
aec4a23d21
Chore: Cleanup require sections in go.mod (#86952) 2024-04-26 09:40:23 +02:00
Marcus Efraimsson
fbcb9a3677
Chore: Upgrade/fix deps after thema removal (#86763)
* Chore: Upgrade/fix deps after thema removal

* github.com/deepmap/oapi-codegen v1.14.0

* github.com/deepmap/oapi-codegen v1.15.0

* github.com/deepmap/oapi-codegen v1.16.0

* fix for dep used in enterprise

* github.com/deepmap/oapi-codegen/v2 v2.0.0

* oapi-codegen/v2 v2.1.0, kin-openapi v0.122.0, sdk

* keep kin-openapi at v0.122.0 and allow SDK to use v0.124.0

* remove github.com/deepmap/oapi-codegen v1 dep

* fix owner

* add back github.com/deepmap/oapi-codegen v1 dep

* upgrade github.com/influxdata/influxdb-client-go/v2 to get rid of deepmap/oapi-codegen

* migrate to oapi-codegen/runtime

* sdk

* sdk v0.227.0
2024-04-25 20:52:09 +02:00
Marcus Efraimsson
ac152ca416
Chore: Upgrade grpc-ecosystem/go-grpc-middleware to v2 (#86724)
* Chore: Replace deprecated prometheus grpc middleware

* go mod tidy without enterprise

* with updated sdk branch

* sdk v0.226.0

* remove deprecated opentracing support for outgoing plugin requests

* migrate to github.com/grpc-ecosystem/go-grpc-middleware/v2

* fix
2024-04-25 17:25:48 +02:00
George Robinson
c049e5bbfc
Alerting: Update grafana/alerting to bb4f4f4 (#86827) 2024-04-25 10:47:01 +01:00
Charandas
d46b163810
Authn (jwt_auth): add tracing spans for validating newer use cases (#86812) 2024-04-24 02:40:00 -07:00
dependabot[bot]
2c5b684b85
Chore(deps): Bump google.golang.org/api from 0.162.0 to 0.176.0 (#86794)
* Chore(deps): Bump google.golang.org/api from 0.162.0 to 0.176.0

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.162.0 to 0.176.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.162.0...v0.176.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* but does it work across all workspaces

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kristin Laemmert <mildwonkey@users.noreply.github.com>
2024-04-23 12:32:16 -04:00