Skip to content

Commit b9ec5eb

Browse files
authored
Merge pull request #42 from VibeEngineeringAI/sync/upstream-oct16-compatible
Sync upstream with gradual SQL view conversion and compatible error tools
2 parents bd20b04 + e57d1ed commit b9ec5eb

38 files changed

Lines changed: 3199 additions & 387 deletions

‎README.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,19 @@ Some of the key highlights include:
3737

3838
## Quickstart
3939

40-
Download and run the Parseable binary on your laptop:
40+
Download the latest published binary from this fork (`VibeEngineeringAI/parseable`).
41+
The installer requires a published release containing the asset for your platform;
42+
it will fail if one is unavailable.
4143

4244
```bash
43-
curl -fsSL https://logg.ing/install | bash
45+
curl -fsSL https://raw.githubusercontent.com/VibeEngineeringAI/parseable/main/scripts/download.sh | sh
4446
```
4547

4648
<details>
4749
<summary>For Windows</summary>
4850

4951
```pwsh
50-
powershell -c "irm https://logg.ing/install-windows | iex"
52+
powershell -c "irm https://raw.githubusercontent.com/VibeEngineeringAI/parseable/main/scripts/download.ps1 | iex"
5153
```
5254
</details>
5355

‎docker-compose-distributed-test-with-kafka.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ services:
7272
- P_USERNAME=parseableadmin
7373
- P_PASSWORD=parseableadmin
7474
- P_CHECK_UPDATE=false
75+
- P_SEND_ANONYMOUS_USAGE_DATA=false
7576
- P_PARQUET_COMPRESSION_ALGO=snappy
7677
- P_MODE=query
7778
- RUST_LOG=warn
@@ -113,6 +114,7 @@ services:
113114
- P_USERNAME=parseableadmin
114115
- P_PASSWORD=parseableadmin
115116
- P_CHECK_UPDATE=false
117+
- P_SEND_ANONYMOUS_USAGE_DATA=false
116118
- P_PARQUET_COMPRESSION_ALGO=snappy
117119
- P_MODE=ingest
118120
- P_INGESTOR_ENDPOINT=parseable-ingest-one:8000
@@ -161,6 +163,7 @@ services:
161163
- P_USERNAME=parseableadmin
162164
- P_PASSWORD=parseableadmin
163165
- P_CHECK_UPDATE=false
166+
- P_SEND_ANONYMOUS_USAGE_DATA=false
164167
- P_PARQUET_COMPRESSION_ALGO=snappy
165168
- P_MODE=ingest
166169
- P_INGESTOR_ENDPOINT=parseable-ingest-two:8000

‎docker-compose-distributed-test.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ services:
4343
- P_USERNAME=parseableadmin
4444
- P_PASSWORD=parseableadmin
4545
- P_CHECK_UPDATE=false
46+
- P_SEND_ANONYMOUS_USAGE_DATA=false
4647
- P_PARQUET_COMPRESSION_ALGO=snappy
4748
- P_MODE=query
4849
- RUST_LOG=warn
@@ -80,6 +81,7 @@ services:
8081
- P_USERNAME=parseableadmin
8182
- P_PASSWORD=parseableadmin
8283
- P_CHECK_UPDATE=false
84+
- P_SEND_ANONYMOUS_USAGE_DATA=false
8385
- P_PARQUET_COMPRESSION_ALGO=snappy
8486
- P_MODE=ingest
8587
- P_INGESTOR_ENDPOINT=parseable-ingest-one:8000

‎docker-compose-gcs-distributed-test.yaml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ services:
1818
- P_USERNAME=parseableadmin
1919
- P_PASSWORD=parseableadmin
2020
- P_CHECK_UPDATE=false
21+
- P_SEND_ANONYMOUS_USAGE_DATA=false
2122
- P_PARQUET_COMPRESSION_ALGO=snappy
2223
- P_MODE=query
2324
- RUST_LOG=warn
@@ -33,7 +34,7 @@ services:
3334
restart_policy:
3435
condition: on-failure
3536
delay: 20s
36-
max_attempts:
37+
max_attempts: 3
3738
volumes:
3839
- "${GCS_CREDENTIALS_PATH:-./credentials}:/parseable/svc/:ro,z"
3940
# ingest server one
@@ -52,6 +53,7 @@ services:
5253
- P_USERNAME=parseableadmin
5354
- P_PASSWORD=parseableadmin
5455
- P_CHECK_UPDATE=false
56+
- P_SEND_ANONYMOUS_USAGE_DATA=false
5557
- P_PARQUET_COMPRESSION_ALGO=snappy
5658
- P_MODE=ingest
5759
- P_INGESTOR_ENDPOINT=parseable-ingest-one:8000

