Commit Graph

399 Commits

Author SHA1 Message Date
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