Chore: Use the promlib v0.0.1 (#84210)

* use the promlib v0.0.1

* add a readme

* go mod update

* replace promlib

* update readme

* update

* update go work sum

* update 2

* update readme
This commit is contained in:
ismail simsek 2024-03-12 14:25:32 +01:00 committed by GitHub
parent 0cb9f2bb8d
commit ae70cd953d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 21 additions and 0 deletions

6
go.mod
View File

@ -463,6 +463,11 @@ require github.com/spyzhov/ajson v0.9.0 // @grafana/grafana-app-platform-squad
require github.com/fullstorydev/grpchan v1.1.1 // @grafana/backend-platform
// This needs to be here for other projects that import grafana/grafana
// For local development grafana/grafana will always use the local files
// Check go.work file for details
require github.com/grafana/grafana/pkg/promlib v0.0.1 // @grafana/observability-metrics
require (
github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c // indirect
github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40 // indirect
@ -513,3 +518,4 @@ exclude github.com/mattn/go-sqlite3 v2.0.3+incompatible
// Use our fork xorm. go.work currently overrides this and points to the local ./pkg/util/xorm directory.
replace xorm.io/xorm => github.com/grafana/grafana/pkg/util/xorm v0.0.1

1
go.sum
View File

@ -2199,6 +2199,7 @@ github.com/grafana/grafana/pkg/apimachinery v0.0.0-20240226124929-648abdbd0ea4 h
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20240226124929-648abdbd0ea4/go.mod h1:vrRQJuNprTWqwm6JPxHf3BoTJhvO15QMEjQ7Q/YUOnI=
github.com/grafana/grafana/pkg/apiserver v0.0.0-20240226124929-648abdbd0ea4 h1:tIbI5zgos92vwJ8lV3zwHwuxkV03GR3FGLkFW9V5LxY=
github.com/grafana/grafana/pkg/apiserver v0.0.0-20240226124929-648abdbd0ea4/go.mod h1:vpYI6DHvFO595rpQGooUjcyicjt9rOevldDdW79peV0=
github.com/grafana/grafana/pkg/promlib v0.0.1 h1:R+z+xC4vhG3jgMjIJ2cbUjMQdc1HSJHFQWdIWUPCG4Q=
github.com/grafana/grafana/pkg/util/xorm v0.0.1 h1:72QZjxWIWpSeOF8ob4aMV058kfgZyeetkAB8dmeti2o=
github.com/grafana/grafana/pkg/util/xorm v0.0.1/go.mod h1:eNfbB9f2jM8o9RfwqwjY8SYm5tvowJ8Ly+iE4P9rXII=
github.com/grafana/kindsys v0.0.0-20230508162304-452481b63482 h1:1YNoeIhii4UIIQpCPU+EXidnqf449d0C3ZntAEt4KSo=

View File

@ -404,6 +404,7 @@ github.com/grafana/e2e v0.1.1-0.20221018202458-cffd2bb71c7b/go.mod h1:3UsooRp7yW
github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586 h1:/of8Z8taCPftShATouOrBVy6GaTTjgQd/VfNiZp/VXQ=
github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586/go.mod h1:PGk3RjYHpxMM8HFPhKKo+vve3DdlPUELZLSDEFehPuU=
github.com/grafana/grafana-plugin-sdk-go v0.212.0/go.mod h1:qsI4ktDf0lig74u8SLPJf9zRdVxWV/W4Wi+Ox6gifgs=
github.com/grafana/grafana/pkg/promlib v0.0.1/go.mod h1:zkmF4NeKJs/y65xc3/XXc53LY0J8E7YUsZnn+FSrcq4=
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1/go.mod h1:YvJ2f6MplWDhfxiUC3KpyTy76kYUZA4W3pTv/wdKQ9Y=
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU=

13
pkg/promlib/README.md Normal file
View File

@ -0,0 +1,13 @@
# promlib
Prometheus Library (a.k.a. promlib) is the foundation of the Grafana Prometheus data source backend.
### How to tag/version?
- Checkout the commit you want to tag (`git checkout <COMMIT_SHA>`)
- Run `git tag <VERSION>` (For example v0.0.12)
- NOTE: We're using Lightweight Tags, so no other options are required
- Run `git push origin <VERSION>`
- Verify that the tag was created successfully [here](https://github.com/grafana/grafana/tags)
- DO NOT RELEASE anything! Tagging is enough.
- After tagging and waiting 5-10 minutes for go module registry to catch up just bump the `promlib` version on grafana/grafana