Commit Graph

40 Commits

Author SHA1 Message Date
Stephanie Hingtgen
4e318e6285
Revert "Chore: Enable cache on golangci linter" (#96069)
Revert "Chore: Enable cache on golangci linter (#95471)"

This reverts commit d5cde0b60a.
2024-11-08 01:05:14 +02:00
Serge Zaitsev
d5cde0b60a
Chore: Enable cache on golangci linter (#95471)
* try to enable cache on golangci linter

* bump version

* exclude G115

* reduce timeout

* remove deprecated linter

* bump linter version in bingo

* try a different syntax for workspace modules

* try another command

* add apps to linter path

* try disabling cue codegen

* skip some linting in devenv

* exclude dirs and try again

* try workaround for pkg

* try path instead of dir

* make it one line

* replace package prefix

* exclude xorm

* exclude wire

* file-based aproach to nolint in workspaces

* missing quote

* simplify command line

* change ownership
2024-11-07 18:15:52 +01:00
Jeff Levin
a21a232a8e
Revert read replica POC (#93551)
* Revert "chore: add replDB to team service (#91799)"

This reverts commit c6ae2d7999.

* Revert "experiment: use read replica for Get and Find Dashboards (#91706)"

This reverts commit 54177ca619.

* Revert "QuotaService: refactor to use ReplDB for Get queries (#91333)"

This reverts commit 299c142f6a.

* Revert "refactor replCfg to look more like plugins/plugin config (#91142)"

This reverts commit ac0b4bb34d.

* Revert "chore (replstore): fix registration with multiple sql drivers, again (#90990)"

This reverts commit daedb358dd.

* Revert "Chore (sqlstore): add validation and testing for repl config (#90683)"

This reverts commit af19f039b6.

* Revert "ReplStore: Add support for round robin load balancing between multiple read replicas (#90530)"

This reverts commit 27b52b1507.

* Revert "DashboardStore: Use ReplDB and get dashboard quotas from the ReadReplica (#90235)"

This reverts commit 8a6107cd35.

* Revert "accesscontrol service read replica (#89963)"

This reverts commit 77a4869fca.

* Revert "Fix: add mapping for the new mysqlRepl driver (#89551)"

This reverts commit ab5a079bcc.

* Revert "fix: sql instrumentation dual registration error (#89508)"

This reverts commit d988f5c3b0.

* Revert "Experimental Feature Toggle: databaseReadReplica (#89232)"

This reverts commit 50244ed4a1.
2024-09-25 15:21:39 -08:00
Todd Treece
d1ffcc22d9
Playlists: Migrate to App SDK codegen (#93246) 2024-09-13 16:27:40 -04:00
Todd Treece
2f01286034
Storage: Add go.mod for apistore (#92224) 2024-08-21 14:32:01 -04:00
Todd Treece
1b0e6b5c09
K8s: Data Plane Aggregator (#91228) 2024-08-13 22:28:17 +03:00
Summer
599f05c5af
Chore: increase lint timeout (#90276) 2024-07-16 09:44:43 -04:00
Li Zeghong
edc1f50c4e
Chore: Remove unnecessary typecheck linter config (#89198) 2024-07-04 02:33:03 +03:00
Todd Treece
9c6d3590a2
Chore: Fix apiserver circular dependencies (#89918) 2024-07-01 11:42:34 -04:00
Dave Henderson
6262c56132
chore(perf): Pre-allocate where possible (enable prealloc linter) (#88952)
* chore(perf): Pre-allocate where possible (enable prealloc linter)

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

* fix TestAlertManagers_buildRedactedAMs

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

* prealloc a slice that appeared after rebase

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

---------

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
2024-06-14 14:16:36 -04:00
Dave Henderson
e21d357d67
chore: Updating linter, fixing some new warnings (#88863) 2024-06-06 13:01:27 -04:00
Arati R
36f42853dd
Storage: Read desired mode from config instead of feature flags (#88353)
* Read desired mode from config
* Update playlist integration tests
* Add mode 1 playlist integration tests
* Add mode 0 dual writing to playlist integration tests
* Add documentation for the different dual writing modes
2024-05-31 19:29:59 +02:00
Arati R
0ffc4c441b
Storage: Add mode reconciliation for modes 1 and 2 (#87919)
* Add skeleton implementation for mode reconciliation between 1 and 2
* Track mode for each dual writer
* Add test for setting dual writer
* Include context when setting dual writing mode

---------

Co-authored-by: Dan Cech <dcech@grafana.com>
2024-05-23 00:12:46 +02:00
Arati R
6836bfe1ea
Storage: Customise setting dual writing modes (#87668)
* Add feature toggles for mode 2 and 3 playlist dual writing
* Make current mode customised based on kind
* Check feature flags when initialising dual writer
* Fix linting
* Refactor NewDualWriter
2024-05-14 14:11:56 +02:00
Arati R
61f3d08c3f
Storage: Add List support for pagination (#87093)
* Add origin keys to List request
* Check origin keys requirement in the sql entity server's List method
* Refactor mode 2 List
* Check origin keys before making Storage List call

---------

Co-authored-by: Dan Cech <dcech@grafana.com>
2024-05-01 08:42:47 +02:00
Marcus Efraimsson
2fc99375df
Chore: Upgrade otel dependencies (#86994)
* Chore: Upgrade otel dependencies

* sdk changes

* ignore deprecated go.opentelemetry.io/otel/exporters/jaeger for now

* use latest commit from sdk branch

* sdk v0.228.0
2024-04-30 15:12:45 +02:00
Gábor Farkas
b02317d583
mysql: decouple sqleng (#86057) 2024-04-15 14:26:15 +02:00
Jo
5340a6e548
Auth: Extended JWT client for OBO and Service Authentication (#83814)
* reenable ext-jwt-client

* fixup settings struct

* add user and service auth

* lint up

* add user auth to grafana ext

* fixes

* Populate token permissions

Co-authored-by: jguer <joao.guerreiro@grafana.com>

* fix tests

* fix lint

* small prealloc

* small prealloc

* use special namespace for access policies

* fix access policy auth

* fix tests

* fix uncalled settings expander

* add feature toggle

* small feedback fixes

* rename entitlements to permissions

* add authlibn

* allow viewing the signed in user info for non user namespace

* fix invalid namespacedID

* use authlib as verifier for tokens

* Update pkg/services/authn/clients/ext_jwt.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* Update pkg/services/authn/clients/ext_jwt_test.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* fix parameter names

* change asserts to normal package

* add rule for assert

* fix ownerships

* Local diff

* test and lint

* Fix test

* Fix ac test

* Fix pluginproxy test

* Revert testdata changes

* Force revert on test data

---------

Co-authored-by: gamab <gabriel.mabille@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2024-04-02 17:45:15 +02:00
Todd Treece
9684a9e39a
Chore: Add depgaurd rules for sub-modules (#84084) 2024-03-25 17:15:36 +00:00
ismail simsek
92f5a0305c
Chore: Define promlib depguard rules (#85082)
* define promlib depguard rules

* add comment

* test: break linting on purpose

* fix linting

* simple change to trigger backend linting/build in CI pipeline
2024-03-25 17:32:56 +01:00
ismail simsek
6137c4e0a6
Chore: Bump golangci-lint v1.57.1 (#84998)
* bump golangci-lint v1.57.1

* update setting

* remove goconst

* fix linting issues

* prettier

* fix G601

* go mod tidy
go work sync
2024-03-25 15:28:24 +01:00
Ida Štambuk
5431c51490
Cloudwatch: Add linting to restrict imports from core (#82538)
---------

Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
2024-02-20 14:52:11 +01:00
Alyssa Bull
2d432d6ff3
Plugins: Externalize Cloud Monitoring data source (#80181) 2024-01-29 09:24:23 -07:00
Joey
6796e66fb8
Pyroscope: Add standalone build (#80222)
* Pyroscope standalone build

* Fix for tests

* Add missing packages

* Remove import

* Update trace to profiles

* Update test
2024-01-16 12:46:15 +00:00
Fabrizio
522519f671
Tempo: Decouple Tempo from Grafana core (#79888) 2024-01-16 11:36:40 +01:00
Andreas Christou
dd77ff6bcd
Plugins: Externalise Azure Monitor data source (#79545)
* Set up frontend linting for Azure

- Fix final frontend import
- Fix other lint issues

* Add Azure Monitor to backend linting

* Remove featuremgmt dependency

* Add intervalv2 to list of disallowed imports

* Remove config dependency

- Replace with function from azure-sdk

* Remove util dependency

* Duplicate interval functionality from core

* Add required backend wrappers

* Update frontend

* Add testing helper

* Add missing package

* Bump minimum grafana dependency

* Fix dependency

* Regen cue

* Fix lint

* Update expected response file

* Update import and dependency
2024-01-03 19:20:22 +00:00
Fabrizio
7746250367
Parca: Add standalone building configuration (#79896)
* Parca: Decouple frontend

* Parca: decouple backend

* Parca: add standalone build process

* Regenerate cue files

* Fix import

* Trigger CI

* Fix test

* Trigger CI

* Trigger CI
2024-01-02 16:36:57 +01:00
Andres Martinez Gotor
c70623fb85
Chore: Rename testdata plugin with a fully qualified name (#75104) 2023-09-22 15:00:40 +03:00
Andres Martinez Gotor
dd8f88b194
Chore: Remove lint exceptions from testdata backend (#75148) 2023-09-21 10:39:28 +02:00
Andres Martinez Gotor
5b2721b4f1
Chore: Add linter rule to avoid imports from Grafana core in test datasource (#71779) 2023-07-18 15:57:31 +02:00
Andres Martinez Gotor
8f76647386
Chore: Update golangci-lint to v1.53.3 (#71771) 2023-07-18 10:03:35 +02:00
Todd Treece
52121b7165
Chore: Add grafana-apiserver (#70721)
* add grafana-apiserver
* remove watchset & move provisioning and http server to background
services
* remove scheme
* otel fixes (#70874)
* remove module ProvideRegistry test
* use certgenerator from apiserver package
* Control collector/pdata from going to v1.0.0-rc8 (as Tempo 1.5.1 would have it)
2023-07-14 12:22:10 -07: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
Dan Cech
cc5211119b
switch from github.com/gofrs/uuid to github.com/google/uuid (#65016)
* switch from github.com/gofrs/uuid to github.com/google/uuid

* add golangci rule to prevent inadvertent reintroduction
2023-03-21 06:31:29 -04:00
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
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
Emil Tullstedt
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
Kyle Brandt
55d2d872ec
Chore: Missed deprecations due to overly broad lint exclusion (#59732) 2022-12-14 12:32:45 +01:00
Emil Tullstedt
f864be5024
Chore: Deny gopkg.in/yaml.v2 (#60187) 2022-12-13 14:31:04 +01: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