Commit Graph

870 Commits

Author SHA1 Message Date
Dimitris Sotirakis
a6bc262093
Chore: Remove grafana-delivery references (#82505)
* s/grafana-delivery/grafana-release-guild/g

* Remove -squad suffix
2024-02-15 10:00:30 +01:00
Todd Treece
8832971aff
Perf: Lazy initialization of charsetmaps in go-mssqldb (#79729) 2024-02-15 00:53:33 +02:00
George Robinson
556d531c8d
Alerting: Update grafana/alerting to 92f64f0 (#82373) 2024-02-13 15:37:33 +02:00
Gábor Farkas
d07aa25512
go: updated grafana-plugin-sdk-go version (#82346) 2024-02-13 11:51:19 +01:00
Ryan McKinley
0c6e409350
Chore: Update arrow and prometheus dependencies (#82215)
* update arrow and prometheus

* keep codeowner

* use compare

* use grafana-plugin-sdk-go v0.210.0

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2024-02-13 01:50:25 +01:00
Gábor Farkas
fcf2543fe3
updated grafana-plugin-sdk-go dependency (#82136)
update grafana-plugin-sdk-go dependency
2024-02-12 09:14:03 +01:00
George Robinson
90a26e18db
Alerting: Update Alertmanager to e82436c (#82145)
This commit updates Alertmanager to commit e82436c, which is based
on commit f69a508 from Prometheus Alertmanager.
2024-02-08 11:25:27 +00:00
ismail simsek
367790663c
Chore: Bump grafana-plugin-sdk-go version to v0.208.0 (#82123)
bump grafana-plugin-sdk-go version to v0.208.0
2024-02-07 22:08:20 +02:00
Dan Cech
156d7ae194
use in-process grpc client instead of wrapping server interface (#81926)
* use in-process grpc client instead of wrapping server interface

* comment out jwt token checks until we're ready to validate the token
2024-02-07 13:17:02 -05:00
ismail simsek
9a045e24e8
Chore: Bump grafana-plugin-sdk-go version to v0.207.0 (#82028)
* bump grafana-plugin-sdk-go version to v0.207.0

* update go.sum
2024-02-07 10:51:30 +01:00
Todd Treece
abaed01d7e
K8S/Shared Queries: Add Experimental PeakQ API (#80839)
First pass at a backend api built on top off app platform for shared-queries in explore and a query library with templating. Highly Experimental.

Under grafanaAPIServerWithExperimentalAPIs = true

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Kyle Brandt <kyle@grafana.com>
2024-02-06 11:22:41 -05:00
Gokhan
cf601fab09
Alerting: Enable sending notifications to a specific topic on Telegram (#79546)
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2024-02-06 17:19:22 +02:00
George Robinson
c8ccc4649c
Alerting: Support UTF-8 (#81512)
This pull request updates our fork of Alertmanager to commit 65bdab0, which is based on commit 5658f8c in Prometheus Alertmanager.

It applies the changes from grafana/alerting#155 which removes the overrides for validation of alerts, labels and silences that we had put in place to allow alerts and silences to work for non-Prometheus datasources. However, as this is now supported in Alertmanager with the UTF-8 work, we can use the new upstream functions and remove these overrides.

The compat package is a package in Alertmanager that takes care of backwards compatibility when parsing matchers, validating alerts, labels and silences. It has three modes: classic mode, UTF-8 strict mode, fallback mode. These modes are controlled via compat.InitFromFlags. Grafana initializes the compat package without any feature flags, which is the equivalent of fallback mode. Classic and UTF-8 strict mode are used in Mimir.

While Grafana Managed Alerts have no need for fallback mode, Grafana can still be used as an interface to manage the configurations of Mimir Alertmanagers and view configurations of Prometheus Alertmanager, and those installations might not have migrated or being running on older versions. Such installations behave as if in classic mode, and Grafana must be able to parse their configurations to interact with them for some period of time. As such, Grafana uses fallback mode until we are ready to drop support for outdated installations of Mimir and the Prometheus Alertmanager.
2024-02-06 08:33:47 +00:00
Isabella Siu
81da3ff753
CloudWatch: Remove dependencies on grafana/pkg/setting (#81208) 2024-02-05 13:59:32 -05:00
ismail simsek
2002a6c4fb
Chore: Bump grafana-azure-sdk-go to v1.12.0 and expose AzureAuthEnabled value in config (#81807)
* upgrade grafana-azure-sdk-go v1.12.0

* add AzureAuthEnabled to config
2024-02-05 13:36:33 +01:00
Ryan McKinley
651faff08a
Chore: go mod tidy after apiserver refactor (#81824) 2024-02-02 23:03:19 +02:00
Bruno
2332bfb007
Set DatasourceName and DatasourceType in proxy.Options (#80923)
* Set DatasourceName and DatasourceType in proxy.Options

* upgrade github.com/grafana/grafana-plugin-sdk-go to v0.206.0 and fix merge conflicts
2024-02-01 11:09:58 -03:00
ismail simsek
1966ce609c
Chore: Bump grafana-plugin-sdk-go version to v0.204.0 (#81603)
* bump grafana-plugin-sdk-go to v0.204.0

* update go.sum entry for v0.204.0
2024-01-31 00:50:42 +02:00
ismail simsek
f330d50b2a
Revert "Chore: Bump github.com/grafana/grafana-plugin-sdk-go to v0.203.0" (#81597) 2024-01-30 21:41:29 +01:00
Giuseppe Guerra
41cd0ab12a
Chore: Bump github.com/grafana/grafana-plugin-sdk-go to v0.203.0 (#81557) 2024-01-30 13:49:58 +01:00
ismail simsek
02acbd795d
Plugins: Update grafana-plugin-sdk-go to v0.202.0 (#81489)
* update the version

* Fixup (#81503)

fixup

---------

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2024-01-29 18:44:53 +01:00
Charandas
9167d67c05
K8s: update hack codegen script (#81216) 2024-01-25 12:01:09 -08:00
George Robinson
05d858635c
Alerting: Add metric for inhibition rules (#81119)
This commit adds a metric for the number of inhibition rules.
It matches the metric added upstream in #3681.
2024-01-23 19:43:17 +00:00
Timur Olzhabayev
4083d23f01
Chore: Bumping go to 1.21.6 (#80709)
* Bumping go to 1.25.6

* bumping sqlite to 1.14.19

* Bumping sqlite version
2024-01-23 14:32:26 +01:00
Pier
a8dec1916b
Security: Fix vulnerability GHSA-9763-4f94-gfch (#80952)
chore: upgrade cloudfare circl dependency

Signed-off-by: Pier <53210578+pie-r@users.noreply.github.com>
2024-01-22 15:13:31 +01:00
Charandas
87c3d3b029
K8s: add the CRD server to the grafana-aggregator component (pkg/cmd) (#80759) 2024-01-17 12:21:24 -08:00
Tolya Korniltsev
b5a1a3e106
Profiling: Import godeltaprof/http/pprof (#80509)
chore: import godeltaprof/http/pprof

This adds /debug/pprof/delta_{heap,mutex,block} endpoints to DefaultServeMux
and the profiling port.
2024-01-16 17:58:35 +07:00
Andres Martinez Gotor
55106c6ba8
Update grafana-plugin-sdk v0.199.0 (#80590) 2024-01-16 10:26:42 +01:00
dependabot[bot]
20db9ebcc2
Bump go.opentelemetry.io/collector/pdata from 1.0.0-rc8 to 1.0.1 (#80520)
Bumps [go.opentelemetry.io/collector/pdata](https://github.com/open-telemetry/opentelemetry-collector) from 1.0.0-rc8 to 1.0.1.
- [Release notes](https://github.com/open-telemetry/opentelemetry-collector/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG-API.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-collector/compare/pdata/v1.0.0-rc8...pdata/v1.0.1)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/collector/pdata
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-15 11:37:57 +01:00
Charandas
48612063dd
Grafana app platform: an aggregator cmd and package (#79948) 2024-01-08 22:33:42 +02:00
Timur Olzhabayev
6438523b41
Chore: Switching some go dependencie to the correct owner - partner-datasources squad (#77776)
* Switching dependencie to the correct owner

* switching storrage-blog-go back to backend platform

* reverting some of the mod assignements

* reverting some of the changes

* not sure how it got changed, but switching this one back
2024-01-08 14:32:46 +01:00
Alexander Weaver
4623b49947
Drop weaveworks/common dependency (#80090)
Drop weaveworks/common
2024-01-05 10:24:04 -06:00
Alexander Weaver
a03eca29eb
Upgrade grafana/dskit (#80049)
Upgrade dskit
2024-01-04 16:16:51 -06:00
Giuseppe Guerra
b1c7aa269b
Dependencies: Bump github.com/grafana/grafana-plugin-sdk-go from v0.197.0 to v0.198.0 (#79928)
* chore: Bump google.golang.org/grpc from 1.59.0 to 1.60.1

* Bump google.golang.org/protobuf to v1.32.0

* Fix make protobuf failing with latest protoc and protoc-gen-go

* Re-generate protobuf files

* Re-generate protobuf files

* Bump grafana-plugin-sdk-go

* go mod tidy
2024-01-03 13:36:44 +02:00
Santiago
c46da8ea9b
Alerting: Update alerting package and imports from cluster and clusterpb (#79786)
* Alerting: Update alerting package

* update to latest commit

* alias for imports
2023-12-21 12:34:48 +01:00
Timur Olzhabayev
5c56d792d6
Chore: Upgrading go crypto to v0.17.0 (#79678)
* Bump x/crypto to 0.17.0

* go mod tidy
2023-12-19 12:38:22 +01:00
Sofia Papagiannaki
d89a8a3a82
Nested Folders: Fix /api/folders pagination (#79447)
* Nested Folders: Fix /api/folders pagination

We used to check access to the root folders after fetching them from the DB with pagination.
This fix splits logic for fetching folders in:
- fetching subfolders
- fetching root folders
and refactors the query for the latter so that is filters by folders with permissions

* Add tests

* Update benchmarks
2023-12-15 19:34:08 +02:00
Todd Treece
8bcd40a186
Chore: Remove replace for kube-openapi (#79533) 2023-12-14 20:51:15 +02:00
Bruno
58678f5879
Plugins: Add option to disable TLS in the socks proxy (#79246)
* Plugins: add option to disable TLS in the socks proxy

* fix allow_insecure docs

* upgrade github.com/grafana/grafana-plugin-sdk-go from v0.196.0 to v0.197.0

* fix conflicts
2023-12-14 12:16:32 -03:00
Todd Treece
d492100adc
Chore: Bump k8s dependencies to v0.29.0 (#79492)
* Chore: Bump k8s dependencies to v0.29.0

* update the openapi fork

* use post process spec

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-12-14 10:00:48 -05:00
Andreas Christou
f3cdb44898
Plugins: Include Azure settings as a part of Grafana config sent in plugin requests (#79342)
* Add Azure settings and update tests

* Filter by plugin ID

* Add forward settings config variable

* Update line

* Add tests

* Update so that data sources are fully defined in config

* Update SDK and test

* Fix lint

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>

* Remove unnecessary if

---------

Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>
2023-12-14 11:48:22 +00:00
Timur Olzhabayev
46192d676d
Chore: Proposing a change of go-jose ownership (#79449)
changing go-jose ownership
2023-12-13 15:55:44 +01:00
Todd Treece
2f295dfec9
Chore: Bump k8s dependencies to v0.28.4 (#79331) 2023-12-12 00:53:24 +08:00
Aleksandar Petrov
1c53561521
Pyroscope: Improve label suggestions in query editor (#78861)
* Send sanitized selectors to the Pyroscope backend for LabelNames and LabelValues

* Clean LabelNames response to remove already used labels

* Improve performance after major changes

* Fix import order

* Further improve rendering performance

* Fix frontend tests

* Fix fake pyroscope client signature

* Bump pyroscope/api dependency to include start/end in LabelNames/LabelValues

* Fix issue with old queries running when using the run button

* Add generated file

* Make code more readable, add a few comments

* Format with prettier

* Fix error when assigning data

* Revert "Add generated file"

This reverts commit c4f33727b8.

* Remove leftover code

* Simplify query editor internal state objects

* Move label selector validation up, improve label filtering

* Simplify query editor state, switch to debounce to reduce rerenders

* Revert cosmetic change
2023-12-07 18:11:30 +01:00
Marcus Efraimsson
cdff30ac44
Upgrade sdk to v0.196.0 (#79021) 2023-12-07 13:33:53 +01:00
Ryan McKinley
deb8faf1e3
Storage: remove git backing for storage (#79181) 2023-12-07 00:04:13 +02:00
Dan Cech
c4c9bfaf2e
Storage: Unified Storage based on Entity API (#71977)
* first round of entityapi updates

- quote column names and clean up insert/update queries
- replace grn with guid
- streamline table structure

fixes

streamline entity history

move EntitySummary into proto

remove EntitySummary

add guid to json

fix tests

change DB_Uuid to DB_NVarchar

fix folder test

convert interface to any

more cleanup

start entity store under grafana-apiserver dskit target

CRUD working, kind of

rough cut of wiring entity api to kube-apiserver

fake grafana user in context

add key to entity

list working

revert unnecessary changes

move entity storage files to their own package, clean up

use accessor to read/write grafana annotations

implement separate Create and Update functions

* go mod tidy

* switch from Kind to resource

* basic grpc storage server

* basic support for grpc entity store

* don't connect to database unless it's needed, pass user identity over grpc

* support getting user from k8s context, fix some mysql issues

* assign owner to snowflake dependency

* switch from ulid to uuid for guids

* cleanup, rename Search to List

* remove entityListResult

* EntityAPI: remove extra user abstraction (#79033)

* remove extra user abstraction

* add test stub (but

* move grpc context setup into client wrapper, fix lint issue

* remove unused constants

* remove custom json stuff

* basic list filtering, add todo

* change target to storage-server, allow entityStore flag in prod mode

* fix issue with Update

* EntityAPI: make test work, need to resolve expected differences (#79123)

* make test work, need to resolve expected differences

* remove the fields not supported by legacy

* sanitize out the bits legacy does not support

* sanitize out the bits legacy does not support

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* update feature toggle generated files

* remove unused http headers

* update feature flag strategy

* devmode

* update readme

* spelling

* readme

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-12-06 15:21:21 -05:00
Marcus Efraimsson
00fa6c7caa
Chore: Upgrade sdk to v0.194.0 (#78961)
* Upgrade sdk to v0.194.0

* update replace for k8s.io/apiserver
2023-12-04 11:42:09 +01:00
Misi
437ae8e8c5
Auth: Refactor OAuth connectors' initialization (#77919)
* Refactor AzureAD to init itself

* Use mapstructure to convert data to OAuthInfo

* Update

* Align tests

* Remove unused functions

* Add owner to mapstructure

* Clean up, lint

* Refactor Okta init, Align tests

* Address review comments, fix name in newSocialBase

* Update newSocialBase first param

* Refactor GitLab init, align tests

* Update pkg/login/social/common.go

Co-authored-by: Karl Persson <kalle.persson@grafana.com>

* Use ini conversion to map

* Leftovers

* Refactor GitHub connector initialization, align tests

* Refactor Google connector init, align tests

* Refactor grafana_com connector, align tests

* Refactor generic_oauth connector init, align tests

* cleanup

* Remove util.go

* Add tests for custom field init

* Change OAuthInfo's Extra type

* Fix

* Replace interface{} with any

* clean up

---------

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2023-11-20 09:45:40 +01:00
Andres Martinez Gotor
fa2c044522
Chore: Update go.mod (#78340) 2023-11-17 16:42:17 +01:00
Andres Martinez Gotor
fcc2f01c7e
Chore: Update otel deps (#78069)
Co-authored-by: Giuseppe Guerra <giuseppe@guerra.in>
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
2023-11-14 14:14:15 +01:00
Ryan McKinley
55d61c93d2
K8s: Upgrade to v0.28.3 (#78033) 2023-11-13 06:53:24 -08:00
Oscar Kilhed
1253ae5dc4
Chore: Change ownership of the golang.org/x/net dependency (#77909)
* Change x/net ownership

* Update go.mod

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>

---------

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2023-11-09 12:35:41 +01:00
Will Browne
662bc286c2
Plugins: Bump go plugin sdk to 0.191.0 (#77773)
* bump

* bump plugin sdk
2023-11-07 11:52:31 +01:00
Serge Zaitsev
5458ea18e7
Chore: Use vendored xorm instead of a fork (#77388)
* use vendored xorm instead of a fork

* bring back mssql driver

* backport azuresql driver

* restore NoAutoTime
2023-11-06 16:09:49 +01:00
Andres Martinez Gotor
00a596b2e0
Chore: Add app URL to the plugin config (#77455) 2023-11-02 13:26:16 +01:00
Ryan McKinley
5d5f8dfc52
Chore: Upgrade Go to 1.21.3 (#77304) 2023-11-01 09:17:38 -07:00
Joey
c39e9a8f52
Tracing: Trace to profiles (#76670)
* Update Tempo devenv to include profiles

* Update devenv to scrape profiles from local services

* Cleanup devenv

* Fix issue with flame graph

* Add width prop to ProfileTypeCascader

* Add trace to profiles settings

* Add new spanSelector API

* Add spanSelector to query editor

* Update span link query

* Conditionally show span link

* Combine profile and spanProfile query types and run specific query type in backend based on spanSelector presence

* Update placeholder

* Create feature toggle

* Remove spanProfile query type

* Cleanup

* Use feeature toggle

* Update feature toggle

* Update devenv

* Update devenv

* Tests

* Tests

* Profiles for this span

* Styling

* Types

* Update type check

* Tidier funcs

* Add config links from dataframe

* Remove time shift

* Update tests

* Update range in test

* Simplify span link logic

* Update default keys

* Update pyro link

* Use const
2023-11-01 10:14:24 +00:00
George Robinson
65398dabf4
Alerting: Update Alertmanager to latest main (70c52bf) (#77485) 2023-11-01 09:59:15 +00:00
Todd Treece
798e224ce6
K8s: JSON file storage (#75759) 2023-10-27 16:39:27 -04:00
Yuri Tseretyan
48b55f39bf
Alerting: Add support for responders to Opsgenie integration (#77159)
* add support for responders in opsgenie UI config
* update export model

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2023-10-27 13:06:46 -04:00
Ryan McKinley
ba1575322b
K8s: Share legacy storage configs with etcd based configs (#77181) 2023-10-26 09:05:51 -07:00
dependabot[bot]
5ff550ae19
Bump google.golang.org/api from 0.126.0 to 0.148.0 (#77188)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.126.0 to 0.148.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.126.0...v0.148.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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-26 08:53:57 -04:00
Misi
75768cea19
Chore: Replace crewjam/saml with the latest grafana/saml lib (#77153)
Replace crewjam/saml with the latest grafana/saml
2023-10-26 09:44:15 +02:00
Todd Treece
949b3af1b2
K8s: Remove duplicate listener in production (#76583) 2023-10-23 21:42:10 +03:00
Marcus Efraimsson
2adfdb49c9
Update grafana-plugin-go-sdk to v0.187.0 (#76816) 2023-10-19 16:17:31 +02:00
Timur Olzhabayev
7456a0daa9
Switching saml to authnz squad (#76804)
Swiching saml to authnz
2023-10-19 14:54:32 +03:00
Marcus Efraimsson
42f5e42b54
Update grafana-plugin-go-sdk to v0.185.0 and otel to v1.19.0 (#76704) 2023-10-18 11:33:21 +02:00
Todd Treece
ec7ed11ea1
K8s: Logging improvements (#76646) 2023-10-17 10:44:23 -04:00
George Robinson
f9484fcf82
Alerting: Update grafana/alerting to a53b5db (#76679) 2023-10-17 12:55:39 +01:00
Will Browne
9d92818cae
Plugins: Update PDC pattern from latest plugin SDK changes (#76576)
* update with sdk

* do sql

* fix core plugins

* fix proxy settings

* bump SDK version

* tidy

* enable pdc for test

* add codeowners

* bump dep

* go mod tidy

* bump SDK
2023-10-16 16:40:04 +02:00
Dan Cech
91cf4f0c1c
Revert "Plugins: Update PDC pattern from latest plugin SDK changes" (#76565)
Revert "Plugins: Update PDC pattern from latest plugin SDK changes (#76036)"

This reverts commit 151f6d6216.
2023-10-13 12:35:16 -04:00
ismail simsek
2877723648
InfluxDB: Use apache/arrow v13 (#76548)
* Use apache/arrow v13

* remove apache/thrift

* go mod tidy with go1.21.1

* add metrics team as owner

---------

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2023-10-13 17:06:10 +02:00
Will Browne
151f6d6216
Plugins: Update PDC pattern from latest plugin SDK changes (#76036)
* update with sdk

* do sql

* fix core plugins

* fix proxy settings

* bump SDK version

* tidy

* enable pdc for test

* add codeowners
2023-10-13 14:42:15 +02:00
Leonard Gram
1573f253bf
dependency ownership: as-code -> alerting for testing package (#76455)
dependcy ownership: as-code -> alerting
2023-10-13 12:42:48 +02:00
Misi
b6dff85127
Chore: Update grafana/saml to the latest (#76363)
* Update go.mod

* add missing squad to dependency
2023-10-12 10:20:00 +02:00
Giuseppe Guerra
123f34c73d
Chore: Bump grafana-plugin-sdk-go to v0.180.0 (#76349)
Bump grafana-plugin-sdk-go to v0.180.0
2023-10-11 14:43:31 +02:00
Andrej Ocenas
2a6c16d969
Pyroscope: Change phlare/api module to pyroscope/api module (#76271) 2023-10-10 18:13:14 +02:00
Ryan McKinley
717a9dd616
K8s: Add example api service (#75911) 2023-10-06 21:55:22 +03:00
Yuri Tseretyan
9067ca7d29
Update alerting module to 939f55779e5f (#76078) 2023-10-06 10:42:54 -04:00
lean.dev
091f54bf20
Chore: Bump grafana-plugin-sdk-go to v0.179.0 (#75886) 2023-10-03 12:54:17 -03:00
Marcus Efraimsson
e4c1a7a141
Tracing: Standardize on otel tracing (#75528) 2023-10-03 14:54:20 +02:00
Agnès Toulet
23c61fa785
Chore: Replace gofpdf (#75805)
* Chore: Replace gofpdf

* Update main.go

* Add code owner

* update gofpdf
2023-10-02 15:32:35 +02:00
Sergey Kostrukov
3ee40d3a5a
Azure: Settings for Azure AD Workload Identity (#75283)
* Settings for Azure AD Workload Identity

* Update dependency on Grafana Azure SDK

* Documentation

* Fix JS code

* Cleanup Prometheus backend code

* Making prettier happy
2023-09-28 12:05:16 +01:00
Selene
011f099360
Chore: Use grafana/cue repository (#75426)
Use grafana/cue repository
2023-09-26 13:29:59 +03:00
Todd Treece
440f9a6ffb
K8s: Register apiserver as background service, and list real playlists (#75338)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-09-25 15:31:58 -07:00
Will Browne
7fca1bde54
Plugins: Set grafana config, plugin version and user agent on plugin requests (#75171)
* first pass

* fixup

* remove test line

* fix tests

* use new fields

* fix imports + formatting

* fix tests

* rollback changes

* undo whitespace

* apply pr feedback
2023-09-21 11:33:31 +02:00
George Robinson
d7ed1e9379
Update Alertmanger to latest main (3513be6) (#75009)
* Update Alertmanager to latest main (3513be6)

* Fix validate-modfile
2023-09-19 10:16:34 +01:00
Georges Chaudy
d2707e85af
Chore: Update grafana-plugin-sdk-go to v0.176.0 (#74813)
Update grafana-plugin-sdk-go to v0.176.0
2023-09-18 14:50:49 +03:00
Todd Treece
9770b870e3
Chore: Update centrifuge to v0.30.2 (#74855) 2023-09-14 08:03:41 -04:00
Nutmos
ad9f0b9e4e
Alerting: Add message options for Telegram contact point (#74635)
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2023-09-12 10:45:57 -04:00
Andres Martinez Gotor
3f3db49c4c
Chore: Update github.com/ProtonMail/go-crypto (#74736) 2023-09-12 16:35:35 +02:00
Yuri Tseretyan
dce492642a
Alerting: Export of alert rules in HCL format (#73166)
* import hashicopr/hcl/v2
* add hcl package and export to HCL
* annotate export structs
---------

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2023-09-11 11:48:23 -04:00
Will Browne
8d04f1daea
Chore: Bump grafana azure sdk to latest (1.8.1) (#74529)
bump grafana azure sdk to latest
2023-09-07 16:55:23 +02:00
Oscar Kilhed
579709c7a6
MSSQL: Add support for MI authentication to MSSQL (#73597)
* Add support for MI authentication to MSSQL

This adds support for managed identity authentication for MSSQL managed
instances running in Azure.

Co-authored-by: baldm0mma <jev.forsberg@grafana.com>
2023-09-06 18:27:19 +02:00
George Robinson
439270f6cb
Rename Google Hangouts to Google Chat (#74162)
* Rename Google Hangouts to Google Chat

* Fix prettier
2023-08-31 16:09:22 +03:00
Hugo Kiyodi Oshiro
8deea81b56
Chore: Update grafana-plugin-sdk-go version (#74039) 2023-08-31 14:35:09 +02:00
George Robinson
972da629ab
Update Alertmanager to latest main (6af7ccb) (#73827) 2023-08-25 15:08:09 +02:00
George Robinson
9f827a8278
Update grafana/alerting to 0025eb4 (#73808) 2023-08-25 15:20:17 +03:00
George Robinson
bbef000202
Alerting: Add contact point for Grafana OnCall (#73733)
Add contact point for Grafana OnCall
2023-08-24 10:45:12 +02:00
Ieva
d1218db023
Auth: Make sure that SAML responses with default namespaces are parsed correctly (#73701)
bump SAML library version
2023-08-23 19:31:22 +03:00
Sarah Zinger
bab9186370
Cloudwatch: Upgrade aws sdk (#73416)
Upgrade aws sdk
2023-08-18 09:05:58 -04:00
Nick Hudson
d7574a9a74
PostgreSQL: bump lib/pq to latest version (#72416)
* bump lib/pq to latest version
2023-08-15 13:04:42 -04:00
ismail simsek
1ac9e7eaab
InfluxDB: Fix handling flux response with no time and value column (#72833)
* Upgrade the influxdb-client-go version

* Handle flux response with no time and value column
2023-08-08 15:00:52 +02:00
Giuseppe Guerra
ca8e9d4aab
Chore: Bump github.com/grafana/grafana-plugin-sdk-go to v0.172.0 (#72989)
* Bump github.com/grafana/grafana-plugin-sdk-go

* go mod tidy

* go mod: added missing owners
2023-08-08 09:44:04 +02:00
Sarah Zinger
deeb1d85f8
Config: making [aws][external_id] part of env (#72062)
* Config: making [aws][external_id] part of env

* Fix go.sum

* Add a test
2023-08-04 16:06:01 -04:00
Kristin Laemmert
2569081165
chore: minor refactoring in the grafana server cli command (#72847)
This is preparative work for extending the grafana server cli command to target individual dskit modules that seemed worth breaking into this smaller PR. This moves the CLI flags and various reusable chunks of code into variables and methods.
2023-08-04 08:03:47 -04:00
ismail simsek
77e7ae2a1b
InfluxDB: SQL Support (#72167)
* Add influxdbSqlSupport feature toggle

* Add SQL option to the config page

* Add SQL backend

* Add metadata support in config page

* Implement unified querying

* Fix healthcheck query

* fsql tests

* secure grpc by default

* code cleanup

* Query handing for sql mode

* Implement a placeholder sql editor

* Fix query language dropdown

* go mod updates

* make lint-go

* more make lint-go

* remove unused runQuery

* switch statements with default case

* linting again
2023-08-02 18:27:43 +02:00
Andres Martinez Gotor
07365f2a73
Chore: Remove unnecessary go.mod replace (#72346) 2023-07-26 14:58:09 +02:00
Isabella Siu
56913fbd95
Redshift: Support caching async aws queries (#71682)
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
2023-07-21 11:34:07 -04:00
George Robinson
892a0d2e5e
Update logrus to v1.9.3 (#71571) 2023-07-21 09:37:20 +02:00
Steve Simpson
2d5300ce3a
gRPC Server: Instrument requests made to the server. (#71914)
* gRPC Server: Instrument requests made to the server.

Expose metrics from the gRPC server in order to monitor for failed responses
and response latency. Uses code from the already vendored weaveworks/common.

* Review comments.
2023-07-19 16:01:54 +02:00
Stephanie Hingtgen
4ece133fce
Secure socks proxy: use Grafana Plugin SDK (#71616) 2023-07-18 15:23:02 -06:00
Charandas
614f1af190
Tempo: remove deprecated model package usage (remove replace) (#71687)
* Tempo: remove deprecated model package usage (remove replace)

* fix root test
2023-07-18 19:30:29 +03:00
Andres Martinez Gotor
24eef7a3d2
Chore: Use SDK logger for test data source (#71579) 2023-07-17 16:34:08 +02:00
Will Browne
a8577c21ba
Plugins: Migrate PluginStore mock to pre-existing fakes package (#71664)
* migrate to existing fakes package

* fix imports
2023-07-17 10:21:44 +00:00
Todd Treece
52121b7165
Chore: Add grafana-apiserver (#70721)
* add grafana-apiserver
* remove watchset & move provisioning and http server to background
services
* remove scheme
* otel fixes (#70874)
* remove module ProvideRegistry test
* use certgenerator from apiserver package
* Control collector/pdata from going to v1.0.0-rc8 (as Tempo 1.5.1 would have it)
2023-07-14 12:22:10 -07:00
Andre Pereira
c1709c9301
Tempo: TraceQL query response streaming (#69212)
* Refactor Tempo datasource backend to support multiple queryData types.
Added traceId query type that is set when performing the request but doesn't map to a tab.

* WIP data is reaching the frontend

* WIP

* Use channels and goroutines

* Some fixes

* Simplify backend code.
Return traces, metrics, state and error in a dataframe.
Shared state type between FE and BE.
Use getStream() instead of getQueryData()

* Handle errors in frontend

* Update Tempo and use same URL for RPC and HTTP

* Cleanup backend code

* Merge main

* Create grpc client only with host and authenticate

* Create grpc client only with host and authenticate

* Cleanup

* Add streaming to TraceQL Search tab

* Fix merge conflicts

* Added tests for processStream

* make gen-cue

* make gen-cue

* goimports

* lint

* Cleanup go.mod

* Comments

* Addressing PR comments

* Fix streaming for tracel search tab

* Added streaming kill switch as the disableTraceQLStreaming feature toggle

* Small comment

* Fix conflicts

* Correctly capture and send all errors as a DF to client

* Fix infinite error loop

* Fix merge conflicts

* Fix test

* Update deprecated import

* Fix feature toggles gen

* Fix merge conflicts
2023-07-14 15:10:46 +01:00
Kat Yang
e36a9a7b9d
new go mod (#71378)
* new go mod

* fix

* remove golang.org/x/mod from go.sum

* restore go.sum for x/mod

* bring back x/mod into go.mod as it is used by build pkg

* Assign oauth2 to authnz

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Assign go-kit log to backend platform

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Assign kindsys to as-code

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update go.mod

Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>

* Update go.mod

Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>

* Update go.mod

Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>

* implement sofia's suggestions, change ownership to BEP for some imports

* Update go.mod

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update go.mod

Co-authored-by: sam boyer <sdboyer@grafana.com>

* Update go.mod

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* assign grpc to plugins platform

---------

Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
Co-authored-by: sam boyer <sdboyer@grafana.com>
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
2023-07-13 13:52:37 -04:00
Kyle Brandt
6493e92932
Chore: update dataplane/examples lib (#71591)
Includes fix that should resolve tests using this library failing on windows
2023-07-13 18:56:59 +03:00
Selene
e9e2d9ff83
Core: Update thema, cuetsy and cue fork (#71527)
* Update cue fork

* Update dashboard schema

* Fix lint
2023-07-13 17:29:38 +03:00
Orgad Shaneh
45ff62af78
Chore: Update crewjam/saml (#71122)
* Chore: Update crewjam/saml to match replaced version for vulnerability scanners

* go mod tidy
2023-07-07 17:59:22 +02:00
Will Browne
a9b9b96c61
Plugins: Update backend plugin debugging instructions (#70239)
* Update development-with-local-grafana.md

Reflect latest changes to backend plugin debugging

* bump SDK

* fix build cmd
2023-06-27 10:08:13 +02:00
George Robinson
7edbe72483
Alerting: Support concurrent queries for saving alert instances (#70525)
This commit adds support for concurrent queries when saving alert
instances to the database. This is an experimental feature in
response to some customers experiencing delays between rule evaluation
and sending alerts to Alertmanager, resulting in flapping. It is
disabled by default.
2023-06-23 11:36:07 +01:00
Bryan Boreham
c45ff94806
Tracing: supply Grafana build version (#69733)
* tracing: supply Grafana build version

Not etcd client version.

* go mod tidy
2023-06-22 11:55:30 +03:00
Santiago
ff9eff49bd
Alerting: Bump grafana/alerting and refactor the ImageStore/Provider to provide image URL/bytes (#70182)
* implement alerting.images.Provider interface in our ImageStore

* add URLExists() method to fakeConfigStore

* make linter happy

* update integration tests
2023-06-21 20:53:30 -03:00
SatVeer Singh
1bfa3a0f1e
Chore: Replace go-multierror with errors package (#66432)
* code refactor and type assertions added to tests

* no-lint rule added for specific line
2023-06-19 12:29:45 +03:00
Tania
0316350d16
Codegen: Generate any instead of interface{} (#70201)
* Chore: Update thema to latest

* Regenerate
2023-06-16 10:54:56 +02:00
Agnès Toulet
2554c482ea
Kinds: publish kinds to kind registry (#67515)
* Start local schema registry

* Try to use latest version

* Revert "Try to use latest version"

This reverts commit 682385c0e4.

* update schema registry jenny to validate new lineages

* save kind instead of lineage

* handle plugins

* get published schemas from GH + fix plugins

* handle kind not yet published

* Add script to use in workflow + handle maturity

* first pass on publish-kinds GH workflow

* fix script path

* remove unused script

* use make gen-cue instead of script

* trigger publish-kinds on every commit (for test)

* temporary update to use specific thema commit

* wrapping errors

* remove GH token & refactor for rate limit

* Update publish-kinds.yml

* Update publish-kinds.yml

* revert go.mod and go.sum updates

* use Thema specific commit

* Kind registry v2

* fix script path

* fix second script path

* update go.mod

* update schema registry source

* test checks

* add GITHUB_TOKEN

* revert test checks

* actually write next files when publishing

* Add kind set arg

* Add comments

* clean up workflows

* update Thema

* Update .betterer.results

* few fixes after lineage flattening

* Update publish-kinds-next.yml

* add codeowners for new files

* update thema

* apply review feedback

* update go version in workflows

* clean up workflows

* Add step to generate token and test

* Update publish-kinds-next.yml

* fix script

* try with the app name

* Update publish-kinds-next.yml

* clean up and update release workflow

* add comment

* publish kinds only on cue updates
2023-06-13 14:01:29 +02:00
Alexander Weaver
0ed5d3bdf2
Revert "Alerting: Refactor the ImageStore/Provider to provide image URL/bytes" (#69265)
Revert "Alerting: Refactor the ImageStore/Provider to provide image URL/bytes (#67693)"

This reverts commit 72a187b0be.
2023-05-30 11:33:33 -05:00
Santiago
72a187b0be
Alerting: Refactor the ImageStore/Provider to provide image URL/bytes (#67693)
* (WIP) Refactor the ImageStore interface to work with our latest alerting repository

* update alerting package

* refactor, new URLExists method in ImageProvider

* tests for the new methods

* fix linter warnings

* use alertingImages as an alias for grafana/alerting/images

* logs about image uris and not found images

* nerf image not found logs

* extract duplicated code to getImageFromURI() method

* refactor getImageFromURI()

* add index on url

* add comment about migration log

* sync generated files
2023-05-30 11:25:55 -03:00
sam boyer
09895c26b6
Chore: Hacky first pass on generating composable kinds within grafana/schema (#64723)
* Super hacky first pass on gen types

* First sketchy pass at generated compo kinds in TS, grok-style

* Merge fix

* Create jenny for MajorsOrX for plugins

* Re-generate files with imports

* Delete invalid generated file

* Fix cue

* Update go.mod

* Update schemas

* Fix go-imports

* Regenerate cue files

---------

Co-authored-by: spinillos <selenepinillos@gmail.com>
2023-05-30 05:56:18 -07:00
Selene
bd622a5381
Chore: Unify references for dataquery (#68963)
* Unify references for dataquery

* Fix ResultFormat in azure types

* Update azure-log with new schema

* Fix cloudwatch query

* Update thema

* Fix test

* More fixes

* More fixes

* Fix lint
2023-05-26 10:16:01 +02:00
Gabriel MABILLE
edf1775d49
AuthN: Embed an OAuth2 server for external service authentication (#68086)
* Moving POC files from #64283 to a new branch

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* Adding missing permission definition

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* Force the service instantiation while client isn't merged

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* Merge conf with main

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* Leave go-sqlite3 version unchanged

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* tidy

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* User SearchUserPermissions instead of SearchUsersPermissions

* Replace DummyKeyService with signingkeys.Service

* Use user🆔<id> as subject

* Fix introspection endpoint issue

* Add X-Grafana-Org-Id to get_resources.bash script

* Regenerate toggles_gen.go
* Fix basic.go

* Add GetExternalService tests

* Add GetPublicKeyScopes tests

* Add GetScopesOnUser tests

* Add GetScopes tests

* Add ParsePublicKeyPem tests

* Add database test for GetByName

* re-add comments

* client tests added

* Add GetExternalServicePublicKey tests

* Add other test case to GetExternalServicePublicKey

* client_credentials grant test

* Add test to jwtbearer grant

* Test Comments

* Add handleKeyOptions tests

* Add RSA key generation test

* Add ECDSA by default to EmbeddedSigningKeysService

* Clean up org id scope and audiences

* Add audiences to the DB

* Fix check on Audience

* Fix double import

* Add AC Store mock and align oauthserver tests

* Fix test after rebase

* Adding missing store function to mock

* Fix double import

* Add CODEOWNER

* Fix some linting errors

* errors don't need type assertion

* Typo codeowners

* use mockery for oauthserver store

* Add feature toggle check

* Fix db tests to handle the feature flag

* Adding call to DeleteExternalServiceRole

* Fix flaky test

* Re-organize routes comments and plan futur work

* Add client_id check to Extended JWT client

* Clean up

* Fix

* Remove background service registry instantiation of the OAuth server

* Comment cleanup

* Remove unused client function

* Update go.mod to use the latest ory/fosite commit

* Remove oauth2_server related configs from defaults.ini

* Add audiences to DTO

* Fix flaky test

* Remove registration endpoint and demo scripts. Document code

* Rename packages

* Remove the OAuthService vs OAuthServer confusion

* fix incorrect import ext_jwt_test

* Comments and order

* Comment basic auth

* Remove unecessary todo

* Clean api

* Moving ParsePublicKeyPem to utils

* re ordering functions in service.go

* Fix comment

* comment on the redirect uri

* Add RBAC actions, not only scopes

* Fix tests

* re-import featuremgmt in migrations

* Fix wire

* Fix scopes in test

* Fix flaky test

* Remove todo, the intersection should always return the minimal set

* Remove unecessary check from intersection code

* Allow env overrides on settings

* remove the term app name

* Remove app keyword for client instead and use Name instead of ExternalServiceName

* LogID remove ExternalService ref

* Use Name instead of ExternalServiceName

* Imports order

* Inline

* Using ExternalService and ExternalServiceDTO

* Remove xorm tags

* comment

* Rename client files

* client -> external service

* comments

* Move test to correct package

* slimmer test

* cachedUser -> cachedExternalService

* Fix aggregate store test

* PluginAuthSession -> AuthSession

* Revert the nil cehcks

* Remove unecessary extra

* Removing custom session

* fix typo in test

* Use constants for tests

* Simplify HandleToken tests

* Refactor the HandleTokenRequest test

* test message

* Review test

* Prevent flacky test on client as well

* go imports

* Revert changes from 526e48ad45

* AuthN: Change the External Service registration form (#68649)

* AuthN: change the External Service registration form

* Gen default permissions

* Change demo script registration form

* Remove unecessary comment

* Nit.

* Reduce cyclomatic complexity

* Remove demo_scripts

* Handle case with no service account

* Comments

* Group key gen

* Nit.

* Check the SaveExternalService test

* Rename cachedUser to cachedClient in test

* One more test case to database test

* Comments

* Remove last org scope

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* Update pkg/services/oauthserver/utils/utils_test.go

* Update pkg/services/sqlstore/migrations/oauthserver/migrations.go

Remove comment

* Update pkg/setting/setting.go

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

---------

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
2023-05-25 15:38:30 +02:00
Ryan McKinley
c66d5721f7
Kinds: Use apimachinery ObjectMeta for metadata (#68668) 2023-05-24 09:13:44 -07:00
Will Browne
ae373c662c
Plugins: Refactor env vars to dedicated service (#68960)
* add env vars service

* fix tests

* fix more tests
2023-05-24 14:02:14 +02:00
sam boyer
323cbe1997
kindsys: Adapt to new flattened lineage syntax in Thema (#68034)
* Update all core kinds to flattened lineages

* Regen Go types, without any

* Regen Go types, s/interface{}/any/

* Update generated core typescript

* Update generate docs

* Fix defaults gen in veneer index jenny

* Flatten plugindef lineage

* Convert all plugin kinds to flattened form

* Switch back to interface{} for now

* Switch to fs.Sub in plugin DeclParser

* Mostly undesirable codegen changes, to be fixed

* Update mod and sum

* Update pfs tests to flattened lineages

* Update thema to latest, regen docs
2023-05-24 10:47:25 +02:00
Will Browne
286b9e08e9
Plugins: Bump Plugin SDK version and address instance management breaking changes (#68900)
* bump sdk and propagate ctx

* fix tests
2023-05-24 10:19:34 +02:00
Andres Martinez Gotor
b7ca2d89b1
Chore: Update ProtonMail/go-crypto (#68641) 2023-05-18 09:52:31 +02:00
sam boyer
33fd83f7e3
kindsys: Adapt to new PanelCfg schema interface (#65297)
* kindsys: Adapt to new PanelCfg schema interface

* building locally

* Remove Panel prefix in cue files

* Regenerate

* Update imports

* fixup! Merge branch 'remove-panel-prefix' into sdboyer/redundant-panelcfg-prefixes

* Fix formatting

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Tania B <yalyna.ts@gmail.com>
2023-05-15 23:07:54 -04:00
Sergey Kostrukov
eafba8fa69
Azure: Configuration for user identity authentication in datasources (Experimental) (#50277)
* Configuration for user identity authentication

* Use token endpoint form Azure AD settings

* Documentation update

* Update Grafana Azure SDK

* Fix secret override

* Fix lint

* Fix doc wording
2023-05-15 18:00:54 +01:00
dependabot[bot]
4df3dc7703
Chore: Bump github.com/go-sql-driver/mysql from 1.6.0 to 1.7.1 (#67584)
Bump github.com/go-sql-driver/mysql from 1.6.0 to 1.7.1

Bumps [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql) from 1.6.0 to 1.7.1.
- [Release notes](https://github.com/go-sql-driver/mysql/releases)
- [Changelog](https://github.com/go-sql-driver/mysql/blob/master/CHANGELOG.md)
- [Commits](https://github.com/go-sql-driver/mysql/compare/v1.6.0...v1.7.1)

---
updated-dependencies:
- dependency-name: github.com/go-sql-driver/mysql
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-10 15:16:06 +03:00
Emil Tullstedt
23a9963507
Chore: Upgrade Prometheus to 2.43.0 (#67853)
- github.com/prometheus/prometheus => 2.43.0 (aka 0.43.0)
- github.com/prometheus/client_golang => 1.15.1
2023-05-10 14:09:49 +02:00
Emil Tullstedt
b0e681c339
Chore: Update target in go.mod to 1.20 and golangci-lint to v1.52.2 (#67102) 2023-05-10 13:47:35 +02:00
Selene
d1229b532d
Chore: Delete codegen dead code (#68072)
* Delete codegen dead code

* Use codejen

* Fix lint

* Use fs verify
2023-05-09 19:13:45 -04:00
Jean-Philippe Quéméner
8bb62a8316
Alerting: Add option for memberlist label (#67982) 2023-05-09 10:32:23 +02:00
Isabella Siu
c0bb404981
CloudWatch: Use grafana-aws-sdk v0.15.0 (#67876)
Cloudwatch: Update grafana-aws-sdk
2023-05-05 10:41:40 -04:00
Domas
15d4169813
Frontend logging: Remove Sentry javascript agent support (#67493)
* remove Sentry

* fix sourcemap resolve
2023-05-02 12:10:56 +03:00
Matthew Jacobson
91471ac7ae
Alerting: Template Testing API (#67450) 2023-04-28 15:56:59 +01:00
Giuseppe Guerra
c4716918f2
Plugins: Bump grafana-plugin-sdk to v0.160.0 (#67488) 2023-04-28 14:03:05 +02:00
Giuseppe Guerra
8845b4cc3b
Plugins: Bump plugin-related backend dependencies (#67373)
Bump github.com/hashicorp/go-plugin to v1.4.9
2023-04-28 11:32:45 +02:00
George Robinson
d3bfaf549f
Alerting: Update grafana/alerting to 4f09f51 (#67329) 2023-04-27 23:45:34 +03:00
Ryan McKinley
ca1f79b9ba
Kindsys: Target k8s style resource definitions (#67008)
Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-04-27 23:32:38 +03:00
Zoltán Bedi
5c32925f9f
PostgreSQL: Fix tls certificate issue by downgrading lib/pq (#67372)
* PostgreSQL: Downgrade lib/pq

* Add comment
2023-04-27 15:26:19 +02:00
Serge Zaitsev
6d8f9c5bf4
Chore: Remove opentracing and use opentelemetry instead (#67200)
* remove opentracing and use otel instead

* add various samplers for jaeger

* remove useless test that is covered in otel now

* we do not need a struct there

* remove old tests

* restore tests that parse various configurations

* check errors in tests

* Update pkg/infra/tracing/tracing_test.go

fix typo

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* add test for both legacy and new config formats

* use named constants

---------

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2023-04-27 15:04:43 +02:00
Misi
e17737ba87 Chore: Update SAML lib (#824)
Update saml lib
2023-04-27 14:40:44 +03:00
dsotirakis
6e950ca62a Geomap: Sanitize the attribution string (#745)
* SAML: Update grafana/saml library (#691)

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

* SVG: Add dompurify preprocessor step (#698)

* add sanitized SVG component

* add sanitize

* Fix frontend build

* Remove unnecessary yarn.lock changes

* Fix formatting

* Re-add yarn.lock message as I guess it is needed

---------

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
Co-authored-by: jguer <joao.guerreiro@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
2023-04-27 14:40:44 +03:00
Dmitry Filimonov
69a14b9a5e
Phlare: ability to set maxNodes parameter (#67017) 2023-04-27 10:50:11 +02:00
George Robinson
b71ef9b667
Alerting: Update grafana/alerting to fix #67177 (#67324) 2023-04-26 20:51:55 +01:00
Emil Tullstedt
f48ef6ea50
Chore: Upgrade github.com/docker/docker dependency (#67098) 2023-04-26 15:02:01 +02:00
Yuri Tseretyan
a8b4a4bb45
Alerting: Update alerting module to 20230418161049-5f374e58cb32 + refactoring (#66622)
* update to alerting 20230418161049-5f374e58cb32
* rename renamed structs in https://github.com/grafana/alerting/pull/73
* update ValidateContactPoint to use BuildReceiverConfiguration
* update logger factory according to changes
* rewrite integration builder
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2023-04-25 13:39:46 -04:00
Selene
0adacd1dd3
Chore: Update schema libraries to their latest versions and fixes (#66884)
Update thema, cuelang and necessary dependencies
2023-04-20 11:13:00 +03:00
Jean-Philippe Quéméner
bc11a484ed
Alerting: Add support for running HA using Redis (#65267)
Co-authored-by: Steve Simpson <steve.simpson@grafana.com>
2023-04-19 17:05:26 +02:00
Alexander Emelin
842ce14429
Live: Update Centrifuge to the latest version (#66637) 2023-04-18 21:47:15 -07:00
Selene
9665b3afe7
Chore: Update Cuetsy to v0.1.8 version (#66456)
* Update cuetsy version

* Fix defaults

* Update cuetsy

* Update cuelang version in bingo

* Remove TODO comments
2023-04-14 16:45:54 +02:00
Kyle Brandt
e78be44e1a
SSE: Dataplane Compliance (#65927)
Takes a specific code path for data that identifies itself as dataplane instead of "guessing" what the data is.

The data must identify itself by being in the dataplane by having both the following frame metadata properties:

- TypeVersion property that is greater than 0.0
- 'Type' property

The flag is disableSSEDataplane and disables this functionality and uses the old code for all queries regardless.

See https://github.com/grafana/grafana-plugin-sdk-go/blob/main/data/contract_docs/contract.md for dataplane details.
2023-04-12 12:24:34 -04:00
Stephanie Hingtgen
536fad5b61
Plugins: add env variables needed for the secure socks proxy in the plugins sdk (#65878) 2023-04-07 08:20:25 -06:00
Kyle Brandt
6c6427e63f
Chore: Use latest go-sdk (v0.158.0) (#66054)
SDK release notes:
* Logs contract: ignore remaining fields by @gabor in #659
* Logs contract: more robust field finding, explicit approach by @gabor in #660
* Tracing: Support multiple OTel propagators by @xnyo in #663
* Tracing: Add more details to HTTP Outgoing Request by @xnyo in #664
* Data: Encode Nanosecond into JSON by @kylebrandt in #647
* Data: cmp tests using FrameTestCompareOptions() will no longer ignore time differences beyond millisecond resolution
2023-04-05 21:00:31 +03:00
Stephanie Hingtgen
211beae736
MSSQL: Update forked go-mssqldb dependency (#65658) 2023-03-31 10:07:37 -06:00
Steve Simpson
04336d53a9
Alerting: Update prometheus version (#65688) 2023-03-31 16:34:35 +02:00
Andreas Christou
4586bac426
Bump plugin-sdk (#65652) 2023-03-31 12:58:22 +02:00
Zoltán Bedi
562d8dba5d
CloudMonitoring: Update sdks to latest (#65252)
* Upgrade grafana-google-sdk-go to v0.1.0

* Upgrade @grafana/google-sdk to 0.1.1

* Update doc with provisioning example

* Remove unused types

* Use config types from the sdk

* Add metrics
2023-03-29 12:16:28 +02:00
Bryan Boreham
7731a4d6af
Tracing: Add more detail to HTTP Outgoing Request (#64757)
Add more detail to HTTP Outgoing Request.
As events rather than sub-spans, to save cluttering the view.
2023-03-27 13:04:43 +02:00
Dan Cech
cc5211119b
switch from github.com/gofrs/uuid to github.com/google/uuid (#65016)
* switch from github.com/gofrs/uuid to github.com/google/uuid

* add golangci rule to prevent inadvertent reintroduction
2023-03-21 06:31:29 -04:00
George Robinson
0b506b4ccc
Alerting: Update github.com/grafana/alerting (#64882) 2023-03-16 13:59:35 +00:00
Kristin Laemmert
8745d7ef1b
extract kindsys to external library (#64562)
* extract kindsys

* reinstate kindsys report

This may end up living somewhere else (or not! who knows!), but the important part is that I don't get rid of it right now :)

I hate the package layout (kindsysreport/codegen) for the main function and will take pretty much any alternative suggestion, but we can change also change it later.

Note that the generated report.json is in a different location - anything using this (ops something) needs to be updated.

* kindsysreport in codeowners
2023-03-15 12:04:28 -04:00
Yuri Tseretyan
4583fe58f3
Chore: Update Grafana to use Alertmanager v0.25.1-0.20230308154952-78fedf89728b (#64778) 2023-03-14 18:59:25 -04:00
Jean-Philippe Quéméner
cb8e01214d
Revert "Alerting: Update Prometheus Alertmanager (#64434)" (#64503)
This reverts commit 5a4ebe3a67.
2023-03-09 13:32:07 +01:00
gotjosh
5a4ebe3a67
Alerting: Update Prometheus Alertmanager (#64434)
This includes a fix to duplicate notification under certain conditions, the details can be found at: https://github.com/grafana/prometheus-alertmanager/pull/30
2023-03-08 18:34:17 +01:00
gotjosh
5422f7cf56
Alerting: Add metrics for active receiver and integrations (#64050)
* Alerting: Add metrics for active receiver and integrations

Introduces metrics that allows us to track the number of configured receivers and integration in the Alertmanager for all orgs.

As a bonus, I realised that the alert reception metrics where not being exported nor collected. This does that too.
2023-03-06 16:37:07 +00:00
Jo
45fde4235b
Deps: Replace go-jose v2 with go-jose v3 (#64228)
replace go-jose v2 with go-jose v3
2023-03-06 15:12:51 +01:00
Jo
05275cc9a4
SAML: Replace is not necessary anymore (#64222)
replace is not necessary anymore
2023-03-06 14:42:51 +01:00
Serge Zaitsev
0bdb105df2
Chore: Remove xorcare/pointer dependency (#63900)
* Chore: remove pointer dependency

* fix type casts

* deprecate xorcare/pointer library in linter

* rooky mistake
2023-03-06 05:23:15 -05:00
Ryan McKinley
68fa7316fa
Chore: Update grafana-plugin-sdk-go (#63990) 2023-03-02 09:11:01 -08:00
Emil Tullstedt
10ee900beb
Errors: Remove direct dependencies on github.com/pkg/errors (#64026)
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2023-03-02 16:28:10 +01:00
Selene
e1350a905f
Chore: Update thema and cuesty v0.1.6 (#63629)
* Update thema and cuesty

* Update thema version

* Update thema again

* update thema

---------

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2023-03-01 00:23:57 -05:00
Jo
7e97dbde65
LDAP: Allow setting minimum TLS version and accepted ciphers (#63646)
* update ldap library and use go module path

* add TLS min version and accepted min TLS version

* set default min ver to library default

* set default min ver to library default

* add cipher list to toml

* Update pkg/services/ldap/settings.go

Co-authored-by: Karl Persson <kalle.persson@grafana.com>

* Apply suggestions from code review

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

* lint

---------

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-02-28 12:13:46 +01:00
Cyril Tovena
dde9b22113
Phlare: Switch to the new Pprof endpoint (#61505)
Co-authored-by: Joey Tawadrous <joey.tawadrous@grafana.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2023-02-28 11:28:45 +01:00
Jo
af987ae636
SupportBundles: Add bundle encryption based on age (#62501)
* add bundle encryption based on age

* undo changes to grafana-data

* sort deps

* test bundle creation and encryption

* use whitespace separator

* add support bundle config documentation

* Update docs/sources/troubleshooting/support-bundles/index.md

* Apply suggestions from code review

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

* touch up docs

* extract encrypt

* Update docs/sources/troubleshooting/support-bundles/index.md

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

* Update docs/sources/troubleshooting/support-bundles/index.md

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

---------

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-02-24 09:24:44 -06:00
Alexander Weaver
e77621649d
Alerting: Instrument outgoing state history requests using weaveworks/common (#63600)
* Loki backend and client depend on a requester

* Instrument all requests to loki using weaveworks TimedClient

* Construct collector in metrics package
2023-02-23 17:52:02 -06:00
Kyle Brandt
52ed297ed5
Backend: Use latest plugin-sdk-go v0.149.1 (#63498)
Use latest github.com/grafana/grafana-plugin-sdk-go which includes changes to the TypeVersion property (always present in JSON).

Also included is squtil changes: SQL util - allow using the database scan type for converters
2023-02-21 09:06:15 -05:00
Selene
7ace44c8b5
Chore: Update oapi-codegen library (#62962)
* Update oapi library and thema

* Use fork commit to fix elasticsearch and cloudwatch generators

* Update thema

* Fixes

* Update thema with last fixes

* Sync

* Fix test

* Update thema and schemas

* Update thema
2023-02-21 12:34:24 +01:00
Ryan McKinley
0018c8e9c1
K8S: cleanup and consolidate feature toggles (#63212) 2023-02-09 09:54:00 -08:00
Ryan McKinley
804bd08f11
Chore: remove unused feature flag showFeatureFlagsInUI (#62908) 2023-02-08 19:01:34 -05:00
Todd Treece
dea108a8b9
DevEnv: Add k8s apiserver (#63031)
Adds kind to bingo dependencies, and makes it available via `make devenv sources=apiserver`.
2023-02-07 20:34:05 -05:00
Alexander Zobnin
5205cfb11c
SAML: Update library (fix single logout) (#62880)
* SAML: update library (fix single logout)

* Run go mod tidy
2023-02-06 09:14:36 +01:00
Yuri Tseretyan
f066e8cdcd
Alerting: Update to alerting 20230203015918-0e4e2675d7aa (after refactoring) (#62823)
* add alerting prefix to some packages from alerting that have similar names in prometheus alertmanager
2023-02-03 11:36:49 -05:00
Kyle Brandt
09b6b8d435
Backend: Use sdk version 0.148.0 (#62822)
https://github.com/grafana/grafana-plugin-sdk-go/releases/tag/v0.148.0
2023-02-03 13:29:17 +01:00
Steve Simpson
36f3071d66
Alerting: Remove dskit replace directive. (#62851)
The replace directive can be removed now that grafana/dskit#258 is merged.
2023-02-03 12:34:54 +01:00
Sergey Kostrukov
2f218ab928
Azure: Update Grafana Azure SDK and middleware (#62050)
* Update middleware

* Update Grafana Azure SDK

* Client options to client builder

* Fix tests

* maputil from SDK
2023-02-02 16:58:10 +00:00
Ryan McKinley
e70d623f90
Schemas: Generate CRDs for core kinds (#62641)
Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-02-01 09:08:26 -08:00
gotjosh
55e7cf1aed
Alerting: Introduce Metric Aggregation starting with Silences (#62512)
* Alerting: Introduce Metric Aggregation starting with Silences
---------

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2023-01-31 19:54:38 +00:00
gotjosh
178f290f0c
Update dskit to the latest main (#62616)
* Update dskit to the latest main

* Break free from a cortex depedency
2023-01-31 19:05:49 +00:00
gotjosh
0bfe150928
Alerting: Fix Test Receivers when settings are non-strings (#62156)
* Alerting: Fix Test Receivers when settings are non-strings

As part of the Alerting extraction, we want to make sure we don't have circular depedencies. As such, I had to move `PostableGrafanaReceiver` to a new struct in `grafana/alerting` called `GrafanaReceiver`.

`PostableGrafanaReceiver` has an attribute called `Settings` that uses a Grafana-propietary struct called `RawMessage`, this struct shadows `json.RawMessage`.

When I created `GrafanaReceiver`, I turned settings into a `map[string]string` thinking all settings would end up as strings. This was a mistake, and this test proves that it doesn't work, and breaks the API.
2023-01-26 12:54:03 +00:00
gotjosh
bbf7c0a147
Update alerting to the latest main (#62003) 2023-01-25 10:06:36 +00:00
Shirley
cd86758a35
CloudWatch: Use grafana-aws-sdk v0.12.0 (#62007) 2023-01-25 09:22:33 +01:00
Joan López de la Franca Beltran
6e126596e0
Kindsys: Include CODEOWNERS to Kinds report (#61978)
* Kindsys: Include CODEOWNERS to Kinds report

* Sort CODEOWNERS for the sake of reproducibility

* Fix linter complains
2023-01-24 15:53:01 +01:00
Jo
46cbf9d24c
SAML: Update deps (#61906) 2023-01-23 16:24:59 +00:00
Selene
1e5eae5fca
Chore: Remove DecoderCompactor() (#61706)
* Remove ApplyFunc and set NoOptionalPointers to true

* Update go mod
2023-01-23 09:00:34 -05:00
gotjosh
511dab3b4b
Update grafana/alerting to the latest main (#61810)
* Update `grafana/alerting` to the latest main

Also updates prometheus-alertmanager since we use that one directly for some structs.
2023-01-19 20:44:49 +00:00
Andrej Ocenas
d8273eeb6b
Parca: Use client dependency from buf.dev instead of generated sources (#60969) 2023-01-19 16:26:00 +01:00
Selene
68f1bfa471
Chore: Update ast to dst (#61469)
* Update ast to dst

* Sort imports

* Update thema

* Update pkg/codegen/util_go.go

Co-authored-by: sam boyer <sdboyer@grafana.com>

* Move DecoderCompactor into ApplyFuncs

* Remove unnecessary file

* Use dst decorator

* Downgrade parca-dev library

Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-01-17 11:58:08 +01:00
Tania
045a12047f
Codegen: Generate per-kind reference docs (#60416)
* Add docs generator

* Add json-to-md conversion

* Fix lint issues

* Remove check for kind type

* Disable prettier for generated docs

* Use schema ref names as identifiers for links & headers

* Display the default value (if so) in the description

* Undo 'draft:false' introduced by mistake

* Update pkg/codegen/jenny_docs.go

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Undraft and unlist kinds documentation  (#61476)

* Support running containers without root daemon

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

* Use section shortcode to automatically list child pages

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

* Undraft and unlist kinds documentation

This page and child pages are directly accessible but are not listed
in the table of contents.

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

* Add docs-preview to browse drafted pages

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

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

* Replace end of line and pipe characters in table codegen

* Remove draft status from generated docs

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Joan López de la Franca Beltran <joanjan14@gmail.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Robert Horvath <robert.horvath@grafana.com>
2023-01-16 13:55:40 +01:00
Yuri Tseretyan
12d27edb52
Alerting: Update alerting package rerefence to the last commit (#61515) 2023-01-13 17:28:44 -06:00
Yuri Tseretyan
8e4922f02f
Chore: Update alerting to the head of the main (#61437) 2023-01-12 22:35:19 -05:00
gotjosh
6822298953
Update grafana/alerting to the latest main (#61407) 2023-01-12 11:56:32 -04:00
George Robinson
d19d8c6625
Alerting: Update Alerting and Alertmanager to v0.25.1 (#61233)
Update Alerting and Alertmanager to v0.25.1
2023-01-10 16:17:07 +00:00
Cyril Tovena
ad1813da27
Phlare: Update client code to use v0.1.2 API. (#60941)
* Depends on Phlare API instead of copying the code

* Rollback the breaking change from the API version
2023-01-10 14:16:45 +00:00
Alex Khomenko
b1573104d4
Schema: Use the latest cuetsy version (#60696)
* Schema: Use the latest cuetsy version

* Schema: Update Permission

* Use latest cuetsy
2023-01-03 14:10:32 +02:00
ying-jeanne
77b3520b47
[xorm] remove mssql as driver (#60760)
* Remove mssql driver

* reput the go.mod

* add back xorm and remove mssql
2022-12-26 06:01:51 -05:00
ying-jeanne
572e5a76ef
[xorm] add xorm as package into grafana (#60678)
* add xorm and xorm/core as package

* remove mssql and oracle as driver

* fix some typo

* remove unittest

* remove some cache

* restore the removed part

* remove logfile
2022-12-26 17:45:21 +08:00
Yuri Tseretyan
f990be58cb
Alerting: Use all notifiers from alerting repository (#60655) 2022-12-22 09:27:18 -05:00
sam boyer
b8253ac3b9
deps: Update thema, use CUE fork (#60496)
* deps: Update thema, use CUE fork

* Remove superfluous openapi-codegen output

* Update thema again to catch cuetsy changes

* Rerun codegen with latest

* Latest thema, removes cuetsy update

* Latest of cuetsy

* Update type usage

* One last cuetsy rollback

* Update playlist summary tests

* More lint fixes

* Remove TS veneer changes for VariableHide

Co-authored-by: Clarity-89 <homes89@ukr.net>
2022-12-22 07:20:02 -05:00
Andres Martinez Gotor
10cfc27397
AzureMonitor: Update SDK version (#60372) 2022-12-20 16:20:31 +01:00
Yuri Tseretyan
35090c376c
Alerting: Replace VictorOps receiver with the one from alerting repository (#60543)
* replace victorops with one from alerting

* update other usages
2022-12-20 10:55:41 +01:00
Yuri Tseretyan
f0cabe14d5
Alerting: import Grafana alerting package and update usages (#60490)
* update remaining notifiers to use alerting package
2022-12-19 10:53:58 -05:00
Marcus Efraimsson
6478d0a5ef
Plugins: Forward user header (X-Grafana-User) in backend plugin requests (#58646)
Grafana would forward the X-Grafana-User header to backend plugin request when 
dataproxy.send_user_header is enabled. In addition, X-Grafana-User will be automatically
forwarded in outgoing HTTP requests for core/builtin HTTP datasources. 
Use grafana-plugin-sdk-go v0.147.0.

Fixes #47734

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-12-15 15:28:25 +01:00
Kyle Brandt
55d2d872ec
Chore: Missed deprecations due to overly broad lint exclusion (#59732) 2022-12-14 12:32:45 +01:00
Ryan McKinley
cf055ab4ec
k8s: Add a dev only feature flag and simple service to get a client (#60204) 2022-12-13 07:41:16 -08:00
Serge Zaitsev
43f40e6c7c
Chore: Replace yaml.v2 with yaml.v3 (#59897)
* replace yaml.v2 with yaml.v3

* fix a few tests due to the yaml.v3 api changes

* and another goconvey mistake in tests
2022-12-06 21:17:17 +01:00
Kyle Brandt
4e0f95dc31
Chore: Update SDK to v0.145.0 with TimeSeriesMulti Constant (#59729) 2022-12-05 12:48:10 -05:00
Ryan McKinley
14a080ec12
EntityStore: Rename ObjectStore to EntityStore (part 2) (#59616) 2022-11-30 17:52:15 -05:00
Ryan McKinley
b0b74337f1
Chore: fix go.mod and slugify after merge (#59611) 2022-11-30 16:16:57 -05:00
Ryan McKinley
5b71a16acf
Slugify: Replace gosimple/slug with a simple function (#59517) 2022-11-30 11:12:56 -05:00
sam boyer
695cb06c77
deps: Remove effectless go.mod replace statements (#58882) 2022-11-30 11:24:51 +01:00
Emil Tullstedt
f485f8a8f8
Chore: Upgrade Go dependencies (#59501) 2022-11-29 16:37:45 +01:00
Erik Sundell
254577ba56
CloudWatch: Cross-account querying support (#59362)
* Lattice: Point to private prerelease of aws-sdk-go (#515)

* point to private prerelease of aws-sdk-go

* fix build issue

* Lattice: Adding a feature toggle (#549)

* Adding a feature toggle for lattice

* Change name of feature toggle

* Lattice: List accounts (#543)

* Separate layers

* Introduce testify/mock library

Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>

* point to version that includes metric api changes (#574)

* add accounts component (#575)

* Test refactor: remove unneeded clientFactoryMock (#581)

* Lattice: Add monitoring badge (#576)

* add monitoring badge

* fix tests

* solve conflict

* Lattice: Add dynamic label for account display name (#579)

* Build: Automatically sync lattice-main with OSS

* Lattice: Point to private prerelease of aws-sdk-go (#515)

* point to private prerelease of aws-sdk-go

* fix build issue

* Lattice: Adding a feature toggle (#549)

* Adding a feature toggle for lattice

* Change name of feature toggle

* Lattice: List accounts (#543)

* Separate layers

* Introduce testify/mock library

Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>

* point to version that includes metric api changes (#574)

* add accounts component (#575)

* Test refactor: remove unneeded clientFactoryMock (#581)

* Lattice: Add monitoring badge (#576)

* add monitoring badge

* fix tests

* solve conflict

* add account label

Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* fix import

* solve merge related problem

* add account info (#608)

* add back namespaces handler

* Lattice: Parse account id and return it to frontend (#609)

* parse account id and return to frontend

* fix route test

* only show badge when feature toggle is enabled (#615)

* Lattice: Refactor resource response type and return account (#613)

* refactor resource response type

* remove not used file.

* go lint

* fix tests

* remove commented code

* Lattice: Use account as input when listing metric names and dimensions (#611)

* use account in resource requests

* add account to response

* revert accountInfo to accountId

* PR feedback

* unit test account in list metrics response

* remove not used asserts

* don't assert on response that is not relevant to the test

* removed dupe test

* pr feedback

* rename request package (#626)

* Lattice: Move account component and add tooltip (#630)

* move accounts component to the top of metric stat editor

* add tooltip

* CloudWatch: add account to GetMetricData queries (#627)

* Add AccountId to metric stat query

* Lattice: Account variable support  (#625)

* add variable support in accounts component

* add account variable query type

* update variables

* interpolate variable before its sent to backend

* handle variable change in hooks

* remove not used import

* Update public/app/plugins/datasource/cloudwatch/components/Account.tsx

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* Update public/app/plugins/datasource/cloudwatch/hooks.ts

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* add one more unit test

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* cleanup (#629)

* Set account Id according to crossAccountQuerying feature flag in backend (#632)

* CloudWatch: Change spelling of feature-toggle (#634)

* Lattice Logs (#631)

* Lattice Logs

* Fixes after CR

* Lattice: Bug: fix dimension keys request (#644)

* fix dimension keys

* fix lint

* more lint

* CloudWatch: Add tests for QueryData with AccountId (#637)

* Update from breaking change (#645)

* Update from breaking change

* Remove extra interface and methods

Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>

* CloudWatch: Add business logic layer for getting log groups (#642)



Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* Lattice: Fix - unset account id in region change handler (#646)

* move reset of account to region change handler

* fix broken test

* Lattice: Add account id to metric stat query deep link (#656)

add account id to metric stat link

* CloudWatch: Add new log groups handler for cross-account querying (#643)

* Lattice: Add feature tracking (#660)

* add tracking for account id prescense in metrics query

* also check feature toggle

* fix broken test

* CloudWatch: Add route for DescribeLogGroups for cross-account querying (#647)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>

* Lattice: Handle account id default value (#662)

* make sure right type is returned

* set right default values

* Suggestions to lattice changes (#663)

* Change ListMetricsWithPageLimit response to slice of non-pointers

* Change GetAccountsForCurrentUserOrRole response to be not pointer

* Clean test Cleanup calls in test

* Remove CloudWatchAPI as part of mock

* Resolve conflicts

* Add Latest SDK (#672)

* add tooltip (#674)

* Docs: Add documentation for CloudWatch cross account querying (#676)

* wip docs

* change wordings

* add sections about metrics and logs

* change from monitoring to observability

* Update docs/sources/datasources/aws-cloudwatch/_index.md

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>

* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* apply pr feedback

* fix file name

* more pr feedback

* pr feedback

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* use latest version of the aws-sdk-go

* Fix tests' mock response type

* Remove change in Azure Monitor

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
2022-11-28 12:39:12 +01:00
Kevin Minehart
45c759eb59
CI: Make the downstream enterprise test a check instead of comments (#59071) 2022-11-24 08:17:12 -06:00
Guilherme Caulada
414df842b8
Build: Add command to publish to AWS Marketplace through the pipeline (#59068)
* Remove generic variables from publish github action

* Create publish aws cmd to automate aws releases

* Add tests to publish aws cmd

* Replace fmt with log for prints

* Remove unnecessary type assertions

* Readd mistakenly removed go package

* Replace log with fmt for prints due to conflicts

* Update github tests to conform with casing
2022-11-22 13:04:14 -03:00
Gilles De Mey
ea27eca147
Email: Use MJML email templates (#57751)
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-11-17 21:41:46 +01:00
sam boyer
c4528f9bd8
codejen: Update to latest codejen (#58866) 2022-11-16 15:08:01 -05:00
sam boyer
78f0340031
plugindef: Move pluginmeta out of coremodels as standalone thema lineage (#56765)
* Get pluginmeta mostly moved over to pkg/plugins/plugindef

* Remove dead func

* Fix up pfs, use sync.Once in plugindef

* Update to latest thema

* Chase Endec->Codec conversion in Thema

* Comments on slash header gen; use ToSlash

* Also generate JSON schema for plugindef

* Generate JSON Schema as well

* Fix slot loading from kindsys cue decls

* Remove unused vars

* skip generating plugin.schema.json for now

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-11-15 14:48:31 +01:00
gotjosh
d748979048
Alerting: Implement the Webex notifier (#58480)
* Alerting: Implement the Webex notifier

Closes https://github.com/grafana/grafana/issues/11750

Signed-off-by: gotjosh <josue.abreu@gmail.com>
2022-11-11 17:27:13 +00:00
sam boyer
07e5f8117f
Reconcile coremodels, entities, objects under new kind framework (#56492)
* Update thema to latest

* Deal with s/Library/*Runtime/

* Commit new, working results of codegen

* We like pointers now

* Always take runtime arg for NewBase()

* Sketchy handwavy pass at entity meta framework

* Little nibbles

* Update pkg/framework/coremodel/entityframework.cue

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>

* Move file into new framework location

* Introduce loaders, Go code

* Complete rename to kind

* Flesh out framework, add svg/dashboard examples

* Cruft removal

* Remove generated kind go files from gitignore

* Refine maturity concept, add SlotKind

* Update embed and go deps

* Export PrefixWithGrafanaCUE

* Make the loader actually work, holy crap

* Many small tweaks to type.cue

* Add Apache 2 licensing exceptions for kinds

* Add new kinds dir, start of generator

* Roll back to earlier oapi-codegen

* Introduce new grafana-specific CUE loaders

* Introduce new tidy code generators framework

* Catch up kind framework with tinkering

* Add slices for the generators

* Add write/verify step to main generator

* Many renames

* Split up kind framework cue files

* Use kind.Decl within generated kinds

* Create kind.SomeDecl wrapper type to cache lineages

* Better names again

* Get one generated implemented, hopefully

* Copy dashboard schema into new kind.cue

* Small fixes to make the initial gen work

* Put svg kind in its new home

* Add generated Go dashboard type

* More renames and cleanups

* Add base kind registry and generator

* Stop blacklisting *_gen.go files

This is not the Go best practice, anyway. All we actually want to ignore
for enterprise is generated wire files.

* Change codegen output directories

pkg/kind -> pkg/kinds
pkg/registry/kindreg -> pkg/registry/corekind

* Rename pkg/framework/kind to pkg/kindsys

* Add core structured kind generator

* Add plural and machine names to kind spec

* Copy playlist over to kind system

* Consolidate kindsys files

* Add raw kind generator

* Update CODEOWNERS for kind framework

* Touch up comments a bit

* More docs tweaks

* Remove generated types to reduce noise for review

* Split each generator into its own file

* Rename Slot kind to Composable kind

* Add handwavy types for customkind loading

* Guard against init calls to framework loader

* First pass at doc on extending the kind system

* Improve attribute example in docs

* Fix wire imports

* Add basic TS types generator

* Fix composable kind category def

* No need for a separate file with generate directive

* Catch dashboard schema up

* Rename generator types to something saner and generic

* Make version configurable in ts/go generators

* Add CommonMeta to ease property access

* Add kindsys prop indicating whether lineage is group

* Put all kind categories back in a single file

* Finish with kindsys group props

* Refactor maturity progression per discussion

- Replace "committed" with "merged"
- All kindcats can use all maturity levels, at least for now

* Convert ts veneer index generator to modular system

* Move over to new jennywrites framework

* Strip down old coremodel generator

* Use public version of jennywrites

* Pull latest thema

* Commit generated Go types

* Add header injection postprocessor

* Move sdboyer/jennywrites to grafana/codejen

* Tweak header output

* Remove dashboard and playlist coremodels

* Fix up backend dashboards devenv test

* Fix TS import patterns to new gen filename

* Update internal imports, remove coremodel registry

* Fix compilation errors, wire generation

* Export and replace the prefix dropper

* More Go struct and field name changes

* Last name fixes, hopefully

* Fix lint errors

* Last lint error

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-11-10 12:36:40 -08:00
Emil Tullstedt
990d8cd22e
Chore: Upgrade go-sqlite3 to v1.14.16 (#58581) 2022-11-10 15:49:28 +01:00
Marcus Efraimsson
faa0fda6eb
Prometheus: Upgrades http client to v1.13.1 (#58363) 2022-11-08 08:35:05 +01:00
Dimitris Sotirakis
bdb8fe3b02
Update drone-cli go mod to v1.6.1 (#58245) 2022-11-05 09:52:21 +02:00
Ryan McKinley
a83fdc6b87
Live: remove json exact converter (#58282) 2022-11-04 18:33:02 -04:00
Dan Cech
da9c646f24
Build: add explicit build step for go codeql (#58195)
* 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
2022-11-04 10:20:08 -04:00
Giuseppe Guerra
7996a1c8ad
Chore: Update grafana-plugin-sdk-go to v0.142.0 (#58115)
* Chore: Update grafana-plugin-sdk-go to v0.142.0

* Update tests and golden files for 207 status code

* Chore: Move update flag definition at the top in response_parser_test.go

* retrigger

Co-authored-by: Will Browne <will.browne@grafana.com>
2022-11-03 18:34:27 +01:00