‎docker-compose-test-with-kafka.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ services:
4444
- P_USERNAME=parseableadmin
4545
- P_PASSWORD=parseableadmin
4646
- P_CHECK_UPDATE=false
47+
- P_SEND_ANONYMOUS_USAGE_DATA=false
4748
- P_PARQUET_COMPRESSION_ALGO=snappy
4849
- P_KAFKA_CONSUMER_TOPICS=test-logs-stream
4950
- P_KAFKA_BOOTSTRAP_SERVERS=kafka-0:9092

‎docker-compose-test.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ services:
4242
- P_USERNAME=parseableadmin
4343
- P_PASSWORD=parseableadmin
4444
- P_CHECK_UPDATE=false
45+
- P_SEND_ANONYMOUS_USAGE_DATA=false
4546
- P_PARQUET_COMPRESSION_ALGO=snappy
4647
- MAX_PERIODIC_LOCAL_SYNC_CYCLES=1
4748
- RUST_LOG=warn

‎docs/sql-filter-conversion.md‎

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Saved SQL filter compatibility and conversion
2+
3+
Dataset-scoped SQL filters and upstream SQL filters using `stream_name: "sql"`
4+
are both supported. Existing views are not automatically converted. New native
5+
Logs views keep their dataset-scoped format until the owner chooses **Convert to
6+
SQL view** in Saved views. Converted views still open in the original dataset;
7+
`explorer_state` retains their dataset, query controls, time range and display
8+
settings. Editing a converted view keeps it converted.
9+
10+
The native explorer reads both formats. Classic filters without native explorer
11+
state remain visible under their original dataset, but cannot be opened or
12+
converted by the native explorer. The literal `sql` is a reserved dataset name,
13+
so it cannot collide with a user-created dataset.
14+
15+
## Backend operation
16+
17+
```
18+
POST /api/v1/filters/{filter_id}/convert-to-sql
19+
```
20+
21+
The endpoint takes no JSON payload and returns the complete saved filter. It
22+
requires filter-update permission and an owner-or-admin check. Only SQL filters
23+
can be converted. The server copies the authorized stored record, preserving
24+
its ID, owner, query, time filter and extra metadata. Repeating the request is
25+
safe, including after an interrupted cleanup. Admin updates also preserve the
26+
original owner.
27+
28+
Ordinary create and update requests accept a valid dataset name or, for SQL
29+
filters only, the literal `sql`. Path-like names remain invalid. A stale client
30+
cannot turn a converted SQL filter back into a dataset-scoped one by sending its
31+
old stream name.
32+
33+
## Reconciliation and recovery
34+
35+
Persistence uses `users/<owner>/filters/<stream>/<id>.json`. Conversion writes
36+
the `sql` copy first, updates the server cache, then removes obsolete copies of
37+
the same owner's filter ID. Cleanup failure returns an error, while the durable
38+
new copy remains available for retry. Deletion removes aliases before the
39+
current copy, so a successful deletion cannot leave an older copy to return on
40+
restart.
41+
42+
Startup reconciliation groups records by owner and ID within each tenant. When
43+
both canonical SQL and legacy SQL copies exist, it deterministically keeps the
44+
canonical copy and removes obsolete SQL copies. A legacy record with no
45+
canonical copy is left in its existing format. Ambiguous legacy-only duplicates
46+
are selected deterministically without deleting the alternatives. Cleanup
47+
failures are logged and can be retried on the next startup or conversion; there
48+
is no one-time completion flag that could hide unfinished work.
49+
50+
Older administrator edits could also leave the same filter ID under different
51+
owners. These records are retained independently. Each owner, including an
52+
administrator, can manage their own copy; an administrator without a copy can
53+
manage another owner's record only when the ID is unambiguous. The native
54+
Saved views selector distinguishes the owners' copies.
55+
56+
A process-wide async lock serializes filter persistence and cache changes.
57+
This follows the existing single-query-server ownership model: it is not a
58+
distributed lock, and concurrent writes through multiple independent query
59+
servers sharing the same metastore are not coordinated by this change.
60+
61+
Before a rollout, back up stored filter metadata and verify a legacy view can
62+
be opened, converted, edited, restarted and deleted without reappearing. A
63+
rollback to an older native UI will hide converted views because that UI only
64+
understands dataset-scoped records; keep this compatible UI when rolling back
65+
other changes. Conversion does not change log data or delete datasets.
66+
67+
## Regression checks
68+
69+
Run the isolated HTTP/restart smoke test against a newly built server:
70+
71+
```sh
72+
PARSEABLE_BIN=/absolute/path/to/parseable python3 scripts/test-sql-filter-conversion.py
73+
```
74+
75+
It starts its own local-store process and temporary data directories; it does not
76+
contact an existing deployment. The fixture checks owner authorization, admin
77+
updates, conversion retries, stale-client edits, startup cleanup of an injected
78+
legacy duplicate, and delete followed by restart. Rust metastore tests also
79+
exercise cleanup failures, tenant isolation, and ambiguous legacy records.

