Commit Graph
9 Commits
Author SHA1 Message Date
ask ec3643dec9 fix(chdb): return error on log_scores row scan failure
ci/woodpecker/push/woodpecker Pipeline was successful
Previously a per-row scan error was logged and skipped with continue, so a
decode failure (e.g. the UInt64->int64 regression) produced a 200 response
with partial or empty data and no signal to the client. Fail the request
instead so the HTTP handlers return 500. Also check rows.Err() after iteration.
2026-05-24 10:48:23 -07:00
ask 6ee1146173 fix(chdb): scan ClickHouse log_scores into signed model fields
ci/woodpecker/push/woodpecker Pipeline was successful
The PostgreSQL model migration regenerated LogScore.ID, MonitorID and
ServerID as signed/pgtype fields, but the ClickHouse log_scores columns
are unsigned (id UInt64, monitor_id/server_id UInt32). clickhouse-go
refuses to scan UInt64 into *int64, so every score row failed to parse
and the scores endpoints returned empty.

Scan each row into locals matching the ClickHouse column types, then
convert into the model, mirroring the existing leap handling. Factor the
shared scan into scanLogScore used by both Logscores and
LogscoresTimeRange.
2026-05-23 23:52:09 -07:00
ask ab2c853fd7 feat(db): migrate from MySQL to PostgreSQL
ci/woodpecker/push/woodpecker Pipeline was successful
Replace MySQL driver with pgx/v5 and pgxpool:
- Update sqlc to use postgresql engine
- Convert query.sql to PostgreSQL syntax ($1 params, CASE WHEN,
  ANY() arrays)
- Replace sql.DB with pgxpool.Pool throughout
- Change nullable types from sql.Null* to pgtype.*
- Update ID types from uint32 to int64 for PostgreSQL compatibility
- Delete MySQL-specific dynamic_connect.go
- Add opentelemetry.gowrap template for tracing
2026-05-24 01:51:42 -07:00
ask 2dfc355f7c style: format Go code with gofumpt
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
Apply consistent formatting to Go source files using gofumpt
as required by pre-commit guidelines.
2025-08-03 16:06:59 -07:00
ask 8262b1442f feat(api): add Grafana time range endpoint for scores
- Add /api/v2/server/scores/{server}/{mode} endpoint
- Support time range queries with from/to parameters
- Return data in Grafana table format for visualization
- Fix routing pattern to handle IP addresses correctly
- Add comprehensive parameter validation and error handling
2025-07-27 02:18:32 -07:00
ask 904f4b1df5 remove slightly less debugging 2024-11-03 07:15:25 +00:00
ask 675e993353 scorer: fix parsing leap column
continuous-integration/drone/push Build is passing
2024-01-20 23:43:22 -07:00
ask e1398e7472 scores: full_history option for internal clients
continuous-integration/drone/push Build is passing
(somewhat inefficient, but for now rarely used ...)
2024-01-20 23:21:21 -07:00
ask 6df51fc19f scores: clickhouse support
continuous-integration/drone/push Build is passing
2024-01-20 19:41:02 -07:00