Kevin Minehart
8e9aa45716
[10.4.x] backport CI / release changes ( #89631 )
...
* Chore: Add go workspace (#83191 )
---------
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com >
* CI: Make pkg/build its own module, remove unused Grafana modules in go.mo… (#89243 )
* Make pkg/build its own module, remove unused Grafana modules in go.mod/go.sum
* fix go.work format
* log errors on file close errors
* CI: Add release-pr workflow (#89005 )
* Add release-pr workflow
* update CODEOWNERS
* CI: Trigger release pr workflow when a release is completed (#89062 )
* Automation: Verify release artifacts on grafana.com (#89197 )
* baldm0mma/verify_release/ create verify_release_for_download function
* baldm0mma/verify_release/ add name, image, env
* baldm0mma/verify_release/ add initial commands
* baldm0mma/verify_release/ add deps?
* baldm0mma/verify_release/ update location
* baldm0mma/verify_release/ add anno to lib-star
* bald0mma/verify_release/ update func name to verify_grafanacom_step
* baldm0mma/verify_release/ add verify shell script
* baldm0mma/verify_release/ add script content, first attempt
* baldm0mma/verify_release/ add node image to verify_grafanacom_step
* baldm0mma/verify_release/ add gcom secret note
* baldm0mma/verify_release/ add sudo to apt-get
* baldm0mma/verify_release/ add anno
* baldm0mma/verify_release/ add anno to secrets
* baldm0mma/verify_release/ update commands to reflect node env image
* baldm0mma/verify_release/ update annos
* baldm0mma/verify_release/ update tag variable
* baldm0mma/verify release/ add whitespace
* baldm0mma/verify_releases/ update with no bash loops
* baldm0mma/verify_release/ update exit logic
* baldm0mma/verify_release/ remove annos
* baldm0mma/verify_releasse/ resign and build yml
* baldm0mma/verify_release/ remove annos
* baldm0mma/verify_release/ update signature
* baldm0mma/verify_release/ download curl
* baldm0mma/verify_release/ remove temp key folder removal
* baldm0mma/verify_release/ account for artifact download time
* baldm0mma/verify_release/ add anno
* baldm0mma/verify_release/ update location
* baldm0mma/verify_release/ update script
* baldm0mma/verify_release/ make drone
* baldm0mma/verify_release/ update script for oss or ent
* baldm0mma/verify_release/ add promotion option
* baldm0mma/verify_release/ make drone
* Update scripts/drone/events/release.star
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com >
* Update scripts/drone/steps/lib.star
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com >
* Update scripts/drone/steps/lib.star
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com >
* baldm0mma/verify_release/ update drone
* Update scripts/drone/events/release.star
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com >
* baldm0mma/verify_release/ update drone
* Update scripts/drone/steps/lib.star
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com >
* Apply suggestions from code review
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com >
* baldm0mma/update drone
* baldm0mma/verify_release/ update path
* baldm0mma/verify_release/ make drone
* baldm0mma/update drone
* Apply suggestions from code review
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com >
* baldm0mma/verify_release/ update for loop to account for failure
* baldm0mma/verify_release/ make drone
* baldm0mma/verify_release/ make format-drone
* baldm0mma/verify_release/ rem unused var
---------
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com >
---------
Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com >
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com >
Co-authored-by: Jev Forsberg <46619047+baldm0mma@users.noreply.github.com >
2024-06-24 15:06:53 -05:00
ismail simsek
916a7bbb08
Prometheus: Move converter in prometheus package ( #82269 )
...
* use jsoniter from sdk
* move converter into the prometheus
* remove jsonitere
* unit test
* remove redundant ownership
2024-02-15 15:09:30 +01:00
Ryan McKinley
3482c8ef09
Chore: Add omit wrapper for xorm ( #82476 )
2024-02-14 12:19:46 -08:00
ismail simsek
63670b7adc
Chore: Use jsoniter in prometheus from grafana-plugin-sdk-go ( #82359 )
...
use jsoniter from grafana-plugin-sdk-go
2024-02-13 21:19:13 +01:00
Jo
6f62d970e3
JWT Authentication: Add support for specifying groups in auth.jwt for teamsync ( #82175 )
...
* merge JSON search logic
* document public methods
* improve test coverage
* use separate JWT setting struct
* correct use of cfg.JWTAuth
* add group tests
* fix DynMap typing
* add settings to default ini
* add groups option to devenv path
* fix test
* lint
* revert jwt-proxy change
* remove redundant check
* fix parallel test
2024-02-09 16:35:58 +01:00
Diego Augusto Molina
b02f0b926a
Settings: Fix data race when dynamically overriding settings with environment variables ( #81667 )
...
Chore: Fix data race when dynamically overriding settings with environment variables
2024-02-05 12:25:54 -03:00
Kyle Brandt
1b155a02fd
Prometheus: (Dataplane) Set FrameTypeVersion on Scalar type responses ( #81491 )
...
So expressions (SSE) and recorded queries (RQ) detect the response correctly
2024-01-29 11:39:23 -05:00
Ryan McKinley
c9ff6a9ab9
Chore: Generate shorter UIDs ( #79843 )
2024-01-24 11:27:46 -08:00
Sven Grossmann
e1aa8a95d9
Loki: Fix bug duplicating parsed labels across multiple log lines ( #80292 )
2024-01-11 15:09:13 +01:00
Will Browne
78ae795e06
Plugins: Fix loading of dist folders ( #80015 )
...
* end to end
* tidy
* fix whitespace
* remove unused code
* fix linter
* fix gosec + add sort
* fix test
* apply cr feedback
2024-01-08 11:45:03 +01:00
Serge Zaitsev
4f70586ead
Chore: Remove mssql driver from xorm ( #79930 )
...
remove mssql driver from xorm
2024-01-02 17:11:35 +01:00
Will Browne
ef60c90dfa
Plugins: Make file system path handling in tests OS agnostic ( #79651 )
...
* make path handling OS agnostic
* PR feedback
* fix input for test case
2023-12-19 11:01:48 +01:00
Ryan McKinley
9849c954a3
Chore: remove the entity kind registry ( #79178 )
2023-12-06 14:00:53 -08:00
Ryan McKinley
3299809977
Chore: remove unused math function ( #79120 )
2023-12-06 01:38:48 -08:00
Gabriel MABILLE
ef2c79d22a
Chore: use errutil for pluginRepo errors ( #78647 )
...
* Chore: use errutil for pluginRepo errors
* Update pkg/util/errutil/status.go
* Use errutil helper functions
Co-Authored-By: Marcus Efraimsson <marcus.efraimsson@gmail.com >
* Forgot the log level
* Use entity
---------
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com >
2023-11-30 15:49:27 +01:00
Sven Grossmann
44586df7bf
Loki: Fix scope of labels variable being wrong ( #78417 )
...
fix scope of labels var
2023-11-21 10:14:21 +01:00
Sven Grossmann
a01f8c5b42
Loki: Add backend functionality to parse structured metadata from Loki ( #77361 )
...
* prepare backend for structured metadata
* add `lokiStructuredMetadata` feature toggle
* use `lokiStructuredMetadata` feature flag
* add field type check to `labelTypesField`
* remove fixme
* fix feature toggle
* add field in dataplane mode
* use `data.Labels` where possible
* adjust framing tests
* improve verbiage
* improve naming
* update tests to "attributes"
2023-11-16 17:06:14 +01:00
Will Browne
26bcfe300f
Plugins: Follow root level dist and siblings when walking file system ( #78042 )
...
* simplify
* add comments
* tidy up
* remove line
* update comment
* fix pfs test
* fix err import
* delete code
2023-11-14 10:31:46 +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
d5f749482a
Ignore dist folder for core plugin ( #77549 )
2023-11-02 14:56:47 +01:00
Alexander Zobnin
cad3c43bb1
Team LBAC: Move middleware to enterprise ( #76969 )
...
* Team LBAC: Move middleware to enterprise
* Remove ds proxy part
* Move utils to enterprise
2023-10-24 14:06:18 +03:00
Alexander Zobnin
5563f2f98f
Team LBAC: Fix multiple header values ( #76821 )
...
* Team LBAC: Fix multiple header values
Co-authored-by: Eric Leijonmarck <eleijonmarck@users.noreply.github.com >
* Fix linter error
---------
Co-authored-by: Eric Leijonmarck <eleijonmarck@users.noreply.github.com >
2023-10-19 17:09:53 +02:00
Eric Leijonmarck
17fe1d3fc7
Team LBAC: Refactor to use only the teamHeader json part ( #76756 )
...
* refactor: to check for feature toggle and for checking for jsonData field
* fix tests
* whitelisting of X-Prom-Label-Policy Header
2023-10-18 16:09:22 +01:00
Eric Leijonmarck
be5ba68132
Team LBAC: Add teamHeaders for datasource proxy requests ( #76339 )
...
* Add teamHeaders for datasource proxy requests
* adds validation for the teamHeaders
* added tests for applying teamHeaders
* remove previous implementation
* validation for header values being set to authproxy
* removed unnecessary checks
* newline
* Add middleware for injecting headers on the data source backend
* renamed feature toggle
* Get user teams from context
* Fix feature toggle name
* added test for validation of the auth headers and fixed evaluation to cover headers
* renaming of teamHeaders to teamHTTPHeaders
* use of header set for non-existing header and add for existing headers
* moves types into datasources
* fixed unchecked errors
* Refactor
* Add tests for data model
* Update pkg/api/datasources.go
Co-authored-by: Victor Cinaglia <victor@grafana.com >
* Update pkg/api/datasources.go
Co-authored-by: Victor Cinaglia <victor@grafana.com >
---------
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com >
Co-authored-by: Victor Cinaglia <victor@grafana.com >
2023-10-17 11:23:54 +01:00
Marcus Efraimsson
90631360eb
Instrumentation: Handle context.Canceled ( #75867 )
...
Ref #68480
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com >
2023-10-10 12:28:39 +02:00
Marcus Efraimsson
e4c1a7a141
Tracing: Standardize on otel tracing ( #75528 )
2023-10-03 14:54:20 +02:00
Karl Persson
684d68365e
IDforwarding: forward signed id to plugins ( #75651 )
...
* Plugins: Add client middlware that forwards the signed grafana id token if present
* DsProxy: Set grafana id header if id token exists
* Add util function to apply id token to header
* Only add id forwarding middleware if feature toggle is enabled
* Add feature toggles to ds proxy and check if id forwarding is enabled
* Clean up test setup
* Change to use backend.ForwardHTTPHeaders interface
* PluginProxy: Forward signed identity when feature toggle is enabled
* PluginProxy: forrward signed id header
2023-10-02 09:14:10 +02:00
Kyle Brandt
b87279b8d8
Prometheus: Fix creation of invalid dataframes with exemplars ( #75187 )
...
for #73654
2023-09-21 07:30:14 -04:00
Marcus Efraimsson
8ee43f3705
Instrumentation: Add status_source label to request metrics/logs ( #74114 )
...
Ref #68480
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com >
2023-09-11 12:13:13 +02:00
Yuri Tseretyan
99fd7b8141
Alerting: Update provisioning to validate user-defined UID on create ( #73793 )
...
* add ValidateUID to util
* provisioning to validate UID on rule creation
---------
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com >
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com >
2023-09-08 15:09:35 -04:00
ismail simsek
3107459e57
Prometheus: Handle the response with different field key order ( #74567 )
...
* Handle the response with different field key order
* More unit tests to cover edge cases
* Cover more edge cases
* make it simpler
* Better test inputs
2023-09-08 19:58:05 +02:00
Jo
dcf06658eb
Chore: Implement requester in util pkg ( #74105 )
...
implement requester changes that do not impact functionality
2023-08-31 09:46:55 +02:00
Ryan McKinley
025b2f3011
Chore: use any rather than interface{} ( #74066 )
2023-08-30 18:46:47 +03:00
Kyle Brandt
38603b1a9e
Prometheus: Check for errors on json response parsing ( #73788 )
...
- The util/converter Prometheus response json parse was not checking for errors while parsing. It now does. In particular, if `[dataproxy]/response_limit` is set in Grafana's config, it will now recognize the limit error.
- Fixes #73747
- Adds `jsonitere` package, which wraps json-iterator/go's Iterator's Methods with methods that return errors, so errcheck linting can be relied upon
- Impact:
- If something was sending malformed JSON to the prometheus or loki datasources, the previous code might have accepted that and partially processed the data
- Before there may have been partial data with no error, where as no there may be errors but they will have no partial results, just the error.
2023-08-28 15:53:50 +03:00
Kyle Brandt
6d8fc42cdd
Prometheus: (Chore) Remove experimental unshipped prometheusWideSerie… ( #73751 )
2023-08-24 17:47:19 +03:00
Marcus Efraimsson
040b7d2571
Chore: Add errutils helpers ( #73577 )
...
Add helpers for the errutil package in favor of errutil.NewBase.
2023-08-22 12:52:24 +02:00
Kyle Brandt
ebc6288191
errutil: (Chore) Make PublicError fulfill error ( #71945 )
2023-07-19 09:52:49 -04:00
ismail simsek
81ba27c149
Feat: Match allowed cookies with optional character ( #71047 )
...
* Match allowed cookies with optional character
* Use strings package
2023-07-05 16:12:56 +02:00
Yuri Tseretyan
2e0dae8fa0
Chore: Fix DiffReporter.Paths to properly initialize slice ( #70870 )
2023-06-28 18:08:05 -04: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
Jean-Philippe Quéméner
fe2103bfc8
Util: Fix panic when generating UIDs concurrently ( #69476 )
2023-06-05 11:21:11 +02:00
venkatbvc
b9e53f628f
HTTP: Add TLS version configurability for Grafana server ( #67482 )
...
Co-authored-by: Rao B V Chalapathi <b_v_chalapathi.rao@nokia.com >
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com >
2023-05-08 17:11:36 +02:00
Ieva
848f1f0fb2
Chore: change default log level ( #64304 )
...
raise log level
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com >
2023-05-05 15:45:48 +01:00
Emil Tullstedt
cefeef7134
Proxy: Improve header handling for reverse proxy ( #67279 )
2023-04-27 13:30:11 +02:00
Kevin Minehart
405bda7e99
Packaging: Added deprecation warnings when running grafana-cli or grafana-server; the grafana command should be used instead. ( #66976 )
...
* Add grafana-cli and grafana-server deprecation warnings
* remove extra :
2023-04-20 19:51:50 +02:00
Dan Cech
7e765c870a
Utils: Reimplement util.GetRandomString to avoid modulo bias ( #64481 )
...
* reimplement GetRandomString, add tests that results are unbiased
2023-04-20 10:24:02 -04:00
Gábor Farkas
8e03badfa2
Prometheus: Enable converter tests ( #66378 )
...
* converter: enable tests
* updated snapshot tests
---------
Co-authored-by: Kyle Brandt <kyle@grafana.com >
2023-04-13 09:10:04 +02:00
Gábor Farkas
d830591cdc
Revert "Prometheus: Reduce allocations parsing exemplars" ( #66367 )
...
Revert "Prometheus: Reduce allocations parsing exemplars (#58959 )"
This reverts commit a1f2d0e205 .
2023-04-12 14:45:21 +02:00
Gábor Farkas
05f7ae6c69
prometheus: slightly different approach for dataplane compatibility ( #65993 )
2023-04-11 12:58:55 +02:00
Emil Tullstedt
be9361cb9e
Logger: Add feature toggle for errors in HTTP request logs ( #64425 )
2023-03-31 15:38:09 +02:00