Commit Graph
100 Commits
Author SHA1 Message Date
Gábor Farkas 1dbbbd9ca7 query: handle the x-rule-uid header (#95223) 2024-10-23 10:49:54 +02:00
Gábor Farkas 3a719a2cfd api: use alerting headers (#95118)
* api: use alerting headers

* improve code, add integration test

* better comment

* fixed test

* merged tests
2024-10-23 09:39:22 +02:00
Gábor Farkas cbe1e7d63f expr: add explicit strict-mode const (#94838)
expr: add explicit strict-mode value
2024-10-18 10:46:27 +02:00
Gábor Farkas 34bb959835 expr: improved test (#94837) 2024-10-18 10:31:58 +02:00
Gábor FarkasandSam Jewell 2cea7af2f5 datasources: querier: handle reducer-settings-mode correctly (#94595)
* datasources: querier: handle reducer-settings-mode correctly

* Try to fix linting error

"unnecessary leading newline (whitespace)"

---------

Co-authored-by: Sam Jewell <sam.jewell@grafana.com>
2024-10-17 08:38:14 +02:00
Gábor FarkasandAdam Simpson 0a7b731242 datasources: querier: request parsing failures are not http 500 (#94488)
* datasources: querier: request parsing failures are not http500

* fix test

---------

Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2024-10-10 00:28:27 +03:00
Gábor Farkas c48caf0921 logging: log plugin request start (#92925)
log plugin request start
2024-09-10 13:25:50 +02:00
Gábor Farkas 7afe6d7023 CODEOWNERS: improve ownership of query apis (#93087) 2024-09-09 14:31:05 +03:00
Gábor FarkasandKyle Brandt 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
bcb23630d0 docs: update dashboard-variable docs (#88824)
* docs: update dashboard-variable docs

* better text

Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com>

* formatting fix

* fixed indentation

* more indent fixes

* better text

Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>

* better text

Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>

---------

Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com>
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-06-24 12:40:08 +02:00
Gábor Farkas a6a12d7f2e fixed yarn.lock (#88971) 2024-06-10 12:33:49 +03:00
Gábor Farkas c0333130af postgres/mysql: improve macro docs (#87434) 2024-05-14 15:10:27 +01: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 d7ff3213f3 postgres: decouple the frontend-part (#87131) 2024-05-02 12:25:25 +02:00
Gábor Farkas 3d80693456 postgres: simpler test (#86331) 2024-04-30 15:27:20 +02:00
Gábor Farkas 500558bb72 mysql decouple frontend part (#86308)
* mysql decouple frontend part

* eslint "fix"

* package version update
2024-04-29 09:55:09 +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 9015bfa3f4 mssql: decouple sqleng (#86130)
* mssql: decouple sqleng

* fix codeowners-file
2024-04-16 08:00:14 +00:00
Gábor Farkas 7ce7584151 postgres: decouple sqleng (#86055) 2024-04-15 14:28:03 +02:00
Gábor Farkas b02317d583 mysql: decouple sqleng (#86057) 2024-04-15 14:26:15 +02:00
Gábor Farkas ee1ece1cf8 sql: use resample from grafana-plugin-sdk-go (#85599)
* copied files

* add copy of Pointer

* fix the API

* forward resample to the namespaced code

* moved the aligning-code to the parent

* call namespaced resample directly

* lint fix

* lint fix

* switch to plugin-sdk-go resample

* adjusted import path
2024-04-12 15:22:28 +02:00
Gábor Farkas 050105e70a plugins: update to latest go plugin sdk version (v0.222.0) (#85943)
plugins: update to latest go plugink sdk (v0.222.0)
2024-04-11 14:41:37 +02:00
Gábor Farkas 8a15ed42ae PostgreSQL: Fix the verify-ca mode (#85530)
postgres: fix the verify-ca problem
2024-04-09 08:39:45 +02:00
Gábor Farkas ccd13bf08e postgres: add tests to handle multiple statements in the same query (#85523)
* postgres: add tests to handle multiple statements in the same query

* better test explanation
2024-04-08 16:56:23 +02:00
Gábor Farkas 8159e1db3a Revert "Postgres: Switch the datasource plugin from lib/pq to pgx (#8… (#85509)
Revert "Postgres: Switch the datasource plugin from lib/pq to pgx (#83768)"

This reverts commit ecd6de826a.
2024-04-03 11:02:22 +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 c835022861 postgres: improved tests (#84677)
* postgres: tests: better test aligning time-series results

* postgres: add snapshot test for a backward-compat code
2024-03-26 10:22:58 +01:00
Gábor Farkas fba2b61408 postgres: removed unused code (#84736)
sql: removed unused code
2024-03-20 09:28:42 +01:00
Gábor Farkas 97521ef988 postgres: improve snapshot-tests for long/wide situations (#84387) 2024-03-14 12:37:04 +01:00
Gábor Farkas eca1bba01e postgres: add more tests (to handle zero-rows queries) (#84384) 2024-03-13 16:23:50 +01:00
Gábor Farkas 0981403373 PostgreSQL: Display correct initial value for tls mode (#84356) 2024-03-13 14:23:17 +01:00
Gábor Farkas ecd6de826a Postgres: Switch the datasource plugin from lib/pq to pgx (#83768)
postgres: switch from lib/pq to pgx
2024-03-13 09:52:39 +01:00
Gábor Farkas 142ac22023 Revert "Postgres: Switch the datasource plugin from lib/pq to pgx" (#83760)
Revert "Postgres: Switch the datasource plugin from lib/pq to pgx (#81353)"

This reverts commit 8c18d06386.
2024-03-01 12:20:47 +01:00
Gábor Farkas 9f617191da grafana-data: fix the export of arrayvector (#83678) 2024-02-29 14:02:32 +02:00
Gábor Farkas 8c18d06386 Postgres: Switch the datasource plugin from lib/pq to pgx (#81353)
* postgres: switch from lib/pq to pgx

* postgres: improved tls handling
2024-02-28 07:52:45 +01:00
Gábor Farkas 4c0da354ca update go.mod/sum/work (#83402)
* update go.mod/sum/work

* updated codeowners
2024-02-26 16:24:08 +02:00
Gábor Farkas ae77fe3602 postgres: do not use unexported grafana-core config (#83241)
* postgres: do not use unexported grafana-core config

* fixed wrong value
2024-02-22 16:47:03 +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 a62dccb0c0 plugins: add more configuration parameters to the plugin-config (#83060)
* envvars: add more configs

* made row-limit optional

* more consistent naming
2024-02-21 12:32:10 +02:00
Gábor FarkasandWill Browne 57499845c2 envvars: improve tests (#83071)
* envvars: improve tests

* removed commented-out code

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>

---------

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2024-02-20 09:41:11 +02:00
Gábor Farkas 7f77be8f85 postgres: tls: only use non-empty certificates (#82182) 2024-02-19 11:58:42 +01:00
Gábor Farkas c6d91e9065 sql: remove unused code (#82527) 2024-02-15 12:25:35 +01:00
Gábor Farkas 1bab82ab36 mssql: socks proxy: use plugin-sdk (#82407) 2024-02-15 12:01:18 +01:00
Gábor Farkas 2938f891dd mysql: socks proxy: use plugin-sdk (#82375) 2024-02-14 13:05:47 +01:00
Gábor Farkas 4c221966e4 postgres: socks proxy: use plugin-sdk (#82376) 2024-02-14 13:05:31 +01:00
Gábor Farkas d07aa25512 go: updated grafana-plugin-sdk-go version (#82346) 2024-02-13 11:51:19 +01:00
Gábor Farkas d65d2ceb1b sql: add explanation comment (#82304) 2024-02-12 12:42:12 +01:00
Gábor Farkas 67f006a91d sql: remove setting-import from sqleng (#82088) 2024-02-12 12:37:23 +01:00
Gábor Farkas fcf2543fe3 updated grafana-plugin-sdk-go dependency (#82136)
update grafana-plugin-sdk-go dependency
2024-02-12 09:14:03 +01:00
Gábor Farkas 2250e358c7 postgres: updated snapshot test with better floating point values (#82168) 2024-02-08 15:52:20 +01:00
Gábor Farkas 420a23c064 sql: simplify time-conversion code (#81499)
sql: simplify code
2024-02-07 12:42:22 +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 7b8c7b623c sql: remove the usage of "errutil" (#81888) 2024-02-07 08:39:24 +01:00
Gábor Farkas 33f80f7a16 mysql: remove dev-mode log (#81894) 2024-02-06 09:29:50 +01:00
Gábor Farkas ddf124de9d intervalv2: use duration-formatting logic from plugin-sdk-go (#81690) 2024-02-05 11:00:41 +01:00
Gábor Farkas 8175b31e16 sql: make sure queries do not have fill-params (#81576) 2024-02-05 08:08:35 +01:00
Gábor Farkas c92d3b002b sql: use interval-formatting from the sdk (#81764) 2024-02-02 13:18:22 +01:00
Gábor Farkas 607ec6c96a CODEOWNERS: better root-file selection (#81633) 2024-01-31 15:02:29 +01:00
Gábor Farkas 8a4f060f75 sql: add linting rule for decoupling postgres & mysql (#81378) 2024-01-31 10:00:59 +01:00
Gábor Farkas ba544e5b33 postgres: tests: improved number->timestamp tests (#81495)
* postgres: tests: nicer values

* postgres: tests: add float-to-timestamp tests
2024-01-29 18:27:15 +02:00
Gábor Farkas f943c27786 grafana-sql: update packages (#81344) 2024-01-26 15:27:09 +01:00
Gábor Farkas 852777e5de levitate: skip checking grafana-sql (#81350) 2024-01-26 13:30:35 +02:00
Gábor Farkas 29e8a355cb sql: extract frontend code into separate package (#81109)
* sql: extract frontend code into separate package

* updated package version
2024-01-26 11:38:29 +01:00
Gábor Farkas 7230ec88a1 postgres: test: remove unused code (#81330) 2024-01-26 10:45:17 +02:00
Gábor Farkas b1d1aa667a postgres: refactor code that is called by tests (#81279)
* postgres: refactor code that is called by tests too

* removed debug log
2024-01-26 09:11:25 +01: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 279aa4863b Postgres: Handle single quotes in table names in the query editor (#80951)
postgres: handle single quotes in table names
2024-01-22 15:36:45 +01:00
Gábor Farkas e6f8176674 postgres: test: switch to numbers that are represented well in floating point (#80722) 2024-01-22 14:14:40 +01:00
Gábor Farkas 2cb2845ec4 sql: use plugin-sdk code for value-to-float64 conversion (#80621)
sql: use plugin-sdk code
2024-01-17 13:42:32 +01:00
Gábor Farkas 58b13fed5a postgres: tests: adjusted the timestamps to be in UTC (#80704) 2024-01-17 11:27:43 +01:00
Gábor Farkas 4291bf4d69 postgres: tests: improve float64-conversion tests (#80627)
postgres: more tests
2024-01-17 10:31:15 +01:00
Gábor Farkas 2bf56b12cf postgres: simplify proxy code (#80121) 2024-01-17 09:20:27 +01:00
Gábor Farkas 6a36525d61 postgres: better error handling (#80375) 2024-01-15 12:50:01 +01:00
Gábor Farkas cfddc67a25 sql: support the no-tls option in the socks proxy (#80376)
postgres: support the no-tls option in the socks proxy
2024-01-15 09:57:43 +01:00
Gábor Farkas 6b5805dd1b postgres: vendor in the file-exists helper (#80446) 2024-01-15 08:53:43 +01:00
Gábor Farkas ced5b29951 Postgres: Fix enabling the socks proxy (#80361)
postgres: fix enabling the socks proxy
2024-01-11 17:05:38 +02:00
Gábor FarkasandZoltán Bedi ecc667c9a5 postgres: add snapshot tests (#79794)
* postgres: add snapshot tests

* fixed wrong comment

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

---------

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2024-01-09 16:54:21 +02: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 8923cc27ce sql: do not import stacktrace-generator code from core grafana (#79507)
sql: do not import from core grafana
2024-01-05 08:33:46 +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 5b4da3a7dc mssql: prepare logs-handling for decouple-datasource changes (#79214)
mssql: refactor logs-handling
2023-12-11 09:14:06 +01:00
Gábor Farkas 92044a9009 postgres: refactor logs-handling (#79147)
* postgres: refactor logs-handling

* fixed unit test
2023-12-07 13:18:49 +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 5be99912ff mssql: adjust unit test to minimize xorm-usage (#78597)
* mssql: adjust unit test to minimize xorm-usage

* lint fix
2023-11-24 13:12:19 +01:00
Gábor Farkas 710248674d postgres: update unit test to be ready for the xorm-removal (#78537)
postgres: removed xorm from unit tests
2023-11-24 11:11:18 +01:00
Gábor Farkas 6b6b209e1c better CODEOWNERS comment (#78034) 2023-11-16 11:56:02 +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
Gábor Farkas 2d391c1bf5 postgresql: change plugin id (#77444)
* postgres: change plugin id

* fixed cue file

* codeowners update

* fixed backend test
2023-11-13 08:49:26 +01:00
Gábor Farkas 4a6b209d64 sql: refactor code, eliminate from-core-grafana import (#77810) 2023-11-08 14:08:20 +01:00
Gábor Farkas 03bb6d6f74 devenv: postgres: make it work (#76323) 2023-10-13 08:53:38 +02:00
Gábor Farkas dc8b07d46f postgres/mysql: improved imports in unit tests (#75980)
* postgres/mysql: improved imports in unit tests

* simpler mock approach
2023-10-11 10:38:38 +02:00
Gábor Farkas c869844a78 sql: added lint-rule againts wrong imports (#75881) 2023-10-05 08:04:10 +02:00
Gábor Farkas eea95c2ddf postgres/mysql: removed from-grafana-core import (#75826) 2023-10-05 07:46:24 +02:00
Gábor Farkas cbfd1d53ee mysql: config: fixed import and removed unused code (#75883)
* mysql: removed obsolete import

* removed unnecessary check
2023-10-05 07:46:05 +02:00
523d1b46d4 sql: numeric inputs: use it's own simple implementation (#74904)
* sql: numeric inputs: use it's own simple implementation

* simpler approach

* Update connection limit styles (#75226)

* lint fixes

* replace ConfigSection with ConfigSubSection

---------

Co-authored-by: Gareth Dawson <email@garethdawson.xyz>
Co-authored-by: Gareth Dawson <gwdawson.work@gmail.com>
2023-10-03 13:54:51 +02:00
Gábor Farkas 8dafc28988 sql: remove grafana-core import (#75558)
* sql: remove initialCustomVariableModelState

* added fix for mysql too

* linter fixes
2023-09-29 13:43:28 +02:00