Repository navigation
Releases
v1.4.1
Plugin ID: kwdb-tsdb-datasource
Version: 1.4.1
Changed
- Plugin ID is now
kwdb-tsdb-datasource. Submitting v1.4.0 to the catalog
returnedinvalid-id-format: the validator requires theorg-name-type
convention with at least three hyphen-separated parts, and
kwdb-datasourcehas only two.kwdb-datasourcewas never accepted, so no
published version changes identity; data sources created from the v1.4.0 ZIP
have to be recreated after the upgrade.
Fixed
- Backend: the connection pool size no longer trips gosec
G115. The clamp was
applied to a struct field, which gosec does not follow, and the
//nolint:goseccomment that was meant to suppress it only silences
golangci-lint — the gosec run performed by the catalog validator still
reported the conversion as HIGH. It is now clamped on a local variable, which
gosec can follow, so the finding is gone without a#nosecdirective. - Backend:
golang.org/x/netupdated from v0.60.0 to v0.62.0, clearing
GO-2026-6860 and GO-2026-6866. Both were reported by the catalog validator's
govulncheckbinary scan of the v1.4.0 archives; the plugin never calls the
vulnerablehtmlsymbols, so a source-mode scan was clean while the binary
scan was not.
Checksums
SHA1: f12a2bf2f69372db5ab89ff34883cb4b312bb314
SHA256: 93cfb7f562a1f0c5898e30f37b82cfd83be57b64992cbfcd958cced79d661bf9
The SHA1 is the value the Grafana plugin submission form asks for.
v1.4.0
Plugin ID: kwdb-datasource
Version: 1.4.0
Changed
- Plugin ID changed from
lumingsun-kwdbtsdb-datasourcetokwdb-datasource,
matching the company Grafana Cloud organizationkwdb. The previous ID was
never published to the Grafana catalog, so there is no catalog upgrade path;
users of the pre-release ZIP must reinstall the plugin and recreate their data
sources.
Checksums
SHA1: cef37ce12110b004bf6e30888f3e23f3dbf1c8c9
SHA256: 3df8467369ea5df9e7d03e02cd2edd4f53444c95c5c2e01559b61288a851346b
The SHA1 is the value the Grafana plugin submission form asks for.
v1.3.0
Plugin ID: lumingsun-kwdbtsdb-datasource
Version: 1.3.0
Added
- Unit tests for the SQL builder and the template variable query parser: all
five builder modes, identifier quoting, window/event argument validation and
the parse/render round trip. - Unit tests for the field reset applied when the table or the window type
changes, the variable support class, the health check error classification and
the connection settings validation. - End-to-end tests for the latest values and window/event builder modes and for
annotation queries (12 new cases). The suite runs in CI against a KWDB
container seeded byscripts/init.sqland passes on Grafana 13.1, 13.2, 13.3
and nightly. - CI now runs the complete Grafana plugin validator (all analyzers) on every
pull request, with the same command and version as the release workflow.
Previously only the metadata analyzer ran in CI; the release workflow has run
the full validator since v1.2.2 (2026-10-28). docs/real-server-verification-2026-10-29.mdrecords the end-to-end runs
against live KWDB instances (addresses and accounts redacted): generated SQL
statements, the Go backend pipeline, Playwright specs, the alerting path and
the TLS modes (require,verify-ca,verify-full, plus plaintext
rejection).RoadMap.md/RoadMap_en.mddescribe the release plan and the items that
are explicitly out of scope.CONTRIBUTING.md,SECURITY.md,CODE_OF_CONDUCT.mdand GitHub issue / PR
templates.
Changed
- The data source registers its template variable editor and query
implementation through thevariablesproperty of the data source instance;
the deprecatedDataSourcePlugin.setVariableQueryEditoris no longer used. - Health check failures are prefixed with a short classification (authentication
failed, database does not exist, connection timed out, TLS negotiation
failed, ...). The original database error, including its SQLSTATE, is still
shown. - Connection settings are validated before the pool is created: the port must
be in 1-65535 andsslmodeonly accepts the four modes offered by the
configuration page. - The constant interpolation fill value is emitted as a quoted string
(interpolate(avg(col), '0')), the form used in the KWDB documentation,
instead of a bare numeric literal. plugin.jsonlinks point at the renamed repository and the plugin declares
category: tsdbfor the Grafana connection directory.- The release workflow verifies that the pushed tag matches the version in
package.json, writes a SHA-256 checksum for the archive and warns when the
CHANGELOG has no section for the version instead of silently falling back. - Documentation: the README troubleshooting section covers the KWDB window
memory budget and the requirement that annotation queries use Table format.
Fixed
- SQL builder: the SELECT list and the WHERE clause now quote the same
identifier when the time column or a metric column contains leading or
trailing whitespace, and a blank interval falls back to the 5m default. - SQL builder: a schema-qualified table name that contains a dot inside quotes
(for example"my.table") is no longer rewritten into two identifiers. - SQL builder: selecting
noneas the aggregation no longer produces a
statement the database rejects. Non-aggregated metric columns are added to the
GROUP BY list; for window queries they are placed before the window
expression, because KWDB requires a grouped window function to be the last
GROUP BY entry. - SQL builder:
COUNT_WINDOWfalls back to a row limit of 100, the value the
"Row limit" field shows. Previously a newly selectedCOUNT_WINDOWgenerated
an empty statement while the field read 100. - SQL builder: a latest-values query without tags now produces a frame whose
first field is the time column, so Grafana keeps treating it as a time series. - SQL builder: gapfill no longer offers
none(interpolate() requires an
aggregate) and coerces a value left over from an older query toavg. - Time macros are no longer expanded inside string literals, quoted identifiers
or comments; nested macro calls are expanded from the inside out. - Template variable queries accept quoted arguments that contain a comma,
reject parentheses in identifiers, and always render a definition the plugin
can parse back. A trailing semicolon separated from the query by whitespace no
longer produces a misleading "unsupported variable query" error. - Structured variable queries are validated for every query type and returned as
a copy, so a caller can no longer mutate the parsed result. - The annotation end-to-end tests match the query request by the generated SQL
instead of the annotation picker.
Security
- Window/event free-form arguments are validated in the builder: event and state
conditions that could terminate the statement or open a comment are rejected,
andCOUNT_WINDOWlimits must be positive integers. sslmodevalues that pgx would silently downgrade to a plaintext connection
(allow,prefer) are rejected.- The Go toolchain baseline is now 1.26.10 and
golang.org/x/netis upgraded to
v0.60.0, clearing the standard-library and HTTP/2 advisories reported by
govulncheck; the dependency scan is blocking in CI and in the release
workflow again.
v1.2.2
Plugin ID: lumingsun-kwdbtsdb-datasource
Version: 1.2.2
Changed
- The packaged plugin README now ships the full user documentation (query editor
modes, time macros, output formats, read-only safety, troubleshooting) instead
of the short summary, so the Grafana plugin catalog page shows the complete
guide. plugin.jsonadds four screenshots (dashboard example, data source
configuration, downsampling query, save & test) andLicense/Support
links for the catalog detail page.
v1.2.1
Plugin ID: lumingsun-kwdbtsdb-datasource
Version: 1.2.1
Security
- Every pooled connection now starts with
default_transaction_read_only = on
and astatement_timeout(default 30s, configurable), so a statement that
slips past the lexical check still cannot write and runaway queries are
cancelled. - The read-only guard now understands
E'...'escape strings, dollar quoting
and nested block comments, closing a multi-statement bypass, and rejects
internal management catalogs (kwdb_internal.*,crdb_internal.*) and
side-effecting functions (pg_sleep,pg_read_file,nextval,
set_config, ...). SHOWis restricted to schema-oriented forms so cluster/session state is not
exposed.- Connection URLs in error messages are redacted; read-only and TLS guidance was
added to the README.
Fixed
$__timeFilterand$__timeGroupnow expand through a paren-matching
scanner:CAST(...)and nested function arguments no longer produce broken
SQL, and every expansion is parenthesised soNOT $__timeFilter(x)keeps its
meaning.- Reaching the row cap now cancels the running query instead of draining the
whole result set. - Database errors raised while scanning rows are reported as downstream errors
instead of plugin errors. - Gapfill
constantmode now emits a numeric constant; interpolation modes use
KWDB's accepted lower-case names (legacyPREV/NEXT/NULLvalues are
normalised). - Latest-values queries use
first()/last()for the time column to match the
selected function, so values and timestamps no longer disagree. datecolumns map to Grafana time fields, anduuid/interval/timevalues
render as readable strings instead of Go representations.- A time series query now fails with a clear message when the configured time
column is missing or containsNULLvalues. - Metadata parsing ignores table-level clauses (
INDEX,CONSTRAINT,
FOREIGN KEY, ...) so the column picker no longer offers phantom columns. - Template-variable tag values are capped at 10,000 entries.
- An empty query returns an explicit "query is empty" message instead of a
read-only rejection.
Changed
queryTimeoutandmaxRowscan be configured per data source.plugin.jsonno longer declaresqueryOptionsthat were never read, and the
minimum Grafana version is 13.1.0 (the version the plugin is built and tested
against).
v1.2.0
add support for splitting latest values by tag in query options and UI
Full Changelog: v1.1.0...v1.2.0
v1.1.0
KWDB TSDB datasource v1.1.0
This release improves the query editor experience, fixes KWDB window query SQL generation, and refreshes the plugin documentation.
What's Changed
Fixes
- SQL preview: The SQL preview is now full width and resizable, with a stable editor height, making generated queries easier to inspect and copy.
- KWDB window queries: Window/Event mode now generates syntax that matches KWDB. Window functions (
TIME_WINDOW,SESSION_WINDOW,EVENT_WINDOW,COUNT_WINDOW,STATE_WINDOW) only appear in theGROUP BYclause, and the select list usesfirst(time_column) AS "time"as the window start.
Documentation
- README: Reorganized the setup and usage documentation and added screenshots and example images to make the plugin easier to get started with.
Full Changelog: v1.0.0...v1.1.0
Grafana submission
To submit this release to Grafana:
- Publish this draft release, then use the following links in the Plugin Submission form:
- Check the Validate plugin step in the release workflow for any warnings that need attention.
This build is attested; view the attestation details here.
v1.0.0
This Github draft release has been created for your plugin.
Note: if this is the first release for your plugin please consult the distributing-your-plugin section of the README
If you would like to submit this release to Grafana please consider the following steps:
- Check the Validate plugin step in the release workflow for any warnings that need attention
- Edit this draft release, adjust these notes accordingly and click Publish Release
- Navigate to https://grafana.com/auth/sign-in/ to sign into your account
- Once logged in click My Plugins in the admin navigation
- Click the Submit Plugin button
- Fill in the Plugin Submission form:
- Paste this .zip asset link in the Plugin URL field
- Paste this .zip.sha1 link in the SHA1 field
If the links above are not working, you must first edit this draft release and publish it.
This build has been attested. You can view the attestation details here
Full Changelog: https://github.com/LumingSun/kwdb-tsdb-datasource/commits/v1.0.0