c02003af3c 
								
							 
						 
						
							
							
								
								Refactor time durations ( #58484 )  
							
							... 
							
							
							
							This change uses `time.Second` in place of `1000 * time.Millisecond` and `time.Minute` in place of `60*time.Second`. 
							
						 
						
							2022-11-22 15:09:15 +08:00  
				
					
						
							
							
								 
						
							
								9ea6a43089 
								
							 
						 
						
							
							
								
								Build: clean up and document integration test convention ( #58170 )  
							
							... 
							
							
							
							* clean up and document integration test convention
* clarify integration test conventions
* clean up integration tests that don't follow convention
* mark testIntegration* functions as helpers to avoid confusion 
							
						 
						
							2022-11-04 10:14:21 -04:00  
				
					
						
							
							
								 
						
							
								d9c40ca41e 
								
							 
						 
						
							
							
								
								Chore: Update sqleng, elasticsearch, tempo and opentsdb plugins to support contextual logs. ( #57777 )  
							
							... 
							
							
							
							* make sql engine use pick log context for logs
* update tempo to get log context
* update opentsdb to use log context
* update es client to use log context 
							
						 
						
							2022-11-02 10:03:50 -04:00  
				
					
						
							
							
								 
						
							
								05709ce411 
								
							 
						 
						
							
							
								
								chore: remove sqlstore & mockstore dependencies from (most) packages ( #57087 )  
							
							... 
							
							
							
							* chore: add alias for InitTestDB and Session
Adds an alias for the sqlstore InitTestDB and Session, and updates tests using these to reduce dependencies on the sqlstore.Store.
* next pass of removing sqlstore imports
* last little bit
* remove mockstore where possible 
							
						 
						
							2022-10-19 09:02:15 -04:00  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								062d255124 
								
							 
						 
						
							
							
								
								Handle ioutil deprecations ( #53526 )  
							
							... 
							
							
							
							* replace ioutil.ReadFile -> os.ReadFile
* replace ioutil.ReadAll -> io.ReadAll
* replace ioutil.TempFile -> os.CreateTemp
* replace ioutil.NopCloser -> io.NopCloser
* replace ioutil.WriteFile -> os.WriteFile
* replace ioutil.TempDir -> os.MkdirTemp
* replace ioutil.Discard -> io.Discard 
							
						 
						
							2022-08-10 15:37:51 +02:00  
				
					
						
							
							
								 
						
							
								bd35e6917a 
								
							 
						 
						
							
							
								
								Chore: Exclude integration tests from running on test-backend step ( #50359 )  
							
							... 
							
							
							
							* Chore: Exclude integration tests from running on test-backend step
* Remove -v from go test command
* Add check to skip integration tests before each integration test
* Try to restart pipeline
* Retrying to make pipeline run 
							
						 
						
							2022-06-10 11:46:21 -04:00  
				
					
						
							
							
								 
						
							
								31630edf0c 
								
							 
						 
						
							
							
								
								Chore: Remove Wrapf ( #50128 )  
							
							... 
							
							
							
							* Chore: Remove Wrapf
* Remove all Wrapf refs
* Remove last Wrapf ref
* Fix lint errors
* Remove Wrap and Wrapf definitions
* Remove unnecessary colon 
							
						 
						
							2022-06-06 22:30:31 +02:00  
				
					
						
							
							
								 
						
							
								c63ebc887b 
								
							 
						 
						
							
							
								
								Chore: Run integration tests without grabpl ( #49448 )  
							
							... 
							
							
							
							* Chore: Run integration tests without grabpl
* Add new step for integration tests in lib.star
* Remove old integration test step from lib.star
* Change drone signature
* Fix: Edit starlark integration step to not affect enterprise
* Remove all build tags & rename starlark integration test step
* Resync .drone.yml with .drone.star
* Fix lint errors
* Fix lint errors
* Fix lint errors
* Fix more lint errors
* Fix another lint error
* Rename integration test step
* Fix last lint error
* Recomment enterprise step
* Remove comment from Makefile
Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com> 
							
						 
						
							2022-06-01 14:55:22 -04:00  
				
					
						
							
							
								 
						
							
								50c2b4682a 
								
							 
						 
						
							
							
								
								Chore: Rename integration tests ( #49438 )  
							
							... 
							
							
							
							* Chore: Rename integration tests
* Remove one Integration
Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com> 
							
						 
						
							2022-05-24 11:04:03 +02:00  
				
					
						
							
							
								 
						
							
								9024340487 
								
							 
						 
						
							
							
								
								fix: postgresql ipv6 host should not be enclosed in square brackets ( #47522 )  
							
							
							
						 
						
							2022-04-12 11:11:11 +01:00  
				
					
						
							
							
								 
						
							
								f5a790e291 
								
							 
						 
						
							
							
								
								Fix postgresql host-v6 literals ( #46876 )  
							
							... 
							
							
							
							Ipv6 literals in postgresql hosts previously worked and were subsequently
broken. This change fixes the parsing and adds additional test cases. 
							
						 
						
							2022-03-31 11:45:49 +01:00  
				
					
						
							
							
								 
						
							
								f4b6c4019c 
								
							 
						 
						
							
							
								
								PostgreSQL: __unixEpochGroup to support arithmetic expression as argument ( #46764 )  
							
							... 
							
							
							
							* __unixEpochGroup to support arithmetic argument
Following call generates wrong expression : 
 
$__unixEpochGroupAlias(height+42,$__interval)
=> floor(height+42/60)*60 AS "time"
instead of
=> floor((height+42)/60)*60 AS "time"
* Update test of __unixEpochGroup related to issue #46764  
							
						 
						
							2022-03-26 18:44:14 +01:00  
				
					
						
							
							
								 
						
							
								7fbc7d019a 
								
							 
						 
						
							
							
								
								Plugins: Core plugins register via backend factory provider ( #43171 )  
							
							... 
							
							
							
							* refactoring store interface and init flow
* fix import
* fix linter
* refactor resource calling
* load with class
* re-order args
* fix tests
* fix linter
* remove old creator
* add custom config struct
* fix some tests
* cleanup
* fix
* tackle plugins
* fix linter
* refactor and fix test
* add connect failure error
* add fix for azure, cloud monitoring and test data
* restructure
* remove unused err
* add fake tracer for test
* fix grafana ds plugin 
							
						 
						
							2022-01-20 18:16:22 +01:00  
				
					
						
							
							
								 
						
							
								e4ba5f17dd 
								
							 
						 
						
							
							
								
								add core plugins thru store ( #43085 )  
							
							
							
						 
						
							2021-12-14 15:22:40 +01:00  
				
					
						
							
							
								 
						
							
								b80fbe03f0 
								
							 
						 
						
							
							
								
								Plugins: Refactor Plugin Management ( #40477 )  
							
							... 
							
							
							
							* add core plugin flow
* add instrumentation
* move func
* remove cruft
* support external backend plugins
* refactor + clean up
* remove comments
* refactor loader
* simplify core plugin path arg
* cleanup loggers
* move signature validator to plugins package
* fix sig packaging
* cleanup plugin model
* remove unnecessary plugin field
* add start+stop for pm
* fix failures
* add decommissioned state
* export fields just to get things flowing
* fix comments
* set static routes
* make image loading idempotent
* merge with backend plugin manager
* re-use funcs
* reorder imports + remove unnecessary interface
* add some TODOs + remove unused func
* remove unused instrumentation func
* simplify client usage
* remove import alias
* re-use backendplugin.Plugin interface
* re order funcs
* improve var name
* fix log statements
* refactor data model
* add logic for dupe check during loading
* cleanup state setting
* refactor loader
* cleanup manager interface
* add rendering flow
* refactor loading + init
* add renderer support
* fix renderer plugin
* reformat imports
* track errors
* fix plugin signature inheritance
* name param in interface
* update func comment
* fix func arg name
* introduce class concept
* remove func
* fix external plugin check
* apply changes from pm-experiment
* fix core plugins
* fix imports
* rename interface
* comment API interface
* add support for testdata plugin
* enable alerting + use correct core plugin contracts
* slim manager API
* fix param name
* fix filter
* support static routes
* fix rendering
* tidy rendering
* get tests compiling
* fix install+uninstall
* start finder test
* add finder test coverage
* start loader tests
* add test for core plugins
* load core + bundled test
* add test for nested plugin loading
* add test files
* clean interface + fix registering some core plugins
* refactoring
* reformat and create sub packages
* simplify core plugin init
* fix ctx cancel scenario
* migrate initializer
* remove Init() funcs
* add test starter
* new logger
* flesh out initializer tests
* refactoring
* remove unused svc
* refactor rendering flow
* fixup loader tests
* add enabled helper func
* fix logger name
* fix data fetchers
* fix case where plugin dir doesn't exist
* improve coverage + move dupe checking to loader
* remove noisy debug logs
* register core plugins automagically
* add support for renderer in catalog
* make private func + fix req validation
* use interface
* re-add check for renderer in catalog
* tidy up from moving to auto reg core plugins
* core plugin registrar
* guards
* copy over core plugins for test infra
* all tests green
* renames
* propagate new interfaces
* kill old manager
* get compiling
* tidy up
* update naming
* refactor manager test + cleanup
* add more cases to finder test
* migrate validator to field
* more coverage
* refactor dupe checking
* add test for plugin class
* add coverage for initializer
* split out rendering
* move
* fixup tests
* fix uss test
* fix frontend settings
* fix grafanads test
* add check when checking sig errors
* fix enabled map
* fixup
* allow manual setup of CM
* rename to cloud-monitoring
* remove TODO
* add installer interface for testing
* loader interface returns
* tests passing
* refactor + add more coverage
* support 'stackdriver'
* fix frontend settings loading
* improve naming based on package name
* small tidy
* refactor test
* fix renderer start
* make cloud-monitoring plugin ID clearer
* add plugin update test
* add integration tests
* don't break all if sig can't be calculated
* add root URL check test
* add more signature verification tests
* update DTO name
* update enabled plugins comment
* update comments
* fix linter
* revert fe naming change
* fix errors endpoint
* reset error code field name
* re-order test to help verify
* assert -> require
* pm check
* add missing entry + re-order
* re-check
* dump icon log
* verify manager contents first
* reformat
* apply PR feedback
* apply style changes
* fix one vs all loading err
* improve log output
* only start when no signature error
* move log
* rework plugin update check
* fix test
* fix multi loading from cfg.PluginSettings
* improve log output #2 
* add error abstraction to capture errors without registering a plugin
* add debug log
* add unsigned warning
* e2e test attempt
* fix logger
* set home path
* prevent panic
* alternate
* ugh.. fix home path
* return renderer even if not started
* make renderer plugin managed
* add fallback renderer icon, update renderer badge + prevent changes when renderer is installed
* fix icon loading
* rollback renderer changes
* use correct field
* remove unneccessary block
* remove newline
* remove unused func
* fix bundled plugins base + module fields
* remove unused field since refactor
* add authorizer abstraction
* loader only returns plugins expected to run
* fix multi log output 
							
						 
						
							2021-11-01 10:53:33 +01:00  
				
					
						
							
							
								 
						
							
								722c414fef 
								
							 
						 
						
							
							
								
								Encryption: Refactor securejsondata.SecureJsonData to stop relying on global functions ( #38865 )  
							
							... 
							
							
							
							* Encryption: Add support to encrypt/decrypt sjd
* Add datasources.Service as a proxy to datasources db operations
* Encrypt ds.SecureJsonData before calling SQLStore
* Move ds cache code into ds service
* Fix tlsmanager tests
* Fix pluginproxy tests
* Remove some securejsondata.GetEncryptedJsonData usages
* Add pluginsettings.Service as a proxy for plugin settings db operations
* Add AlertNotificationService as a proxy for alert notification db operations
* Remove some securejsondata.GetEncryptedJsonData usages
* Remove more securejsondata.GetEncryptedJsonData usages
* Fix lint errors
* Minor fixes
* Remove encryption global functions usages from ngalert
* Fix lint errors
* Minor fixes
* Minor fixes
* Remove securejsondata.DecryptedValue usage
* Refactor the refactor
* Remove securejsondata.DecryptedValue usage
* Move securejsondata to migrations package
* Move securejsondata to migrations package
* Minor fix
* Fix integration test
* Fix integration tests
* Undo undesired changes
* Fix tests
* Add context.Context into encryption methods
* Fix tests
* Fix tests
* Fix tests
* Trigger CI
* Fix test
* Add names to params of encryption service interface
* Remove bus from CacheServiceImpl
* Add logging
* Add keys to logger
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
* Add missing key to logger
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
* Undo changes in markdown files
* Fix formatting
* Add context to secrets service
* Rename decryptSecureJsonData to decryptSecureJsonDataFn
* Name args in GetDecryptedValueFn
* Add template back to NewAlertmanagerNotifier
* Copy GetDecryptedValueFn to ngalert
* Add logging to pluginsettings
* Fix pluginsettings test
Co-authored-by: Tania B <yalyna.ts@gmail.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com> 
							
						 
						
							2021-10-07 17:33:50 +03:00  
				
					
						
							
							
								 
						
							
								64c8d32fe7 
								
							 
						 
						
							
							
								
								Use sdk pkg for gtime ( #39354 )  
							
							
							
						 
						
							2021-09-21 13:08:52 +02:00  
				
					
						
							
							
								 
						
							
								1c892a2fc4 
								
							 
						 
						
							
							
								
								Postgres/MySQL/MSSQL: Add setting to limit maximum amount of rows processed ( #38986 )  
							
							... 
							
							
							
							Adds a new setting dataproxy.row_limit that allows an operator to limit the 
amount of rows being processed/accepted in response to database queries 
originating from SQL data sources.
Closes  #38975 
Ref #39095 
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> 
							
						 
						
							2021-09-13 15:27:51 +02:00  
				
					
						
							
							
								 
						
							
								fbdaf56a84 
								
							 
						 
						
							
							
								
								Postgres/MySQL/MSSQL: Fix region annotations not displayed correctly ( #38936 )  
							
							... 
							
							
							
							Fix region annotations not displayed correctly when returning timeend column 
as epoch timestamp and by that making sure that the returned data frame field 
named timeend is treated as time type.
Fixes  #38533  
							
						 
						
							2021-09-08 01:54:48 +02:00  
				
					
						
							
							
								 
						
							
								c989f0fbbe 
								
							 
						 
						
							
							
								
								SQL: Migrate to use SDK contracts ( #36635 )  
							
							... 
							
							
							
							* convert SQLs to use sdk contracts
* make draft
* postgres
* intermedia
* get datasourceinfo filled at the beginning of the service
* move the interval into package because of cyclict  import and fix all postgres tests
* fix mysql test
* fix mssql
* fix the test for pr https://github.com/grafana/grafana/issues/35839 
* fix some issue about intervalv2 package
* update sql test
* wire migration for SQLs
* add sqls to the background process
* make it register instead of register and start
* revert formatting
* fix tests
* fix linter
* remove integration test
* Postgres test fix
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com> 
							
						 
						
							2021-09-07 09:35:37 +02:00  
				
					
						
							
							
								 
						
							
								643c7fa0cb 
								
							 
						 
						
							
							
								
								Chore: update all +build statements ( #38782 )  
							
							
							
						 
						
							2021-09-01 17:38:56 +03:00  
				
					
						
							
							
								 
						
							
								78596a6756 
								
							 
						 
						
							
							
								
								Migrate to Wire for dependency injection ( #32289 )  
							
							... 
							
							
							
							Fixes  #30144 
Co-authored-by: dsotirakis <sotirakis.dim@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: spinillos <selenepinillos@gmail.com>
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Co-authored-by: Leonard Gram <leo@xlson.com> 
						
							2021-08-25 15:11:22 +02:00  
				
					
						
							
							
								 
						
							
								180b1973e0 
								
							 
						 
						
							
							
								
								SQL: Fix SQL dataframe resampling (fill mode + time intervals) ( #36937 )  
							
							... 
							
							
							
							* Refactor resample logic
* Adjust test to have one more timestamp out of range
* adjust test + ensure filling
* revert flag flip
* Undo logic - should be timeseries only
* change data calculation based on previous interval
* fix the logics
* fix typo
* fix resample start time, to reuse what sql api returned
* calculate the start point with from truncate by interval
Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Ying WANG <ying.wang@grafana.com> 
							
						 
						
							2021-07-29 08:38:41 +02:00  
				
					
						
							
							
								 
						
							
								5d01add7da 
								
							 
						 
						
							
							
								
								Fix Postgres query handling null values for smallint ( #36648 )  
							
							... 
							
							
							
							* Fix Postgres query handling null values for smallint
* Fix converting to int16 
							
						 
						
							2021-07-13 09:36:24 +02:00  
				
					
						
							
							
								 
						
							
								1d6e99bc95 
								
							 
						 
						
							
							
								
								SQL: Fixes issues with showing value column name prefix in legends  ( #35839 )  
							
							... 
							
							
							
							* rename strategy
* Update pkg/tsdb/sqleng/sql_engine.go
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
* more strict constraints
* Fixed so that it works on multi series results
* only apply the logic when original query returns 3 fields
* removed part of comment
* Update mysql test
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com> 
							
						 
						
							2021-06-18 08:05:23 +02:00  
				
					
						
							
							
								 
						
							
								0611207f3b 
								
							 
						 
						
							
							
								
								Postgres/MySQL/MSSQL: Fix concurrent map writes panic ( #35510 )  
							
							... 
							
							
							
							Fixes panic/fatal error concurrent map writes in SQL data sources when multiple 
queries are executed concurrently and you interpolate SQL query before executing it.
Fixes  #35469  
							
						 
						
							2021-06-11 14:56:29 +02:00  
				
					
						
							
							
								 
						
							
								6c728d6a78 
								
							 
						 
						
							
							
								
								SQL: Use SDK sqlutil package refactor ( #33758 )  
							
							... 
							
							
							
							Upgrades grafana-plugin-sdk-go dependency to v0.94.0 to get 
the refactored sqlutil package. 
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com> 
							
						 
						
							2021-05-11 14:59:33 +02:00  
				
					
						
							
							
								 
						
							
								0b97cdcee1 
								
							 
						 
						
							
							
								
								fix postgres to have precision of ms ( #33853 )  
							
							
							
						 
						
							2021-05-10 22:22:13 +08:00  
				
					
						
							
							
								 
						
							
								bd66c8dde3 
								
							 
						 
						
							
							
								
								SQL data sources: Convert to return data frames ( #32257 )  
							
							... 
							
							
							
							Convert SQL data sources to return data frames.
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com> 
							
						 
						
							2021-05-05 16:46:07 +02:00  
				
					
						
							
							
								 
						
							
								7627b55ef4 
								
							 
						 
						
							
							
								
								TSDB: add deprecation comments to many tsdb structs ( #33281 )  
							
							
							
						 
						
							2021-04-23 03:03:11 +02:00  
				
					
						
							
							
								 
						
							
								dd0ba96d7c 
								
							 
						 
						
							
							
								
								Postgres: Fix time group macro when TimescaleDB is enabled and interval is less than a second ( #33153 )  
							
							... 
							
							
							
							Fixing a special case with time group macro when 
using TimescaleDB and interval is lower than a second.
Fixes  #33124  
							
						 
						
							2021-04-21 12:54:49 +02:00  
				
					
						
							
							
								 
						
							
								b79e61656a 
								
							 
						 
						
							
							
								
								Introduce TSDB service ( #31520 )  
							
							... 
							
							
							
							* Introduce TSDB service
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com> 
							
						 
						
							2021-03-08 07:02:49 +01:00  
				
					
						
							
							
								 
						
							
								c57047a420 
								
							 
						 
						
							
							
								
								Postgres: allow providing TLS/SSL certificates as text in addition to file paths ( #30353 )  
							
							... 
							
							
							
							* postgres SSL certification
* add back the UI to configure SSL Authentication files by file path
* add backend logic
* correct unittest
* mini changes
* Update public/app/plugins/datasource/postgres/config_ctrl.ts
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update public/app/plugins/datasource/postgres/partials/config.html
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
* mutex
* check file exist before remove
* change permission
* change default configuremethod to file-path
* Update public/app/plugins/datasource/postgres/partials/config.html
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Update public/app/plugins/datasource/postgres/partials/config.html
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Update public/app/plugins/datasource/postgres/partials/config.html
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Update public/app/plugins/datasource/postgres/partials/config.html
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* rename sslconfiguremethod to sslconfigurationmethod
* frontend update
* solve comments
* Postgres: Convert tests to stdlib
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Postgres: Be consistent about TLS/SSL terminology
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* fix init inconsistancy
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* naming convention
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Undo change
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix TLS issue
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* change permissions
* Fix data source field names
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Clean up HTML
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Improve popover text
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix SSL input bug
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Undo unnecessary change
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Clean up backend code
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix build
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* More consistent naming
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Clean up code
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Enforce certificate file permissions
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* add settings
* Undo changes
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* fix windows file path
* PostgresDataSource: Fix mutex usage
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Update pkg/tsdb/postgres/postgres.go
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Apply suggestions from code review
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* fix compilation
* fix unittest
* Apply suggestions from code review
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Apply suggestions from code review
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* mock function
* change kmutex package
* add kmutex into middleware
* lock connection file per datasource
* add unittest regarding concurrency
* version should be equal
* adding unittest
* fix the loop
* fix unitest
* fix postgres unittst
* remove comments
* move dataPath from arg to tlsManager struct field
* Use DecryptedValues method
Use cached decrypted values instead of
using secure json data decrypt which will
decrypt unchanged values over and over again.
* remove unneeded mutex in tests and cleanup tests
* fix the lint
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com> 
							
						 
						
							2021-02-23 22:10:55 +01:00  
				
					
						
							
							
								 
						
							
								d56c5285e2 
								
							 
						 
						
							
							
								
								Postgres: Fix timeGroup macro converts long intervals to invalid numbers when TimescaleDB is enabled ( #31179 )  
							
							... 
							
							
							
							Fixes  #27253  
						
							2021-02-15 17:15:57 +01:00  
				
					
						
							
							
								 
						
							
								be8ba8ef46 
								
							 
						 
						
							
							
								
								Postgres: Convert tests to stdlib ( #30536 )  
							
							... 
							
							
							
							* Postgres: Convert tests to stdlib
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> 
							
						 
						
							2021-01-22 10:34:53 -05:00  
				
					
						
							
							
								 
						
							
								7126a91901 
								
							 
						 
						
							
							
								
								Postgres: Be consistent about TLS/SSL terminology ( #30532 )  
							
							... 
							
							
							
							Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> 
							
						 
						
							2021-01-22 14:53:37 +01:00  
				
					
						
							
							
								 
						
							
								f55818ca70 
								
							 
						 
						
							
							
								
								Chore: Enable exhaustive linter ( #29458 )  
							
							... 
							
							
							
							* Chore: Enable exhaustive linter
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> 
							
						 
						
							2020-12-01 09:53:27 +01:00  
				
					
						
							
							
								 
						
							
								2bf964c61e 
								
							 
						 
						
							
							
								
								Chore: Fix linting issues caught by ruleguard ( #28799 )  
							
							... 
							
							
							
							* Chore: Fix linting issues caught by ruleguard
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Improve error check
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> 
							
						 
						
							2020-11-17 11:27:45 +01:00  
				
					
						
							
							
								 
						
							
								574553ec7b 
								
							 
						 
						
							
							
								
								Chore: Fix issues found by staticcheck ( #28802 )  
							
							... 
							
							
							
							* Fix linting issues
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> 
							
						 
						
							2020-11-05 11:29:39 +01:00  
				
					
						
							
							
								 
						
							
								a078e40238 
								
							 
						 
						
							
							
								
								Settings: Rename constants/variables to follow Go naming standards ( #28002 )  
							
							... 
							
							
							
							* settings: Rename constants/variables to follow Go naming standards
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> 
							
						 
						
							2020-10-02 15:45:45 +02:00  
				
					
						
							
							
								 
						
							
								a5d9196a53 
								
							 
						 
						
							
							
								
								Chore/fix lint issues ( #27704 )  
							
							... 
							
							
							
							* Chore: Fix linting issues
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> 
							
						 
						
							2020-09-22 16:22:19 +02:00  
				
					
						
							
							
								 
						
							
								4b1eb6e5c7 
								
							 
						 
						
							
							
								
								Chore: Enable gocyclo linter ( #26395 )  
							
							... 
							
							
							
							* Chore: Enable gocyclo linter
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* API: Fix linting issue
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* API: Refactor to reduce complexity
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix type assertion
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> 
							
						 
						
							2020-09-07 22:10:06 +02:00  
				
					
						
							
							
								 
						
							
								d28d495235 
								
							 
						 
						
							
							
								
								Chore: Enable PR testing in Drone ( #26189 )  
							
							... 
							
							
							
							* Add Drone configuration
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Add more steps
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Add more steps
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Build front-end before testing it
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Upgrade grafana/build-container
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Add packaging step
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Trigger on push
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove some steps
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Enable steps
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Install Dockerize
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Use node image for test-frontend
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Increase number of test workers
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Make plugin installation depend on frontend tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Make integration tests depend on frontend tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Use grafana/build-container also for front-end tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Upgrade dependencies in order to fix front-end tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Depend on es-check
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Dont' depend on tests before building front-end
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Add more steps
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix packaging
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Simplify
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Try to build images
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix e2e tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove steps
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Install netcat
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Include golangci-lint with grafana/build-container
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Build storybook and docs website
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix e2e tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Use build image with root user
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Drop CircleCI dependencies
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix e2e tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix e2e under Drone
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Execute e2e server separately
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Use own plugin for building Docker images
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Use Starlark to configure Drone
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Add enterprise steps to pipeline
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Add more enterprise steps to pipeline
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Maintain Yarn cache
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Build enterprise Docker images
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Build Ubuntu Docker images
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Refactor
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Add Postgres integration test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Add MySQL integration test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix integration tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Parameterize integration test DB connections
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Categorize integration tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Use grabpl integration-tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove unintended change
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Drone: Disable Ubuntu Docker images for PR pipeline
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Regenerate yarn.lock
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Upgrade grabpl
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Restore Yarn cache before installing in grafana-enterprise
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Use separate pipelines for OSS and enterprise
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Let OSS builds depend on tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Restore Go cache before building back-end
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Reduce number of variants built for PRs
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix building of Docker images
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Drone: Simplify logic
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Drone: Use Starlark
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Drone: Fix syntax error
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Convert .drone.star to YAML
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Upgrade AWS Go SDK
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Drone: Fix Go linting
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Undo irrelevant changes
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Revert "Undo irrelevant changes"
This reverts commit 5152f65972 
							
						 
						
							2020-07-10 16:09:21 +02:00  
				
					
						
							
							
								 
						
							
								9285595c50 
								
							 
						 
						
							
							
								
								tsdb/postgres: Support Unix socket for host ( #25778 )  
							
							... 
							
							
							
							* tsdb/postgres: Support Unix socket for host
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix host regex
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix host regex
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove panic
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix host parsing; add tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Add test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Use strings.HasPrefix to detect Unix socket host
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Remove debug logging
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Escape single quotes and backslashes
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Test generateConnectionString as requested in review
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Add test case for SSL mode
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> 
							
						 
						
							2020-07-09 14:57:09 +02:00  
				
					
						
							
							
								 
						
							
								41d432b5ae 
								
							 
						 
						
							
							
								
								Chore: Enable whitespace linter ( #25903 )  
							
							... 
							
							
							
							Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> 
							
						 
						
							2020-07-06 20:17:28 +02:00  
				
					
						
							
							
								 
						
							
								07582a8e85 
								
							 
						 
						
							
							
								
								Chore: Fix various spelling errors in back-end code ( #25241 )  
							
							... 
							
							
							
							* Chore: Fix various spelling errors in back-end code
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>> 
							
						 
						
							2020-06-01 17:11:25 +02:00  
				
					
						
							
							
								 
						
							
								2a6ac88a73 
								
							 
						 
						
							
							
								
								QueryInspector: add common way to show the raw query ( #25204 )  
							
							
							
						 
						
							2020-05-29 11:06:33 -07:00  
				
					
						
							
							
								 
						
							
								1f0e1b33bc 
								
							 
						 
						
							
							
								
								Postgres: Add SSL support for datasource ( #21341 )  
							
							... 
							
							
							
							* Add SSL certificate/key fields to Postgres data source configuration
Co-authored-by: Edwin Cordeiro <edwin@scordeiro.net>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com> 
							
						 
						
							2020-04-09 12:48:29 +02:00  
				
					
						
							
							
								 
						
							
								ea35ae4d1f 
								
							 
						 
						
							
							
								
								Chore: Update the xorm dependency ( #22376 )  
							
							... 
							
							
							
							* Upgrade xorm
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com> 
							
						 
						
							2020-04-01 15:57:21 +02:00