* Create libpqToPGX feature toggle
* Refactor PostgreSQL datasource to support PGX with feature toggle
- Updated `ProvideService` to accept feature toggles for enabling PGX.
- Modified integration tests to use the new PGX connection method.
- Introduced new functions for handling PGX connections and queries.
- Enhanced TLS configuration handling for PostgreSQL connections.
- Updated existing tests to ensure compatibility with PGX and new connection methods.
* Update PostgreSQL datasource to enhance connection pooling and error handling
- Increased `MaxOpenConns` to 10 in integration tests for improved connection management.
- Refactored connection handling in `newPostgresPGX` to return a connection pool instead of a single connection.
- Updated health check error handling to utilize context and feature toggles for better error reporting.
- Adjusted `DisposePGX` method to close the connection pool properly.
- Enhanced query execution to acquire connections from the pool, ensuring efficient resource usage.
* Cleanup
* Revert postgres_test unnecessary changes
* Rename feature toggle from `libpqToPGX` to `postgresDSUsePGX`
* Add null check to dispose method
* Fix lint issues
* Refactor connection string generation
* Address comment in health check file
* Rename p to pool
* Refactor executeQueryPGX and split into multiple functions
* Fix lint issues
* The returning error message from PGX is enough no need to separate the error code.
* Move TLS handling to newPostgresPGX function
* Disable ssl for integration tests
* Use MaxIdleConns option
* Remove old feature toggle
* Rename`generateConnectionConfigPGX` to `generateConnectionStringPGX`
* Add back part of the error messages
* Don't show max idle connections option when PGX enabled
* Address comments from Sriram
* Add back Sriram's changes
* PostgreSQL: Rework tls manager to use temporary files instead (#105330)
* Rework tls manager to use temporary files instead
* Lint and test fixes
* Update pkg/tsdb/grafana-postgresql-datasource/postgres.go
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* Update betterer
---------
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
---------
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* Improve data source error message when stackID
* Update comment
* Revert "Update comment"
This reverts commit 48922bc55259803f1717e91afc9f749a60d61184.
* Revert "Improve data source error message when stackID"
This reverts commit 4bf0a2f7b712e77b9de4655716695a7ee75c183b.
* Make public messagic configurable based on context
* Update, simplify
* Update
* Update getting stack
* Update pkg/plugins/errors.go
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
* Refactor test to test for when context has stack value
* Remove duplicated test
* Fix error checking logic
---------
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
* Update ErrRequestErrorBase to make it more clear for developers
* Trigger build
* requestError -> requestFailureError
* Fix test
* Update pkg/plugins/backendplugin/grpcplugin/client_v2.go
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
---------
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* Zipkin: Run health check through backend
* Mark some errors as downstream
* Update pkg/tsdb/zipkin/zipkin.go
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* Use errors.New where error formatting is not needed
* Remove executable in plugin.json
* Fix joining the path
* Keep logger as global and then create from context
* Close the res body
---------
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* indexer integration tests WIP
* make protobuf
* Adds a few more integration test cases to cover the basics. Use Limit instead of Size param from SearchRequest.
* skip if testing.Short()
* adds test comments
* ref: pass tracer to plugin factory func
* fix: add tracer to coreplugin
* test: fix test, generate wire
* test: ignore trace field in loader_test
* ref: pass tracer as dependency, don't store in plugin
* ref: wrap tracer with tracer provider to satisfy WithTracerProvider
* ref: use otel trace.Tracer type for tracer
* Plugins: Enhanced plugin instrumentation
* use backend.CallResourceResponseSenderFunc
* sdk v0.237.0
* support admission control
* cover all handlers in log and metrics middlewares
* fix after review
* Chore: Migrate to use buf for protobuf generation
* fix codeowners
* fixes after review
* docs/tooling for installing buf
* add back codeowners
* Update upgrading-dependencies.md
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
* sdk v0.229.0
---------
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
* Chore: Upgrade/fix deps after thema removal
* github.com/deepmap/oapi-codegen v1.14.0
* github.com/deepmap/oapi-codegen v1.15.0
* github.com/deepmap/oapi-codegen v1.16.0
* fix for dep used in enterprise
* github.com/deepmap/oapi-codegen/v2 v2.0.0
* oapi-codegen/v2 v2.1.0, kin-openapi v0.122.0, sdk
* keep kin-openapi at v0.122.0 and allow SDK to use v0.124.0
* remove github.com/deepmap/oapi-codegen v1 dep
* fix owner
* add back github.com/deepmap/oapi-codegen v1 dep
* upgrade github.com/influxdata/influxdb-client-go/v2 to get rid of deepmap/oapi-codegen
* migrate to oapi-codegen/runtime
* sdk
* sdk v0.227.0
* initial naive implementation
* Update pkg/services/store/entity/sqlstash/sql_storage_server.go
Co-authored-by: Igor Suleymanov <radiohead@users.noreply.github.com>
* tidy up
* add action column, batch watch events
* initial implementation of broadcast-based watcher
* fix up watch init
* remove batching, it just adds needless complexity
* use StreamWatcher
* make broadcaster generic
* add circular buffer to replay recent events to new watchers
* loop within poll until all events are read
* add index on entity_history.resource_version to support poller
* increment r.Since when we send events to consumer
* switch broadcaster and cache to use channels instead of mutexes
* cleanup
---------
Co-authored-by: Igor Suleymanov <radiohead@users.noreply.github.com>
* chore: Bump google.golang.org/grpc from 1.59.0 to 1.60.1
* Bump google.golang.org/protobuf to v1.32.0
* Fix make protobuf failing with latest protoc and protoc-gen-go
* Re-generate protobuf files
* Re-generate protobuf files
* Bump grafana-plugin-sdk-go
* go mod tidy
* 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