‎docs/tool-api.md‎

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ Response:
2121
{
2222
"name": "get_dataset_schema",
2323
"title": "Get dataset schema",
24-
"description": "Get columns and data types for a dataset.",
24+
"description": "Get the full Arrow JSON schema by default, or request format=compact for tab-separated column names and types.",
2525
"inputSchema": {
2626
"type": "object",
27-
"properties": { "dataset": { "type": "string", "minLength": 1 } },
27+
"properties": {
28+
"dataset": { "type": "string", "minLength": 1 },
29+
"format": { "type": "string", "enum": ["json", "compact"], "default": "json" }
30+
},
2831
"required": ["dataset"],
2932
"additionalProperties": false
3033
}
@@ -89,3 +92,38 @@ tool.
8992
The REST API is not itself an MCP transport. An MCP adapter maps the registry
9093
response to `tools/list`, forwards calls to this endpoint, and returns the
9194
`CallToolResult` from Parseable through MCP `tools/call`.
95+
96+
## Schema output compatibility
97+
98+
`get_dataset_schema` preserves the full Arrow schema object in
99+
`structuredContent.result` when `format` is omitted or `"json"`. Existing JSON
100+
consumers do not need to change. Set `"format": "compact"` to receive a string
101+
with a `name\ttype` header and one tab-separated row per field. Compact output
102+
escapes tabs, newlines, carriage returns and backslashes and omits metadata and
103+
top-level nullability; it is for inspection, not Arrow schema interchange.
104+
The HTTP schema endpoint likewise defaults to JSON and accepts `?format=compact`.
105+
106+
## Error tools
107+
108+
`list_log_errors` and `list_trace_errors` each require `dataset`, `startTime`,
109+
and `endTime`; `limit` defaults to 50 and is bounded to 1–500. They enforce query
110+
permissions and require logs and traces telemetry, respectively.
111+
The log tool applies exact, half-open time bounds (start inclusive, end exclusive)
112+
to the dataset's configured time partition, or `p_timestamp` by default; `lastSeen`
113+
uses the same timestamp column. Subminute ranges retain their full precision.
114+
115+
`list_log_errors` classifies records by explicit severity, following the native
116+
Errors page's policy. It checks every available `level`, `log_level`, `severity`,
117+
`severity_text` and `severity_description` column using case-insensitive, trimmed
118+
severity names, plus OTel `severity_number` codes 17–24. Pino/Bunyan codes 50 and
119+
60 are accepted only in `level`. Invalid numeric text and fractional codes do
120+
not fail the query or count as valid severities. A dataset without a supported
121+
severity column produces an actionable tool error; message substrings,
122+
`p_log_category` and the presence of exception metadata do not independently
123+
classify records as errors.
124+
125+
The log tool groups by service and error type, returns a sample message, count
126+
and last-seen value, and coalesces supported aliases per row. Its `total` is the
127+
number of returned groups, not an unbounded count of all matching groups. The
128+
native Errors page additionally separates issues by message, so its grouping
129+
and pagination are not identical to this summary tool.

‎frontend/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ This creates `build.zip` with a top-level `dist/` directory, including `dist/ind
7474
- Keystone and LLM settings: native capability pages with explicit limitations and deployment-dependent classic links. See [native screen scope](docs/prism-parity.md#native-missing-screen-scope-2026-10-12).
7575
- Component gallery at `/components`, plus isolated Storybook stories for UI, PromQL, charts, Traces, APM and ingestion setup.
7676

77-
The default log query reads at most 100 rows, with choices up to 10,000. Message search assumes a `message` field. The histogram separately aggregates every matching event through `/query`, using the same captured bounds and predicates as the rows. Its 48 buckets divide elapsed time evenly; they are not calendar-day buckets. AND/OR filters have two levels, at most 12 groups and 50 rules, and support `=`/`!=`; SQL NULL values are excluded by both operators. Saved log views use server `/filters` CRUD, while copy links encode versioned explorer state with fixed absolute bounds. Context uses the existing `/query/context` endpoint with a 101-event bound and requires `p_timestamp` plus a string `message`, `body` or `log`. Large/wide results virtualize rows and columns; sorting and export cover loaded rows only. Wrapped virtual rows show a 96px preview; event details retain the full value. Timezones change display and wall-clock editing while requests retain UTC instants; DST gaps are rejected and repeated times require an earlier/later choice. Demo SQL intentionally supports only a small SELECT subset and rejects unsupported syntax. Full SQL requires a server. SQL multi-dataset generation uses `UNION ALL BY NAME`, fills missing columns with NULL and requires compatible types for common columns, and keeps the 100-row default; demo does not support unions. Incoming query links open or focus a tab while preserving other drafts. Reopening an already-open saved query focuses that tab and preserves its edits. The saved SQL library uses persistent browser local storage, while draft workspaces use session storage independent to each browser tab and survive navigation/reload. Both are scoped to the server and signed-in user (with a separate demo scope); they are not server-synced, and result rows are not persisted. Query handoff parameters are consumed after opening the tab so reloading an edited draft does not reopen the original query. SQL chart previews use the executed query and captured time bounds. Adding a chart to an existing dashboard preserves that dashboard’s time range; a new dashboard starts with the executed range.
77+
The default log query reads at most 100 rows, with choices up to 10,000. Message search assumes a `message` field. The histogram separately aggregates every matching event through `/query`, using the same captured bounds and predicates as the rows. Its 48 buckets divide elapsed time evenly; they are not calendar-day buckets. AND/OR filters have two levels, at most 12 groups and 50 rules, and support `=`/`!=`; SQL NULL values are excluded by both operators. Saved log views use server `/filters` CRUD and support dataset-scoped and canonical SQL views. New saves stay dataset scoped; owners can explicitly convert compatible views to SQL while retaining their query and dataset. Copy links encode versioned explorer state with fixed absolute bounds. Context uses the existing `/query/context` endpoint with a 101-event bound and requires `p_timestamp` plus a string `message`, `body` or `log`. Large/wide results virtualize rows and columns; sorting and export cover loaded rows only. Wrapped virtual rows show a 96px preview; event details retain the full value. Timezones change display and wall-clock editing while requests retain UTC instants; DST gaps are rejected and repeated times require an earlier/later choice. Demo SQL intentionally supports only a small SELECT subset and rejects unsupported syntax. Full SQL requires a server. SQL multi-dataset generation uses `UNION ALL BY NAME`, fills missing columns with NULL and requires compatible types for common columns, and keeps the 100-row default; demo does not support unions. Incoming query links open or focus a tab while preserving other drafts. Reopening an already-open saved query focuses that tab and preserves its edits. The saved SQL library uses persistent browser local storage, while draft workspaces use session storage independent to each browser tab and survive navigation/reload. Both are scoped to the server and signed-in user (with a separate demo scope); they are not server-synced, and result rows are not persisted. Query handoff parameters are consumed after opening the tab so reloading an edited draft does not reopen the original query. SQL chart previews use the executed query and captured time bounds. Adding a chart to an existing dashboard preserves that dashboard’s time range; a new dashboard starts with the executed range.
7878

7979
Logs implementation keeps persisted settings in `logViewReducer.ts`, with explicit dataset reset, saved-view and classic-link transitions. `logFilters.ts` owns expression limits and additions; adding within a group and narrowing the whole expression remain distinct operations. `logQuery.ts` compiles canonical criteria once for the page's row and histogram queries. Changes to client-only filter IDs or empty groups do not refresh the captured time window. Histogram responses carry their bucket geometry to the renderer. Both table modes use `logTable.tsx` for sorting, labels and cells. `logsContract.ts` validates server payloads; `demoLogs.ts` implements the demo methods separately. Saved-view instants, server timestamps and timezone wall-clock inputs retain separate validators because their accepted formats differ.
8080

0 commit comments

Comments
 (0)