Emil Tullstedt
ab0a115372
Annotations: Improve updating annotation tags queries ( #71201 )
...
Annotations: Improve annotation tag updates
2023-07-31 18:19:59 +03:00
Emil Tullstedt
e07fbeef60
Chore: Upgrade Go to 1.20.6 ( #71440 )
2023-07-12 15:32:40 +02:00
Emil Tullstedt
7a9847e196
CI: Provide a Drone promotion to build the build-container ( #71133 )
2023-07-11 13:08:05 +02:00
Emil Tullstedt
5c19272065
Slug: Use urlencoding to support non-ASCII characters ( #70691 )
2023-07-10 21:05:39 +02:00
Emil Tullstedt
56f52dc97e
Annotations: Fix database lock while updating annotations ( #71199 )
2023-07-07 15:21:49 +02:00
Emil Tullstedt
f2bb9fd92a
Docs: Provide absolute paths for set-up-https.md ( #70681 )
...
Fixes #69664
2023-07-04 14:08:37 +00:00
Emil Tullstedt
dfe092d4b4
Chore: Update featuremgmt codeowners ( #69432 )
2023-06-02 15:24:51 +02: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
Emil Tullstedt
cefeef7134
Proxy: Improve header handling for reverse proxy ( #67279 )
2023-04-27 13:30:11 +02:00
Emil Tullstedt
f48ef6ea50
Chore: Upgrade github.com/docker/docker dependency ( #67098 )
2023-04-26 15:02:01 +02:00
Emil Tullstedt
948131aac3
Annotations: Ignore unique constraint violations for tags ( #65935 )
2023-04-18 14:21:38 +02:00
Emil Tullstedt
202afb9041
Chore: Upgrade Go to 1.20.3 ( #66264 )
2023-04-14 10:01:14 +02:00
Emil Tullstedt
e0385d08a8
Correlations: Update feature toggle status to beta ( #66390 )
2023-04-12 17:56:06 +03:00
Emil Tullstedt
be9361cb9e
Logger: Add feature toggle for errors in HTTP request logs ( #64425 )
2023-03-31 15:38:09 +02:00
Emil Tullstedt
b210a39cb7
Dashboards: Evaluate provisioned dashboard titles in a backwards compatible way ( #65184 )
2023-03-28 13:24:19 +02:00
Emil Tullstedt and Sofia Papagiannaki
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
Emil Tullstedt
110b05a0c0
Chore: Upgrade Go to 1.20.1 and Alpine to 3.17 ( #63639 )
2023-02-27 14:50:32 +01:00
Emil Tullstedt and Sofia Papagiannaki
3abaf32cf2
Chore: Upgrade golangci-lint to v1.51.2 ( #63630 )
...
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com >
2023-02-23 15:10:03 +01:00
Emil Tullstedt
c72d18f5e6
Revert "Chore: Upgrade Go to 1.20.1 and Alpine to 3.17 ( #63506 )" ( #63567 )
...
This reverts commit 747ddf7b33 .
2023-02-22 08:14:26 -05:00
Emil Tullstedt
747ddf7b33
Chore: Upgrade Go to 1.20.1 and Alpine to 3.17 ( #63506 )
2023-02-22 11:53:06 +01:00
Emil Tullstedt
0caacb3333
Cookies: Provide a mechanism for per user control over cookies ( #61566 )
2023-02-21 11:19:07 +01:00
Emil Tullstedt
4fd7743b81
Docs: Update backend contribution guidelines ( #63034 )
2023-02-07 15:44:56 +01:00
Emil Tullstedt
10d66405a4
Chore: Remove redundant codegen step from .bra.tom ( #62764 )
2023-02-02 14:53:54 +01:00
Emil Tullstedt
b1151dd118
Login: Fix panic when UpsertUser is called without ReqContext ( #62539 )
2023-01-31 11:16:23 +01:00
Emil Tullstedt
fc47e0d35e
Docs: Update curl example to use --user for basic auth ( #61226 )
2023-01-11 11:18:26 +01:00
Emil Tullstedt
649b50055c
Chore: Move all backend contribution documents to a single directory ( #61140 )
2023-01-11 11:16:52 +01:00
Emil Tullstedt
67661c2535
Fix: Use an existing Dockerfile for the Go image ( #61158 )
2023-01-10 17:11:43 +01:00
Emil Tullstedt
bf574e98c8
Chore: Upgrade Go to 1.19.4 ( #60794 )
2022-12-29 13:03:56 +01:00
Emil Tullstedt
88323a30b7
Logging: Fix running tests multiple times ( #60559 )
...
- Create new ctxLogProviders for each scenario to support
go test -count=n for n>1. Currently, it just kept adding providers for
every new run, which would make it add way more key-value pairs to
the provider than necessary.
- Adding a helper method to the scenario to make it easier to set up tests
for logging and easier to read the tests. I also flattened the test file, to
reduce the complexity of each test function.
2022-12-27 16:42:03 +01:00
Emil Tullstedt
b7fc837c35
Chore: Upgrade golangci-lint to v1.50.1 ( #60379 )
2022-12-15 12:58:48 +01:00
Emil Tullstedt
3188a8288e
Settings: Update reference to go-kit/log ( #60309 )
...
Introduced after last update to #59732.
2022-12-14 12:48:09 +00:00
Emil Tullstedt
f864be5024
Chore: Deny gopkg.in/yaml.v2 ( #60187 )
2022-12-13 14:31:04 +01:00
Emil Tullstedt
f485f8a8f8
Chore: Upgrade Go dependencies ( #59501 )
2022-11-29 16:37:45 +01:00
Emil Tullstedt
990d8cd22e
Chore: Upgrade go-sqlite3 to v1.14.16 ( #58581 )
2022-11-10 15:49:28 +01:00
Emil Tullstedt
75701695d8
pkg/web: avoid shared middleware slice ( #58458 )
2022-11-08 10:58:04 -05:00
Emil Tullstedt
89eba7a108
Server: Write internal server error on missing write ( #57813 )
2022-11-07 16:14:41 +01:00
Emil Tullstedt
1ba25b2baa
Preferences: Create indices ( #48356 )
2022-11-07 15:52:26 +01:00
Emil Tullstedt
428dd54094
Chore: Upgrade Go to 1.19.3 ( #58052 )
2022-11-04 14:50:43 +01:00
Emil Tullstedt and emerson_gong
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
Emil Tullstedt
1e2b7c5368
Errors: Add HTTP writer for errutil.Error ( #57661 )
2022-10-26 16:57:53 +02:00
Emil Tullstedt
2c9526fdf7
Docs: Update errors documentation ( #57402 )
...
Expand on what a base should represent and update some out of date info.
2022-10-21 20:50:29 +02:00
Emil Tullstedt
22756913ba
Errutil: Update documentation for Go 1.19 ( #55807 )
2022-10-07 12:47:43 +02:00
Emil Tullstedt
c2d3a31772
Chore: Upgrade Go to 1.19.2 ( #56355 )
2022-10-07 12:47:24 +02:00
Emil Tullstedt
bb479e030a
RBAC: Redirect to /login when forceLogin is set ( #56469 )
2022-10-07 08:18:56 +02:00
Emil Tullstedt
6aef353b59
Tracing: Fix bug where errors are not reported to OTel ( #55925 )
2022-09-28 15:54:47 +02:00
Emil Tullstedt
b0b1e8d568
Tracing: Document Tracer and Span interfaces ( #55926 )
2022-09-28 15:53:48 +02:00
Emil Tullstedt
f7a3e50b23
UsageStats: Add traces when sending usage stats ( #55474 )
2022-09-26 15:10:54 +02:00
Emil Tullstedt
647997cc4c
Alerting: Fix flaky test ( #55551 )
...
The length of the identifier from the underlying library is 9 or more characters depending on the rate at which the identifiers are generated. See https://pkg.go.dev/github.com/teris-io/shortid
The test previously made the assumption that the length will always be 10, which would intermittently fail.
2022-09-21 14:17:25 +02:00
Emil Tullstedt
c10a69c007
Cleanup: Add traces to cleanup jobs ( #55465 )
2022-09-21 12:01:21 +02:00
Emil Tullstedt
4711454b81
Org: Fix service initialization ( #55460 )
2022-09-20 08:28:47 -04:00
Emil Tullstedt
104388dcc1
Chore: Update swagger to v0.30.2 ( #55159 )
2022-09-14 14:47:19 +00:00
Emil Tullstedt
b287047052
Chore: Upgrade Go to 1.19.1 ( #54902 )
...
* WIP
* Set public_suffix to a pre Ruby 2.6 version
* we don't need to install python
* Stretch->Buster
* Bump versions in lib.star
* Manually update linter
Sort of messy, but the .mod-file need to contain all dependencies that
use 1.16+ features, otherwise they're assumed to be compiled with
-lang=go1.16 and cannot access generics et al.
Bingo doesn't seem to understand that, but it's possible to manually
update things to get Bingo happy.
* undo reformatting
* Various lint improvements
* More from the linter
* goimports -w ./pkg/
* Disable gocritic
* Add/modify linter exceptions
* lint + flatten nested list
Go 1.19 doesn't support nested lists, and there wasn't an obvious workaround.
https://go.dev/doc/comment#lists
2022-09-12 12:03:49 +02:00
Emil Tullstedt
0ffbf901d7
ContextHandler: Use stdlib format for middleware ( #54219 )
2022-08-25 14:35:21 +02:00
Emil Tullstedt
ce7593686d
Errors: Allow using Base as an error type ( #53824 )
2022-08-22 11:07:33 +02:00
Emil Tullstedt
cc777e175e
Chore: Panic! in the Logs ( #53664 )
2022-08-12 13:43:16 +00:00
Emil Tullstedt
78f26a079c
Chore: Upgrade to Go version 1.17.12 ( #52523 )
2022-07-20 14:27:44 +02:00
Emil Tullstedt
c8b5307c61
Preferences: Get home dashboard from teams ( #52225 )
2022-07-14 08:20:11 -04:00
Emil Tullstedt and eleijonmarck
06bd8b8e7a
CSRF: Fix additional headers option ( #50629 )
...
* CSRF: Fix additional headers option
* fix: type assertion on error fail on wrapped error
* Update pkg/middleware/csrf/csrf_test.go
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com >
* update test
Co-authored-by: eleijonmarck <eric.leijonmarck@gmail.com >
2022-07-13 19:28:59 +01:00
Emil Tullstedt
dd6d71ee4b
HTTP: Add function for using new style errors with fallback ( #51627 )
2022-07-13 13:14:28 +02:00
Emil Tullstedt
c12d1727f0
Docker: Update glibc version ( #51107 )
2022-07-06 17:30:56 +02:00
Emil Tullstedt and Jeff Levin
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 and Sofia Papagiannaki
0e7a495829
Docs: Update backend architecture contributor documentation ( #51172 )
...
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com >
2022-06-30 10:47:10 -04:00
Emil Tullstedt
b45c71c9ca
Loki: Create component for sending logs to Loki ( #51500 )
2022-06-30 10:24:44 +02:00
Emil Tullstedt
7d815a1db5
Alerting: Use google/uuid instead of gofrs/uuid ( #51242 )
2022-06-28 11:57:24 +02:00
Emil Tullstedt
f35aa8c7d7
Chore: Update golang.org/x dependencies ( #51028 )
2022-06-20 11:24:21 +02:00
Emil Tullstedt
f1834163ec
ShortURL: Use new Error type ( #50859 )
2022-06-15 15:11:36 +02:00
Emil Tullstedt
929fcd5910
Preferences: Use inmemory structure for testing ( #50491 )
2022-06-14 10:54:19 +02:00
Emil Tullstedt
264c2a9d1e
Errors: Introduce error type with Grafana specific metadata ( #47504 )
2022-06-14 10:50:11 +02:00
3e81fa0716
API: Migrate CSRF to service and support additional options ( #48120 )
...
* API: Migrate CSRF to service and support additional options
* minor
* public Csrf service to use in tests
* WIP
* remove fmt
* comment
* WIP
* remove fmt prints
* todo add prefix slash
* remove fmt prints
* linting fix
* remove trimPrefix
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com >
Co-authored-by: IevaVasiljeva <ieva.vasiljeva@grafana.com >
2022-06-02 15:52:30 +02:00
Emil Tullstedt
39096208ed
Settings: Sunset non-duration based login lifetime config ( #49944 )
2022-06-01 12:29:15 +02:00
Emil Tullstedt
d3ffb9e245
Usage stats: Divide collection into multiple functions to isolate failures ( #49928 )
2022-06-01 10:27:06 +00:00
Emil Tullstedt
51ff2b8c58
Logging: Unify logging fakes ( #48822 )
2022-05-06 17:44:22 +02:00
Emil Tullstedt and Torkel Ödegaard
fc0346fe5b
Dashboards: Use home dashboard from org again ( #48244 )
...
* Dashboards: Use home dashboard from org again
* Set homeDashboardID
Co-authored-by: Torkel Ödegaard <torkel@grafana.com >
2022-04-26 11:46:26 +02:00
Emil Tullstedt
d76e5d7c6a
Usage stats: Detect Prometheus flavors ( #47942 )
...
* Naïve Prometheus flavor detector
* Add concurrency and memoization
* Remove concurrency
* Fix tests
* close response body
* Add tests
2022-04-20 13:51:33 +00:00
Emil Tullstedt
24038d9985
Chore: Update Go version ( #47914 )
...
* Remove makefile (it's not used anymore)
* Directly download and install nodejs package
The Packages file for deb.nodesource.com/node_16.x doesn't list older
versions, so only the most recent version of nodejs is available. We
don't want to require every update to the build container to have to
update nodejs if a never version is available, so I manually download
the deb and install it with dpkg.
* Update Go version
* Update lib.star
* Generate new .drone.yml
2022-04-20 09:14:12 +02:00
Emil Tullstedt
3df625e9f4
UsageStats: Move stats collection to separate service ( #47381 )
...
* Remove specific stats from usage stats service
* Create statscollector service
* refactor
* Update and move tests
Mostly equivalent tests to before, but they've been divided over the two
services and removed the behavior driven legacy from GoConvey to
reduce the complexity of the tests.
* Collect featuremgmr metrics (copied over from #47407 )
I removed the metrics registration from the feature manager in the merge
and re-add them in this commit. Separated to make things easier to
review.
2022-04-08 13:41:26 +02:00
Emil Tullstedt
7bc821baf2
Logger: Use specified format for file logger ( #46970 )
...
Fixes #45941
2022-03-26 11:40:08 +01:00
Emil Tullstedt and Karl Persson
0e5ac29763
Data sources: Grant creator edit permissions to data source by default ( #46168 )
...
* Data sources: Sent user ID when creating data source
* Data sources: Grant a data source creator edit permissions
* Use edit permisison and only append if user id is in command
Co-authored-by: Karl Persson <kalle.persson@grafana.com >
2022-03-21 17:16:05 +01:00
Emil Tullstedt
ae2595e86a
Chore: Upgrade go-datemath dependency ( #44592 )
...
* Datemath: Upgrade dependency
* go mod tidy
2022-01-31 15:17:48 +01:00
Emil Tullstedt and James Brown
25736b6afb
Auth: implement auto_sign_up for auth.jwt ( #43502 )
...
Co-authored-by: James Brown <jbrown@easypost.com >
2022-01-13 17:15:22 +01:00
Emil Tullstedt
fdd196a627
Datemath: Remove unused functions ( #43665 )
2022-01-07 12:53:31 +01:00
Emil Tullstedt
df4e9ca12b
Datemath: Support fiscal years ( #43558 )
2022-01-04 13:56:34 +01:00
Emil Tullstedt
12e0a94316
JWT: Split race-y test into two stable tests ( #41950 )
2021-11-19 12:05:04 +01:00
Emil Tullstedt
dbb8246b6b
JWT: Increase distance from now in tests ( #41794 )
2021-11-17 12:03:56 +01:00
Emil Tullstedt
3b637f4b44
Access control: Redirect non-API calls ( #41100 )
2021-11-04 09:59:52 +01:00
Emil Tullstedt
1505b8c0b0
Docs: Document PKCE support for OAuth ( #39949 )
2021-10-13 16:45:39 +02:00
Emil Tullstedt
e73cd2fdeb
OAuth: Support PKCE ( #39948 )
2021-10-13 16:45:15 +02:00
Emil Tullstedt
de9bcd6163
Docs: Document new exporter for usage insights ( #38593 )
2021-09-22 11:21:53 +02:00
Emil Tullstedt
ad971cc9be
LDAP: Search all DNs for users ( #38891 )
2021-09-14 10:49:37 +02:00
Emil Tullstedt
55efeb0c02
Revert "AccessControl: Implement a way to register fixed roles ( #35641 )" ( #37397 )
...
This reverts commit 88c11f1cc0 .
2021-07-30 13:58:49 +02:00
Emil Tullstedt
dc7a641978
Docs: Fix code sample for access control provisioning ( #35406 )
2021-06-09 13:47:21 +02:00
Emil Tullstedt
96da84ca49
Access control: Rename predefined roles to fixed roles (docs) ( #34472 )
2021-05-26 14:59:24 +02:00
Emil Tullstedt
0f4806db8a
Access control: Rename predefined roles to fixed roles (code) ( #34469 )
...
* s/grafana:roles:/fixed:/
* Update free text references to predefined roles
2021-05-25 15:36:01 +02:00
Emil Tullstedt
c2e761f28e
Access control: Attach ID to error message ( #33472 )
2021-05-12 23:00:27 +02:00
Emil Tullstedt
68cdbb611f
Access control: Use global scope for users permissions ( #33941 )
...
Quick fix. We eventually will want to make users endpoints more aware of
the access control system.
2021-05-11 20:04:29 +02:00
Emil Tullstedt
4496ae496e
Access control: Clean up users scopes ( #33532 )
...
Following discussion in grafana/grafana-enterprise#1292 , removing
org-scoped users scopes to make it clear that the local organization is
the default and the alternative to that is a global scope (for a select
few endpoints)
2021-05-03 10:27:12 +02:00
Emil Tullstedt
840828b5d2
Access control: Allow empty scope requirement lists ( #33518 )
2021-04-29 13:22:13 +02:00
Emil Tullstedt
a87dd17501
UsageStats: Purpose named variables ( #31264 )
2021-02-17 10:19:27 +01:00
Emil Tullstedt and Diana Payton
2a55e00c78
Licensing: Document new v7.4 options and APIs ( #30217 )
...
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com >
2021-01-19 18:09:05 +01:00