Skip to content

refactor!: name the structured query after queries and use last_evaluated_at - #411

Merged
vishr merged 3 commits into
mainfrom
refactor/query-rename
Oct 30, 2026
Merged

vishr merged 3 commits into
mainfrom
refactor/query-rename

Conversation

@vishr

@vishr vishr commented Oct 30, 2026

Copy link
Copy Markdown
Member

What changed

Closes #403. Breaking API change; no aliases or fallback routes.

  • The structured query package is internal/query (was internal/panel):
    panel.Query → query.Spec, PanelTime → TimeOverride,
    QueryShape → Shape. The DuckDB execution layer moves to internal/engine.
  • Routes: POST /api/panels/query → POST /api/queries/run,
    /api/panels/exemplars → /api/queries/exemplars,
    /api/panels/variables/resolve → /api/queries/variables/resolve.
    Authorization classification, the UI client, e2e and eval harnesses,
    and generated API docs change together.
  • Alerts: last_eval → last_evaluated_at (JSON and column), through the new
    migration 20261030000000_alert_last_evaluated_at.sql with its checksum.
  • CI and release engine gates now test ./internal/engine.

Verification

  • just check (pre-push)
  • just test-race on query, engine, api, mcp, fanql, alert, store
  • just db-gen and storage tests; migration ledger extended
  • No credentials, private telemetry, host details, or enterprise-only source
  • API contract change called out above; includes a migration

vishr added 3 commits October 30, 2026 12:41
…ated_at

The structured query serves dashboards, FanQL, MCP and the builder, so
internal/panel becomes internal/query (panel.Query is now query.Spec,
PanelTime is TimeOverride, QueryShape is Shape) and the DuckDB layer it
displaced moves to internal/engine. The read routes move from
/api/panels/* to /api/queries/run, /api/queries/exemplars and
/api/queries/variables/resolve with no aliases; clients, authorization,
tests and generated docs change together.

Alert rules name their last evaluation instant last_evaluated_at like
other event instants; a new migration renames the column.

Closes #403.
@vishr
vishr merged commit 10eba61 into main Oct 30, 2026
17 checks passed
@vishr
vishr deleted the refactor/query-rename branch October 30, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: rename the structured query from panel to query and use _at for alert evaluation time

1 participant