Commit Graph

638 Commits

Author SHA1 Message Date
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
Emil Tullstedt
d0dfb28ee4
Security: Upgrade x/text to version unaffected by CVE-2022-32149 (#57797) (#57803)
Co-authored-by: emerson_gong <yong-jie.gong@microfocus.com>
2022-11-02 14:28:43 +01:00
Petr Stupka
e99f75f0ca
Alerting: Linking external images securely - Azure Blob (#1) (#56598) 2022-11-01 13:02:17 +01:00
Andrej Ocenas
0845ac2f53
Profiling: Add Phlare and Parca datasources (#57809)
* Add phlare datasource

* Rename

* Add parca

* Add self field to parca

* Make sure phlare works with add to dashboard flow

* Add profiling category and hide behind feature flag

* Update description and logos

* Update phlare icon

* Cleanup logging

* Clean up logging

* Fix for shift+enter

* onRunQuery to set label

* Update type naming

* Fix lint

* Fix test and quality issues

Co-authored-by: Joey Tawadrous <joey.tawadrous@grafana.com>
2022-10-28 13:33:37 +02:00
idafurjes
50fb47dba0
Chore: Remove methods from sqlstore (#57545)
* Remove methods from sqlstore

* Remove commented out code

* Remove GetUserById from tests

* Adjust fake for get user profile

* Adjust test

* Adjust go mod files

* Try fix test

* Test adjustment

* Adjust test 2

* Remove commented out code
2022-10-27 11:44:09 +02:00
Jo
77437f2c89
Add multi-auth devenv (#57609)
* add authentik devenv

* remove direct dependency on spew

* use cn

* add authentik instructions

* add backup instructions
2022-10-26 13:46:50 +02:00
Guilherme Caulada
96a97f9827
Build: Add github release command to build/cmd (#56349)
* Add github release command to build/cmd

* Use go-github library and implement dry-run

* Make tag optional and default to metadata

* Fix minor bug with tag default

* Make some refactors to ease testing

* Add tests for publish github command

* Refactor publish github tests

* Refactor test helper function name

* Isolate local test
2022-10-20 11:11:53 -03:00
Santiago
9996dbd577
use Prometheus' format for notification attempts durations (#56822) 2022-10-13 10:08:09 -03:00
Sofia Papagiannaki
97730aec10
Chore: Bump golang.org/x/text (#56841) 2022-10-13 11:26:25 +03:00
sam boyer
e5a6547a94
coremodels: Update to latest Thema with generics (#56602)
* Update thema to latest

* Deal with s/Library/*Runtime/

* Commit new, working results of codegen
2022-10-11 09:45:07 +01:00
Joe Blubaugh
13067b39da
Alerting: Update replacement of prometheus-alertmanager (#56519)
grafana.com/grafana/prometheus-alertmanager has been updated to a
version that fixes some bugs upstream. This change just updates that
dependency and a few shared ones.
2022-10-07 17:10:20 +08:00
Sofia Papagiannaki
91b4ce08a9
Update github.com/labstack/echo/v4 (#56226) 2022-10-04 14:31:05 +03:00
Joe Blubaugh
ce89624ca2
Alerting: Update imported prometheus alertmanager version. (#56228)
Version 0.24.0 has a few bugs that cause panics. We update here to the
latest commit on github.com/prometheus/alertmanager's main branch.

Panic Bugs:
https://github.com/prometheus/alertmanager/issues/2936
https://github.com/prometheus/alertmanager/issues/3064
2022-10-04 17:41:34 +08:00
Santiago
09f8e026a1
Alerting: Expose info about notification delivery errors in a new /receivers endpoint (#55429)
* (WIP) switch to fork AM, first implementation of the API, generate spec

* get receivers avoiding race conditions

* use latest version of our forked AM, tests

* make linter happy, delete TODO comment

* update number of expected paths to += 2

* delete unused endpoint code, code review comments, tests

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

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

* remove call to fmt.Println

* clear naming for fields

* shorter variable names in GetReceivers

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2022-10-03 10:58:41 -03:00
ms-hujia
ec024ae960
Azure Monitor: Add support to customized routes (#54829) 2022-10-03 12:33:37 +02:00
Shirley
09079bfb65
Upgrade to grafana-aws-sdk v0.11.0 (#56042) 2022-09-30 13:51:28 +02:00
sam boyer
59a3e18bb2
Fix prefix dropper in Go codegen (#56041) 2022-09-29 12:01:02 -04:00
emerson_gong
4ffa0532f0
Security: Fix CVE-2022-27664 (#55361)
* Fix CVE-2022-27664

* update golang.org/x/sys in go.sum
2022-09-28 17:35:06 +03:00
sam boyer
e2ff875976
codegen: Introduce TS codegen veneer (#54816)
* Split all named types out into defs, etc.

* Use latest cuetsy, refactor generators accordingly

* Return AST type from plugin TS generator

* Near-complete checkin of TS veneer code generator

* First full completed pass

* Improve the attribute name

* Defer use of the dashboard veneer type to follow-up

* Remove dummy index, prettier on veneer

* Fix merge errors in gen.go

* Add match field to SpecialValueMap

* Fix backend lint errors
2022-09-26 11:26:18 -04:00
Alexander Emelin
0e6a8cc6ac
Live: Migrate to centrifuge-js v3 (new API and client protocol) (#51977) 2022-09-20 11:39:46 -04:00
sam boyer
4d0988b6b2
misc: Update to Go 1.18 (#53440) 2022-09-19 16:04:14 +00:00
Kevin Minehart
ed5d617cb9
CI: move grabpl verify-drone (#55057)
* move grabpl verify-drone
2022-09-14 08:59:18 +03:00
Dave Henderson
713075c494
Metrics: Fixed grafana_database_conn_* metrics, and added new go_sql_stats_* metrics as eventual replacement (#54405)
* metrics: Fix broken DBStats metrics

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

* Register the sqlstats metrics by default

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

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
2022-08-31 08:54:32 -04:00
Marcus Efraimsson
cd5f27a25d
Plugins: Propagate distributed tracing headers to backend plugins (#54107) 2022-08-24 11:55:49 +02:00
sam boyer
4d433084a5
plugins: New static scanner and validator, with Thema slot support (#53754)
* coremodels: Convert plugin-metadata schema to a coremodel

* Newer cuetsy; try quoting field name

* Add slot definitions

* Start sketching out pfs package

* Rerun codegen with fixes, new cuetsy

* Catch up dashboard with new cuetsy

* Update to go1.18

* Use new vmuxers in thema

* Add slot system in Go

* Draft finished implementation of pfs

* Collapse slot pkg into coremodel dir; add PluginInfo

* Add the mux type on top of kernel

* Refactor plugin generator for extensibility

* Change models.cue package, numerous debugs

* Bring new output to parity with old

* Remove old plugin generation logic

* Misc tweaking

* Reintroduce generation of shared schemas

* Drop back to go1.17

* Add globbing to tsconfig exclude

* Introduce pfs test on existing testdata

* Make most existing testdata tests pass with pfs

* coremodels: Convert plugin-metadata schema to a coremodel

* Newer cuetsy; try quoting field name

* Add APIType control concept, regen pluginmeta

* Use proper numeric types for schema fields

* Make pluginmeta schema follow Go type breakdown

* More decomposition into distinct types

* Add test case for no plugin.json file

* Fix missing ref to #Dependencies

* Remove generated TS for pluginmeta

* Update dependencies, rearrange go.mod

* Regenerate without Model prefix

* Use updated thema loader; this is now runnable

* Skip app plugin with weird include

* Make plugin tree extractor reusable

* Split out slot lineage load/validate logic

* Add myriad tests for new plugin validation failures

* Add test for zip fixtures

* One last run of codegen

* Proper delinting

* Ensure validation order is deterministic

* Let there actually be sorting

* Undo reliance on builtIn field (#54009)

* undo builtIn reliance

* fix tests

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-08-22 12:11:45 -04:00
Carl Bergquist
a74681036e
prometheus: upgrades http client to 1.30 (#53901)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2022-08-18 18:44:31 +01:00
sam boyer
c23a9d78ab
Actually enforce dashboard schema on devenv (#53797)
* Relocate dashboards test so it runs

* Cover newer schema versions in stripnulls

* Strip nulls and remove iteration fields

* Fix fiscalYearStartMonth bounds

* Fix up and format dashboard schema

* Update thema, tidy Go dependencies
2022-08-16 22:07:57 -04:00
ying-jeanne
25de383540
Chore: Replace xorm with sqlx (#52575)
* Change of sqlstore to use sqlx

* Use sqlx in the playlist store

* Refectory of the interface

* update playlist service

* go mod tidy

* some refectory on interface

* fix kyle
2022-08-16 13:17:14 -05:00
Yuriy Tseretyan
e3da9da51d
update alertmanager to 0.24 (#53555) 2022-08-11 17:54:32 -04:00
Kevin Minehart
d117689aea
CI: move grabpl build-frontend from grabpl to grafana (#53073)
* move grabpl build-frontend
2022-08-10 10:29:51 -04:00
sam boyer
e6903582d0
coremodels: Include nested optional fields in output (#53355) 2022-08-08 21:48:21 +00:00
Ryan McKinley
197acd73c0
Storage: support git + github backed roots (#52192) 2022-07-28 23:26:44 -07:00
Jo
51e2a1c0a4
Deps: Update SAML libraries (#52893)
Deps: ensure goxmldsig is pinned

update go.mod
2022-07-28 08:43:30 +02:00
sam boyer
566d0a7148
coremodel: Fix hardcoded text and overly broad embedding (#52802)
* Replace hardcoded 'dashboard' references

* Only embed cue.mod/module.cue

* Add quotes
2022-07-26 09:14:07 -04:00
Sarah Zinger
355489d9b4
Upgrade grafana-aws-sdk from core, and remove it from @grafana/ui (#52420) 2022-07-20 12:33:57 -04:00
Sofia Papagiannaki
f7c5eceb21
Chore: Update to the latest grafana-plugin-sdk-go and more swagger fixes (#52445)
* Fix get legacy alert response

* Swagger: Fix get folder by UID response

* Fix conflicting swagger model Alert

Reanme legacy alerting swagger model to LegacyAlert to differentiate it
from the prometheus Alert

* Bump grafana-plugin-sdk-go

* Fix get folder response

* Use go-swagger command for merging the specifications and remove merge_specs script
2022-07-20 16:09:42 +03:00
Andreas Christou
1c48f443f0
Upgrade grafana-azure-sdk-go package (#52248)
- Includes fix for appropriate selection of system assigned identity when using managed identity credential for Azure Monitor auth
2022-07-15 10:46:30 +01:00
Ryan McKinley
4fa606c600
Export: save all dashboards to git (#48233) 2022-07-05 10:54:07 -07:00
Alexander Emelin
f233a74b70
Search: Downgrade Bluge, refactor code (#51560)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-07-04 11:33:07 +03:00
Emil Tullstedt
a14ca8fb62
Dependencies: Clean up gofrs/uuid (#51615)
* Dependencies: switch from gofrs/uuid to google/uuid

Co-authored-by: Jeff Levin <jeff@levinology.com>
2022-06-30 10:55:33 -08:00
Emil Tullstedt
b45c71c9ca
Loki: Create component for sending logs to Loki (#51500) 2022-06-30 10:24:44 +02:00
Kristin Laemmert
48501d5bb7
chore/deps: bump containerd to 1.6.6 (#51493)
This addresses CVE-2022-31030 / https://github.com/grafana/grafana/security/dependabot/72
2022-06-29 09:00:50 -04:00
dependabot[bot]
b30680d33c
Bump github.com/gosimple/slug from 1.9.0 to 1.12.0 (#43837)
Bumps [github.com/gosimple/slug](https://github.com/gosimple/slug) from 1.9.0 to 1.12.0.
- [Release notes](https://github.com/gosimple/slug/releases)
- [Commits](https://github.com/gosimple/slug/compare/v1.9.0...v1.12.0)

---
updated-dependencies:
- dependency-name: github.com/gosimple/slug
  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>
2022-06-29 14:46:14 +02:00
Emil Tullstedt
7d815a1db5
Alerting: Use google/uuid instead of gofrs/uuid (#51242) 2022-06-28 11:57:24 +02:00
Timur Olzhabayev
7c886fb6f9
Frontend Logging: Integrate grafana javascript agent (#50801)
Add Grafana Javascript Agent integration to Grafana
2022-06-28 03:25:30 -04:00
Erik Sundell
1f5f8aa5ab
bump grafana-aws-sdk (#51322) 2022-06-23 16:00:35 +02:00
Marcus Efraimsson
a8eb29f1d7
Plugins: Use a Grafana specific SDK logger implementation for core plugins (#51229)
Upgrade grafana-aws-sdk to v0.10.6
2022-06-23 14:34:25 +02:00
Alexander Emelin
cef81a6478
Search: Update bluge version (#50377) 2022-06-22 15:49:26 +03:00
Emil Tullstedt
f35aa8c7d7
Chore: Update golang.org/x dependencies (#51028) 2022-06-20 11:24:21 +02:00
ying-jeanne
4489f331b8
Chore: Use the bingo built golangci-lint (#51048)
* use the bingo built golangci-lint

* remove grapl usage

* add dependancy
2022-06-17 19:46:20 +02:00
Matthew Jacobson
8f5912b94c
Alerting: Fix AM config overwrite when SQLite db is locked during sync (#50951)
If SQLite is used and the database is locked temporarily (ex. heavy write-load) during periodic
AM config sync, it was possible for your AM config to be overwritten with the default one.

This fixes that by patching a bug in xorm v0.8.2 which was causing SQLITE_BUSY errors to be ignored
in certain cases.
2022-06-16 20:24:02 -04:00
Zoltán Bedi
65a5ac462a
MSSQL: Fix ParseFloat error (#50815) 2022-06-14 19:33:49 +02:00
Marcus Efraimsson
cddab15769
Chore: Upgrade grafana-plugin-sdk-go to v0.137.0 (#50443)
Co-authored-by: Todd Treece <todd.treece@grafana.com>
2022-06-09 10:10:58 +02:00
Todd Treece
64d93498de
Chore: Update grafana-plugin-sdk-go to v0.136.0 (#50127) 2022-06-03 08:25:52 -04:00
sam boyer
4783db59c7
schema: Use latest cuetsy to fix union generation (#50013)
Also, include the RowPanel type in code generation.
2022-06-01 13:14:55 -04:00
Dimitris Sotirakis
0d7a3209e7
etcd: Fix vuln CVE-2018-1098 (#49976)
* Update etcd

* Update go.sum

* Replace etcd with etcd/v3
2022-06-01 09:31:34 +02:00
Marcus Efraimsson
a7813275a5
Plugins: Support headers field for check health (#49930) 2022-05-31 17:58:06 +02:00
Dimitris Sotirakis
3587a5559b
Dependencies: Update etcd module (#49873)
* Update etcd

* Update go.sum

* Replace etcd due to broken module
2022-05-31 12:13:50 +03:00
sam boyer
be06d37a20
schema: Generate Go and Typescript from Thema coremodels (#49193)
* Add go code generator for coremodels

* Just generate the entire coremodel for now

Maybe we'll need more flexibility as more coremodels are added, but for
now this is fine.

* Add note on type comment about stability, grodkit

* Remove local replace directive for thema

* Generate typescript from coremodel

* Update pkg/coremodel/dashboard/addenda.go

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

* Update cuetsy to new release

* Update thema to latest

* Fix enum generation for FieldColorModeId

* Put main generated object at the end of the file

* Tweaks to generated Go output

* Retweak back to var

* Add generated coremodel test

* Remove local replace statement again

* Add Make target and call into cuetsy cmd from gen

* Rename and comment linsrc for readability

* Move key codegen bits into reusable package

* Move body of cuetsifier into codegen pkg

Also genericize the diffing output into reusable WriteDiffer.

* Refactor coremodel generator to use WriteDiffer

* Add gen-cue step to CI

* Whip all the codegen automation into shape

* Add simplistic coremodel canonicality controls

* Remove erroneously committed test

* Bump thema version

* Remove dead code

* Improve wording of non-canonicality comment

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-27 03:21:37 +02:00
Yuriy Tseretyan
279f068cd5
use forward slashes in cue ctx (#49440)
because fstest.MapFS only recognizes forward slashes
2022-05-23 22:00:30 +02:00
sam boyer
a3402641d6
api: Validate dashboards on save via coremodels, behind feature toggle (#48252)
* Add coremodelValidation feature flag

* coremodels: use stubs when feature flag is off

* api: validate dashboards on save

* Need pointer receiver for FeatureManager

* Update dashboard Go model

* Align doc comments

* Include CoremodelRegistry in test

* Wedge coremodel in on all test cases, ugh

* Ugh fix comment again

* Update pkg/framework/coremodel/staticregistry/provide.go

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

* Update Thema (and its deps) for better errs

* omg whitespace

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-05-22 02:44:12 +02:00
Sergey Kostrukov
7251115457
Settings: Use Grafana Azure SDK to pass Azure env vars for external plugins (#48954)
* Azure env vars for plugins via Grafana Azure SDK

* Remove tests
2022-05-18 15:28:40 +02:00
Ryan McKinley
d6d358ef26
Search: create bluge based index (#48606) 2022-05-09 01:00:09 -07:00
sam boyer
ea96c42545
schemas: Update to cuetsy v0.0.1 (#48753)
* Add explicit cuetsy annotations to all models.cue

* Update to first cuetsy release

* Clean up cuetsify a bit; remove unification

* Update changes to news codegen output
2022-05-05 11:56:53 -04:00
idafurjes
abb1618291
Add OTLP exporter for OpenTelemetry (#47987)
* Add OTLP exporter for OpenTelemtry

* Fix lint

* Refactore parse settings

* Add configuration for propagation + fix tests

* Fix tests and lint

* Fix alerting tests

* Add coments to config

* Add propagation to custom.ini
2022-05-05 10:37:26 +02:00
Todd Treece
54e5152d37
Chore: Update grafana-plugin-sdk-go to v0.134.0 (#48540) 2022-04-29 16:14:32 +02:00
Todd Treece
6f4131ad15
Chore: Update grafana-plugin-sdk-go to v0.133.0 (#48382) 2022-04-28 06:14:49 -04:00
Jguer
8126331f66
Update cron library for ldap sync (#47983)
* ldap: update cron library

* Update docs/sources/enterprise/enhanced_ldap.md
2022-04-26 14:14:48 +02:00
owensmallwood
7dc28d4083
Adds replace directive for tidwall/gjson (#48083)
* Adds replace directive for tidwall/gjson

* uses more recent version of gjson
2022-04-22 09:32:00 -06:00
Ezequiel Victorero
e9ad2207be
Chore: bump github.com/containerd/containerd to 1.6.2 (#48003) 2022-04-22 11:59:10 -03:00
Ezequiel Victorero
1566fa2ede
Chore: bump github.com/microcosm-cc/bluemonday to 1.0.18 CVE-2021-29272 (#48011) 2022-04-22 10:40:27 -03:00
Artur Wierzbicki
9f0b6a5754
Storage: refactor filtering, improve performance (#47403)
* Storage: refactor filtering, improve performance

* added a comment to `newpathfilter`

* after merge fixes
2022-04-21 23:27:43 +04:00
owensmallwood
6910da6221
upgrades sentry-go to 0.13.0 and replaces gin with v1.7.7 due to CVE https://github.com/advisories/GHSA-h395-qcrw-5vmq (#48000) 2022-04-21 11:23:54 -06:00
Andres Martinez Gotor
f50cd90301
Cloudwatch: Update grafana-aws-sdk (#48039) 2022-04-21 17:20:03 +02:00
lean.dev
600ad35978
Upgrading version of github.com/tidwall/match to v1.1.1 (#47996)
To fix CVE-2020-26066 security issue
2022-04-21 10:47:03 -03:00
Ryan McKinley
031a8e140a
Chore: upgrade gocloud.dev and go mod tidy (#47797) 2022-04-15 07:48:44 -07:00
sam boyer
2a178bd73c
Introduce coremodels framework (extracted from intent-api) (#47653)
* Copy over most of coremodel from intent-api branch

* Fix import paths

* Fix incorrect provider name

* Add root compgen file, fixup componentroot.yaml

* go mod tidy

* Remove compgen for now

* Add dashboard coremodel

* Remove datasource coremodel, for now

* Tweak comments on dashboard struct model

* devenv: add dashboard testing directly

* Fixup dashboard schema for openness, heatmap

* Update Thema to tip

* Fix wire/registry references

* Fix hclog version
2022-04-14 14:54:35 -04:00
dependabot[bot]
232d880fe0
Bump go.opentelemetry.io/otel/trace from 1.2.0 to 1.6.3 (#47544)
Bumps [go.opentelemetry.io/otel/trace](https://github.com/open-telemetry/opentelemetry-go) from 1.2.0 to 1.6.3.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.2.0...v1.6.3)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/trace
  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>
2022-04-13 10:58:20 +03:00
Kristin Laemmert
884e06ec45
chore: go mod tidy (#47648) 2022-04-12 10:46:22 -04:00
ying-jeanne
0bf889e058
Fix unmaarshal of double pointer (#47586)
* Fix unmaarshal of double pointer

* update sdk version
2022-04-12 09:30:34 +02:00
Martin
460b8e85d7
Build: bump gonum library version to fix #46759 (#46997) 2022-04-06 18:10:58 +02:00
Joan López de la Franca Beltran
2c2cf10405
Azure: Update Azure SDK dependencies (#46535)
* Azure: Update Azure SDK dependencies

* Add missing underscore imports for extensions
2022-04-06 10:19:04 +02:00
Sergey Kostrukov
5675496f6b
Migrate to Grafana Azure SDK (#47232) 2022-04-04 11:23:13 +02:00
Tania B
8c622c1ef6
Datemath: Fix weekstart calculation (#46962)
* Update go-datemath version

* Remove unnecessary bits

* fixup! Remove unnecessary bits
2022-03-26 19:57:29 +01:00
Todd Treece
41f3d56c3f
Chore: Update grafana-plugin-sdk-go to v0.129.0 (#46544) 2022-03-14 13:32:11 -04:00
Artur Wierzbicki
a8b90d9a25
FileStore: add basic file storage API (#46051)
* #45498: fs API alpha

* #45498: remove grafanaDS changes for filestorage.go

* #45498: fix lint

* #45498: fix lint

* #45498: remove db file storage migration

* #45498: linting

* #45498: linting

* #45498: linting

* #45498: fix imports

* #45498: add comment

* remove StorageName abstractions

* FileStore: add dummy implementation (#46071)

* #45498: bring back grafanaDs changes, add dummy filestorage

* #45498: rename grafanaDs to public

* #45498: modify join

* #45498: review fix

* #45498:  unnecessary leading newline (whitespace) IMPORTANT FIX

* #45498: fix belongsToStorage

* #45498: fix removeStoragePrefix so that it works with abs paths

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-03-03 10:53:26 +04:00
Andres Martinez Gotor
737b95e9f4
CloudWatch: Upgrade grafana-aws-sdk version (#45725) 2022-02-22 14:35:02 +01:00
Sofia Papagiannaki
d718ee1918
SQLStore: Prevent concurrent migrations (#44101)
* SQLStore: Prevent concurrent migrations

* Hide behind a feature toggle

* Configurable locking attempt timeout

* Update docs/sources/administration/configuration.md

Co-authored-by: Igor Suleymanov <radiohead@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-02-15 18:54:27 +02:00
Will Browne
3fbe4801b7
Plugins: Update collect metrics handler to latest signature (#45166)
* use updated collect metrics handler

* use proto helper
2022-02-09 17:36:53 +01:00
Will Browne
fc42dfe396
Auth: Guarantee consistency of signed SigV4 headers (#45054)
* use latest sigv4 changes

* update configuration docs

* lint

* reformat lint ignore

* specific version for docs
2022-02-08 14:48:17 +01:00
Sofia Papagiannaki
35fe58de37
API: Extract OpenAPI specification from source code using go-swagger (#40528)
* API: Using go-swagger for extracting OpenAPI specification from source code

* Merge Grafana Alerting spec

* Include enterprise endpoints (if enabled)

* Serve SwaggerUI under feature flag

* Fix building dev docker images

* Configure swaggerUI

* Add missing json tags

Co-authored-by: Ying WANG <ying.wang@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-02-08 13:38:43 +01:00
Todd Treece
fd14112dbd
Chore: update grafana-plugin-sdk-go to v0.125.0 (#44685) 2022-01-31 22:50:36 -05:00
Emil Tullstedt
ae2595e86a
Chore: Upgrade go-datemath dependency (#44592)
* Datemath: Upgrade dependency

* go mod tidy
2022-01-31 15:17:48 +01:00
Dave Henderson
3d865a3687
Update dependency github.com/influxdata/influxdb-client-go/v2 to v2.6.0 (#44225)
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
2022-01-20 23:31:16 +01:00
Todd Treece
f4a0f21b3c
Chore: Update grafana-plugin-sdk-go and containerd dependencies (#44226) 2022-01-20 09:06:26 -05:00
Andres Martinez Gotor
4e1c7e868e
Cloudwatch: use the backend HTTP client provider (#44036) 2022-01-18 09:34:12 +01:00
Emil Tullstedt
df4e9ca12b
Datemath: Support fiscal years (#43558) 2022-01-04 13:56:34 +01:00
Tania B
c1be17bec7
Chore: Add Google Cloud KMS dependency (#43211)
* Encryption: Add Google Cloud KMS dependency

* Change version
2021-12-21 14:15:27 +02:00
Kyle Brandt
e1be23ac1e
Chore: update image-spec indirect dependency (#43155)
for GHSA-77vh-xpmg-72qh
2021-12-20 13:24:46 +01:00
Kyle Brandt
4c59cc4bf4
Chore: Update indirect dependency containerd (#43151)
for GHSA-5j5w-g665-5m35 and GHSA-c2h3-6mxw-7mvq
2021-12-17 17:01:45 +01:00
Kyle Brandt
c50f0d1dd1
Chore: update uap-go (#43285)
for CVE-2021-21317
2021-12-17 10:43:43 -05:00
Marcus Efraimsson
18d909beed
Chore: Go mod tidy (#43220) 2021-12-16 17:22:10 +01:00
Alexander Emelin
f4cc353225
Live: proxy subscribe data for subscribe and runstream plugin calls (#42824)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-12-14 20:12:00 +03:00
Serge Zaitsev
f5802878f1
Chore: Move remaining web framework code to pkg/web, remove macaron binding module (#43018)
* remove macaron binding dependency

* completely purge macaron binding

* move everything to pkg/web

* remove non-go files from pkg/web

* clean up leftovers of macaron imports

* make linter happy
2021-12-13 15:56:14 +01:00
idafurjes
d993b12415
Add interface Tracer, add Opentelemetry (#41963)
* Add interface Tracer, add Opentelemetry

* Fix lint

* Fix failing tests and return error if config not parsed fo opentelemetry

* Update defaults.ini

Add comment with jaeger url

* go mod tidy

* Remove comments that are not needed

* Move OpentracingSpan to tracing.go

* Add opentelemetry to sample.ini
2021-12-01 17:05:08 +01:00
Alexander Emelin
7b95c86821
up plugin sdk to v0.118.0 (#42167) 2021-11-24 12:03:19 +03:00
sam boyer
8a06e89d2f
Update cuetsy to latest (#42015)
This update adds fixes and workarounds related to enum generation.
2021-11-19 23:39:21 +01:00
Jean-Philippe Quéméner
b9cdad3814
Alerting: support mute timings configuration through the api for the embedded alertmanager (#41533)
* Alerting: accept mute_timing_intervals through the api for the embedded alertmanager

* add workaround for mutetimeinterval

* add mute timings to routes

* revert changes

* Update pkg/services/ngalert/api/api_alertmanager.go

* Update pkg/services/ngalert/api/api_alertmanager.go

* Update pkg/services/ngalert/api/api_alertmanager.go

* update prometheus/alertmanager dependency

* add some var docs
2021-11-19 16:50:55 +01:00
Marcus Efraimsson
ea4e711fe3
Datasource: Fix stable sort order of query responses (#41868)
Fixes #41773
Fixes #41303
Ref grafana/grafana-plugin-sdk-go#366
Ref #39614
2021-11-18 16:57:20 +01:00
Marcus Efraimsson
a840e9612e
Chore: Upgrade grafana-plugin-sdk-go to v0.116.0 (#41652) 2021-11-15 13:22:10 +01:00
Alexander Emelin
e0b59fe8ce
live: move back to ojg (#41642) 2021-11-13 15:14:13 +03:00
Isabella Siu
fc3d3ff003
CloudMonitoring: Move data manipulation to backend (#41379) 2021-11-10 08:58:04 -05:00
Selene
a3b9c764d3
Encryption: Add Azure key vault dependency (#41353)
* Add Azure key vault dependency

* Fix go.mod

Co-authored-by: Leonard Gram <leo@xlson.com>
2021-11-09 19:33:54 +02:00
Alexander Emelin
bc432ef2b8
update centrifuge to v0.18.8 (#41394) 2021-11-08 18:52:12 +03:00
Marcus Efraimsson
e31bd2df2f
Chore: Go mod tidy (#41374) 2021-11-08 14:05:02 +01:00
Serge Zaitsev
993c60d36e
Chore: Remove GoConvey dependency (#41146) 2021-11-01 14:56:18 +01:00
Yuriy Tseretyan
a1e1a728ad
Alerting: Update references to alertmanager (#40904)
* update module reference for alertmanager
* remove workaround
2021-10-29 10:03:51 -04:00
Kevin Minehart
4c969081bc
fix the root Dockerfile and add additional .dockerignore rules (#41006)
* fix the root Dockerfile and add additional .dockerignore rules

* Update go.mod/go.sum and ubuntu dockerfile
2021-10-28 09:41:10 -05:00
Will Browne
728a59f013
bump for CVE-2021-37219 CVE-2021-32574 CVE-2021-36213 (#40947) 2021-10-26 17:20:55 +02:00
Isabella Siu
97df4a57f4
GoogleCloudMonitoring: use grafana-google-sdk-go for auth (#40490) 2021-10-21 16:29:56 -04:00
Kevin Minehart
9c2d70ce0f
Packaging: Dependency updates (#40534)
* update loki

* install openssl from alpine's edge repository

* extracttraceid moved to tracing package

* remove exit if warning limit is exceeded

* disable flaky libraryelements test
2021-10-18 19:50:10 +02:00
Alexander Zobnin
d13c799aa6
Replace SAML library with fork (#40149)
* Update saml library to latest

* Use fork of crewjam/saml with fix for certificate chain bug
2021-10-08 14:19:04 +03:00
Alexander Emelin
5358c45a3a
Live: array for Processor, Outputter and Subscriber in channel rule top level (#39677) 2021-10-06 20:43:25 +03:00
gotjosh
6572017ec7
Alerting: Allow more characters in label names so notifications are sent (#38629)
Remove validation for labels to be accepted in the Alertmanager, This helps with datasources that produce non-compatible labels.

Adds an "object_matchers" to alert manager routers so we can support labels names with extended characters beyond prometheus/openmetrics. It only does this for the internal Grafana managed Alert Manager.

This requires a change to alert manager, so for now we use grafana/alertmanager which is a slight fork, with the intention of going back to upstream.

The frontend handles the migration of "matchers" -> "object_matchers" when the route is edited and saved. Once this is done, downgrades will not work old versions will not recognize the "object_matchers".

Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
2021-10-04 15:06:40 +02:00
sam boyer
c786d22705
Schema: introduce CLI command to convert all CUE files to TS (#39694)
* First pass at cuetsify command

* Update go deps

* Small tweaks to input cue files

* Correct ts import structure, whitespace

* Latest version of cuetsy

* add ordinal option

* upate cue file

* Fix merge garbage

* Remove dead code

* Revert "upate cue file"

This reverts commit e40b1df83e.

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-29 04:59:05 -04:00
ying-jeanne
580cdc46fc
[Chore] update to cue v0.4.0 (#39641)
* change global flag to flagset

* update pr with comments

* replace flag.args by flagset

* fix build

* migrate the schema package to use cue 4.0

* fix the load package
2021-09-28 11:09:09 -04:00
Serge Zaitsev
dfbd7bf64f
Chore: Update goxmldsig dependency (#39566) 2021-09-23 12:33:31 +02:00
Santiago
342ac0641a
Upgrade Prometheus packages and related dependencies (#39303)
* Upgrade Prometheus packages and related dependencies

* Update CHANGELOG.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-09-21 17:51:47 -03:00
Andres Martinez Gotor
64c8d32fe7
Use sdk pkg for gtime (#39354) 2021-09-21 13:08:52 +02:00
Todd Treece
1781c8ec7d
Chore: Add go-redis v8 dependency (#39442)
* adds redis v8 client dependency

* remove go-redis v5 dependency
2021-09-20 22:21:59 +02:00
Santiago
c3cf95f383
Revert "Alerting: add template funcs (#38404)" (#39258)
This reverts commit d6fb0181fb.
2021-09-15 19:47:22 -03:00
Santiago
d6fb0181fb
Alerting: add template funcs (#38404)
* Alerting: (wip) add template funcs

* Alerting: (wip) numeric template functions

* Alerting: (wip) template functions

* Test for the "args" function

* Alerting: (wip) Documentation for template functions

* Alerting: template functions - refactor

* code review changes

* disable linter error

* Use Prometheus implementation of TemplateExpander

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-grafana-managed-rule.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-09-15 18:48:29 -03:00
Alexander Emelin
548b4daa49
Live: up centrifuge to v0.18.4 (#39139) 2021-09-14 11:31:04 -07:00