* 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>
* Revert "Chore: Return influxdb query error early before parsing the result (#88549)"
This reverts commit a87c155c06.
* Handle error in buffered parser
* handle error message in streaming parser
* add function to search for free port
* Update pkg/tsdb/influxdb/fsql/fsql_test.go
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
* Update pkg/tsdb/influxdb/fsql/fsql_test.go
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
* fix test
* fix go linting issue
* fix go lint
---------
Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
* 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>
* return error early
* enable gzip between grafana and influxdb
* use json-iterator package for json operations
* revert gzip changes
* update test
* go mod tidy
go work sync
* don't iterate over first column as it is a time column already
* don't iterate over first column as it was handled earlier
* add more flexibility to run the commands
* Update pkg/tsdb/influxdb/influxql/converter/converter.go
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
---------
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
* clean up intervalv2 functions
* use roundInterval from grafana-plugin-sdk-go
* use from grafana-plugin-sdk-go
* have intervalv2 in publicdashboards and remove tsdb/intervalv2
* legacydata cleanup
* remove unused variables
* Update pkg/tsdb/legacydata/interval/interval.go
Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
---------
Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
* create the feature flag
* bring the concurrency in to the play
* Update feature flag
* Use concurrency number from settings
* update influxdb dependency
* use ConcurrentQueryCount from plugin-sdk-go
* use helper method for concurrent query count
* log the error
* add value guard
* add unit tests
* handle concurrency error
* use regex as templateSrv replace format
* use regex as templateSrv replace format for raw queries
* import path fix
* don't use regex formatter
* tag value escape
* tag value escape with wrappers
* polished interpolation logic
* update unit tests
* comments and more place to update
* unit test update
* fix escaping
* handle the string and array of string type separately
* update variable type
* Check the value type before casting it to the string
* set visualization as table by default
* append all values for show diagnostics
* golangci-lint
* append metadata only to first frame
* Have the first iteration
* Prepare bench testing
* rename the test files
* Remove unnecessary test file
* Introduce influxqlStreamingParser feature flag
* Apply streaming parser feature flag
* Add new tests
* More tests
* return executedQueryString only in first frame
* add frame meta and config
* Update golden json files
* Support tags/labels
* more tests
* more tests
* Don't change original response_parser.go
* provide context
* create util package
* don't pass the row
* update converter with formatted frameName
* add executedQueryString info only to first frame
* update golden files
* rename
* update test file
* use pointer values
* update testdata
* update parsing
* update converter for null values
* prepare converter for table response
* clean up
* return timeField in fields
* handle no time column responses
* better nil field handling
* refactor the code
* add table tests
* fix config for table
* table response format
* fix value
* if there is no time column set name
* linting
* refactoring
* handle the status code
* add tracing
* Update pkg/tsdb/influxdb/influxql/converter/converter_test.go
Co-authored-by: İnanç Gümüş <m@inanc.io>
* fix import
* update test data
* sanity
* sanity
* linting
* simplicity
* return empty rsp
* rename to prevent confusion
* nullableJson field type for null values
* better handling null values
* remove duplicate test file
* fix healthcheck
* use util for pointer
* move bench test to root
* provide fake feature manager
* add more tests
* partial fix for null values in table response format
* handle partial null fields
* comments for easy testing
* move frameName allocation in readSeries
* one less append operation
* performance improvement by making string conversion once
pkg: github.com/grafana/grafana/pkg/tsdb/influxdb/influxql
│ stream2.txt │ stream3.txt │
│ sec/op │ sec/op vs base │
ParseJson-10 314.4m ± 1% 303.9m ± 1% -3.34% (p=0.000 n=10)
│ stream2.txt │ stream3.txt │
│ B/op │ B/op vs base │
ParseJson-10 425.2Mi ± 0% 382.7Mi ± 0% -10.00% (p=0.000 n=10)
│ stream2.txt │ stream3.txt │
│ allocs/op │ allocs/op vs base │
ParseJson-10 7.224M ± 0% 6.689M ± 0% -7.41% (p=0.000 n=10)
* add comment lines
---------
Co-authored-by: İnanç Gümüş <m@inanc.io>
* Prepare the test files
* use json files everywhere
* update golden json files
* disable update
* update test file
* fix naming
* lint
* InfluxDB: Add metadata information to first frame only (#78664)
* executedString in first frame only
* lint
* fix tests
* update tests
* don't update
* linting
* update
* update again
* handle nil values
* append in the right array
* add comments
* remove redundant if condition
* Prepare the test files
* use json files everywhere
* update golden json files
* disable update
* update test file
* fix naming
* lint
* InfluxDB: Add metadata information to first frame only (#78664)
* executedString in first frame only
* lint
* fix tests
* update tests
* don't update
* linting
* update
* update again
* Use TimeSeriesWide format for table response
* fix group by query result parsing
* handle labels
* provide a test where result has no tags
* parsing results without time column
* clean the code
* remove the comment line
* more cleaning
* lint
* InfluxDB: Add new truthiness operators (`Is` and `Is Not`) to InfluxQL Editor for use with boolean fields
* InfluxDB: Make the front-end aware of the new operators so that translation between raw and builder works
* Chore: Add tests
* feat: identify type of field value to allow other types to work with Is/Is Not
Tags: always quote
Integer: Don't quote
Float: Don't quote
Boolean: Don't quote
String: Quote
* Chore: Add test-cases for type inference
* Update front-end to infer type for operators Is and Is Not
* chore: Add front-end tests
* chore: add additional front-end tests
* chore: fix failing lint test
* chore: fix tests (run prettier)
This reverts commit 046791e2be.
Is causing malformed frames, and resulting in errors about mismatched field lengths in the logs, No data in the UI, and will cause SSE to panic.
I think this is because of the global slice vars since it seems to take concurrency to replicate it.
* InfluxDB: Add support for `>=` and `<=` comparison operators to InfluxQL Query Builder
* Add front-end support for the new operators
This ensures that the query translates correctly between raw and builder mode
* Chore: add test for new operators
* chore: add front-end tests
* fix: don't skip quoting on `<>`
This preserves the pre-existing behaviour, fixing a failing test
* chore: fix tests
* Add resultFormat to query model
* don't add row name if the result format is table
* No need special formatting since we use unified dataframes
* betterer
* specify visualization type in response
* Unit tests
* fix unit tests
* 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
* Use apache/arrow v13
* remove apache/thrift
* go mod tidy with go1.21.1
* add metrics team as owner
---------
Co-authored-by: Kyle Brandt <kyle@grafana.com>