feat(http): migrate /api/v1/db/timeline to sid-level timeline - #184
Merged
Merged
Conversation
Schema retirement #2 of 5. The `/api/v1/db/timeline` handler now reads from `state.sketch_index` (always attached) via `sketch_db::query::timeline::timeline_for_metric` (PR #183) instead of `state.schemas.timeline_for_metric`. User-visible behavior: - Endpoint always works (no more 503 when schema-registry isn't wired — the sid catalog is always present). - `agg_id` field carries a stable content-derived signature id (xxh64 of `metric + agg_kind + group_by_keys`) instead of the controller-emitted `agg_id` (which is gone after M2.2 / PR #152). - Segments now reflect the sid catalog directly; reconfigure semantics propagate once the next sub-PR (lifecycle reconcile) lands. Test impact: - `test_get_timeline_without_registry_returns_503` rewritten to `..._with_no_sids_returns_empty_200` matching the new semantics. - `test_get_timeline_returns_segments_after_reconfigure` ignored (uses POST /streaming-config → SchemaRegistry::reconcile, which doesn't yet propagate to the sid catalog; re-enabled in the next sub-PR with the lifecycle reconcile). 789/792 lib tests pass (3 ignored — 2 pre-existing + this one). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Schema retirement #2 of 5. The
/api/v1/db/timelinehandler now reads from the sid catalog (state.sketch_index) viasketch_db::query::timeline::timeline_for_metric(PR #183) instead ofstate.schemas.timeline_for_metric.User-visible behavior
agg_idfield carries a stable content-derived signature id (xxh64 ofmetric + agg_kind + group_by_keys).Test impact
test_get_timeline_without_registry_returns_503rewritten to..._with_no_sids_returns_empty_200.test_get_timeline_returns_segments_after_reconfigureignored — uses POST/streaming-config→SchemaRegistry::reconcile, which doesn't yet propagate to the sid catalog. Re-enabled in the next sub-PR.Test plan
cargo test -p data_plane --lib— 789 pass, 3 ignored (2 pre-existing + this one).🤖 Generated with Claude Code