Peter Štibraný
c32650e9d8
Replace remaining calls to testing.Short where possible. ( #110765 )
...
* Replace remaining calls to testing.Short where possible.
* Update style guide.
* Revert change in TestAlertmanager_ExtraDedupStage, as it doesn't work.
* Make TestAlertRulePostExport into integration test.
2025-09-09 08:16:12 +00:00
Peter Štibraný
7fd9ab9481
Replace check for integration tests. ( #110707 )
...
* Replace check for integration tests.
* Revert changes in pkg/tsdb/mysql packages.
* Fix formatting of few tests.
2025-09-08 15:49:49 +02:00
Serge Zaitsev
a95fb3a37c
Chore: Omit integration tests if short test flag is passed ( #108777 )
...
* omit integration tests if short test flag is passed
* Update pkg/services/ngalert/models/receivers_test.go
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
* Update pkg/tests/api/alerting/api_ruler_test.go
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
* Update pkg/tests/api/alerting/api_ruler_test.go
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
* Update pkg/tests/api/alerting/api_ruler_test.go
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
* Update pkg/tests/api/alerting/api_ruler_test.go
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
* Update pkg/tests/api/alerting/api_ruler_test.go
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
* Update pkg/services/ngalert/models/receivers_test.go
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
* Update pkg/cmd/grafana-cli/commands/datamigrations/to_unified_storage_test.go
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
* Update pkg/services/ngalert/models/receivers_test.go
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
* fix the rest
* false positive
---------
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
2025-07-28 13:38:54 +02:00
Mariell Hoversholm
757be6365a
CI: Bump golangci-lint to 2.0.2 ( #103572 )
2025-04-10 14:42:23 +02:00
Matheus Macabu
5917ed8227
Hackaton: Add more unit tests, take 4 ( #101704 )
...
* cloudmigration/cloudmigrationimpl: run integration tests in parallel
* tsdb/mysql: run tests with actual service and instance manager
* pluginsintegration/angulardetectorsprovider: reduce job interval in test
* util: extract test that should only be ran with -race enabled and unskip it
2025-03-07 14:06:47 +01:00
Ivana Huckova
67d8610e31
SQL data sources: Use correct error source for sql processing errors ( #100872 )
...
* SQL data sources: Use correct error source for sql processing errors
* Fix lint
* Fix cyclomatic complexity
* Nit rename variable to make it more clear what those errors are
2025-02-18 18:24:44 +01:00
jackyin
55ec66c416
Datasources: timeEnd not work ( #98375 )
...
* time end not work
2025-01-20 10:04:43 +00:00
Andreas Christou
54333473f7
SQL: Set errors as downstream based on underlying errorsource ( #97192 )
...
Set errors as downstream based on underlying errorsource
2024-12-20 17:42:58 +00:00
Sriram
d48e9afd5d
Datasources: Improved network health check error messages (sql datasources) ( #97783 )
...
remove unique identifiers from common network error messages
2024-12-11 13:05:06 +00:00
Sriram
b4927ff1cd
MS SQL: Datasource health check error message improvements ( #97643 )
...
improve mssql healthcheck error messages
2024-12-10 13:13:32 +00:00
Gareth Dawson
3b8499eaee
MySQL: add error source to QueryData ( #96769 )
...
* add error source to mysql
* Update pkg/tsdb/mysql/sqleng/sql_engine.go
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
---------
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2024-11-26 10:25:48 +00:00
Sriram
ea3bc8f253
MySQL: Datasource health check error message improvements ( #96906 )
...
* updated mysql health check error messages
* fix betterer error
* fix lint errors
* renamed moreDetailsLink to errorDetailsLink
* update
* added i18n locale files
2024-11-22 21:58:35 +00:00
Sriram
492e7d4a3d
Datasources: health check logging improvements ( #96403 )
...
* basic healthcheck logging
* show detailed error for admins
* fix linting errors
* fix config summary keys
* passing context to logger
* tracking health check errors
* remove tracking
2024-11-20 11:42:05 +00:00
Zoltán Bedi
3fa8df6b62
MySQL: Fix tls skip verify option ( #96475 )
...
MySQL: Fix skip tls verify option
2024-11-19 10:46:24 +01:00
Gábor Farkas
abca0380a8
use count_bytes_reader from plugin-sdk-go ( #92553 )
...
* use count_bytes_reader from plugin-sdk-go
* run `make update-workspace`
* update postgres tests
* update mysql tests
* time back to utc
* make update-workspace done
---------
Co-authored-by: Kyle Brandt <kyle@grafana.com>
2024-08-28 16:44:13 +02:00
Dave Henderson
df3d8915ba
Chore: Bump Go to 1.23.0 ( #92105 )
...
* chore: Bump Go to 1.23.0
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* update swagger files
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* chore: update .bingo/README.md formatting to satisfy prettier
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* chore(lint): Fix new lint errors found by golangci-lint 1.60.1 and Go 1.23
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
* keep golden file
* update openapi
* add name to expected output
* chore(lint): rearrange imports to a sensible order
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
---------
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-08-21 11:40:42 -04:00
Gábor Farkas
4f7ed97aad
mysql: fix dispose-method not called in external-mode ( #87330 )
2024-05-07 09:54:30 +02:00
Gábor Farkas
2379498228
mysql additional decoupling steps ( #86168 )
...
* mysql additional decoupling steps
* updated snapshot test
2024-04-16 11:50:41 +02:00
Gábor Farkas
b02317d583
mysql: decouple sqleng ( #86057 )
2024-04-15 14:26:15 +02:00
Gábor Farkas
3b7ee3a56b
MySQL: snapshot tests ( #84846 )
...
mysql: add snapshot tests
2024-03-26 10:24:33 +01:00
Gábor Farkas
3ba33fe278
mysql: do not use unexported grafana-core config ( #83062 )
...
* mysql: do not use unexported grafana-core config
* updated test
2024-02-22 14:22:14 +01:00
Gábor Farkas
2938f891dd
mysql: socks proxy: use plugin-sdk ( #82375 )
2024-02-14 13:05:47 +01:00
Gábor Farkas
67f006a91d
sql: remove setting-import from sqleng ( #82088 )
2024-02-12 12:37:23 +01:00
Gábor Farkas
8616f2e80a
sql: removed unnecessary error-check ( #81808 )
...
* sql: removed unnecessary error-check
* updated tests
2024-02-07 08:41:49 +01:00
Gábor Farkas
33f80f7a16
mysql: remove dev-mode log ( #81894 )
2024-02-06 09:29:50 +01:00
Bruno
2332bfb007
Set DatasourceName and DatasourceType in proxy.Options ( #80923 )
...
* Set DatasourceName and DatasourceType in proxy.Options
* upgrade github.com/grafana/grafana-plugin-sdk-go to v0.206.0 and fix merge conflicts
2024-02-01 11:09:58 -03:00
Gábor Farkas
fd73b75ef7
SQL datasources: Consistent interval handling ( #78517 )
...
sql: apply the received interval-value
2024-01-24 08:47:07 +01:00
Gábor Farkas
bfb85f27b1
sql: improve sqleng-api, leave sql.DB creation to the plugins ( #79672 )
2024-01-05 08:37:15 +01:00
Gábor Farkas
53863c52ca
sql: use logging functionality from plugin-sdk ( #79294 )
2023-12-14 09:42:06 +01:00
Gábor Farkas
9e71dc801d
mysql: refactor logs handling ( #79148 )
...
* mysql: refactor logs handling
* fixed unit test
2023-12-07 12:17:41 +01:00
Gábor Farkas
9f0fc60477
sql: remove `xorm` dependency from postgres/mysql/mssql ( #77870 )
...
* sql: remove xorm
* sql: remove pkg/util dependency (#78821 )
sql: removed md5-util dependency
2023-12-06 09:35:05 +01:00
Gábor Farkas
033446523b
mysql/postgres: vendor in unit-test helper function ( #78744 )
2023-11-29 08:07:14 +01:00
Gábor Farkas
4f899e3576
sql: removed dependency on test-db-check ( #78717 )
2023-11-28 12:46:01 +01:00
Gábor Farkas
b97e485fe0
mysql: update unit test to be ready for the xorm-removal ( #78064 )
...
* mysql: update unit test to be ready for the xorm-removal
* removed unused code
2023-11-15 09:46:18 +01:00
Gábor Farkas
fe18c63204
mysql: do not import `httpClient` from core grafana ( #77628 )
...
mysql: do not use core-only exports
2023-11-13 10:25:19 +01:00
Will Browne
9d92818cae
Plugins: Update PDC pattern from latest plugin SDK changes ( #76576 )
...
* update with sdk
* do sql
* fix core plugins
* fix proxy settings
* bump SDK version
* tidy
* enable pdc for test
* add codeowners
* bump dep
* go mod tidy
* bump SDK
2023-10-16 16:40:04 +02:00
Dan Cech
91cf4f0c1c
Revert "Plugins: Update PDC pattern from latest plugin SDK changes" ( #76565 )
...
Revert "Plugins: Update PDC pattern from latest plugin SDK changes (#76036 )"
This reverts commit 151f6d6216
.
2023-10-13 12:35:16 -04:00
Will Browne
151f6d6216
Plugins: Update PDC pattern from latest plugin SDK changes ( #76036 )
...
* update with sdk
* do sql
* fix core plugins
* fix proxy settings
* bump SDK version
* tidy
* enable pdc for test
* add codeowners
2023-10-13 14:42:15 +02:00
Will Browne
7fca1bde54
Plugins: Set grafana config, plugin version and user agent on plugin requests ( #75171 )
...
* first pass
* fixup
* remove test line
* fix tests
* use new fields
* fix imports + formatting
* fix tests
* rollback changes
* undo whitespace
* apply pr feedback
2023-09-21 11:33:31 +02:00
Serge Zaitsev
93cdc94a94
Chore: capitalise logs in other backend packages ( #74344 )
...
* capitalise logs in observability logs
* capitalise oss-bit-tent packages
* capitalise logs in aws-datasources
* capitalise logs for traces and profiling
* capitalise logs for partner datasources
* capitalise logs in plugins platform
* capitalise logs for observability metrics
2023-09-04 22:25:43 +02:00
Ryan McKinley
025b2f3011
Chore: use any rather than interface{} ( #74066 )
2023-08-30 18:46:47 +03:00
Stephanie Hingtgen
4ece133fce
Secure socks proxy: use Grafana Plugin SDK ( #71616 )
2023-07-18 15:23:02 -06:00
Michael Mandrus
66d2214c3b
Config: Add configuration option to define custom user-facing general error message for certain error types ( #70023 )
...
---------
Co-authored-by: Summer Wollin <summer.wollin@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
2023-06-16 10:46:47 -05:00
enginecan
6758fd4888
MySQL: Add option to allow cleartext passwords ( #63232 )
...
* Add "Allow Cleartext Passwords" checkbox to MySQL connection settings
* Fix lint issues
* Add docs
* Add line break and bold text
---------
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2023-05-26 12:33:55 +02:00
Will Browne
286b9e08e9
Plugins: Bump Plugin SDK version and address instance management breaking changes ( #68900 )
...
* bump sdk and propagate ctx
* fix tests
2023-05-24 10:19:34 +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
Jev Forsberg
86228ba1a0
Datasource: Fix missing raw SQL query in Query Inspector when query returns zero rows ( #67844 )
...
* baldm0mma/issue5799/ add empty frame with all meta data
* baldm0mma/issue5799/ add null test
* write an integration test around query results with empty rows
* baldm0mma/issue5799/ add tests to mssql and postgres
* remove use of apparently reserved keyword in mysql8
* baldm0mma/issue5799
* baldm0mma/issue5799/ update tests
* baldm0mma/issue5799/ update test structs
* baldm0mma/issue5799/ update annotation
---------
Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
2023-05-09 08:29:02 -06:00
Stephanie Hingtgen
255d8f3326
Plugins: Remove secure socks proxy feature toggle ( #66611 )
2023-04-18 11:11:23 -06:00
Kyle Cunningham
92d92187d9
SQL Datasources: Update Max Connection and Max Idle Connection Defaults to 100 and add auto mode ( #65834 )
...
* Update connection configuration for SQL datasources
* Working auto state for connection numbers
* Add migration
* Use defaults from constants file
* Remove dead code
* Add tests and restructure useMigrateDatabaseField
* Update function names
* Update docs
* Make sure we don't continually issue updates
* Update docs
* Use onOptionsChnage in ConnectionLimits
* Update docs
* Clean up docs
* Update migration
* Fix default values in docs
* Fix spacing issue
* Fix test
* Update default values for SQL connections
* Include consts
* Allow override for default SQL datasource connection parameters
* Fix linter errors
* Remove extra @ts-ignore
* Centralize logic for default values
* Remove debugging
* Remove unecessary function
* Update configuration docs
* minor suggested change
* Fix comment misspelling
* Remove unecessary default setting code
* Update docs to indicate that code was included for backport version
* Remove dead code
---------
Co-authored-by: lwandz13 <larissa.wandzura@grafana.com>
2023-04-17 11:44:05 +03:00
Stephanie Hingtgen
10db808ea1
Plugins: Add sql support for the secure socks proxy ( #64630 )
2023-03-16 06:54:19 -06:00