signalk-questdb 2.0.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.coderabbit.yaml +4 -3
- package/README.md +151 -5
- package/dist/api-contract.d.ts +62 -0
- package/dist/config/schema.d.ts +1 -0
- package/dist/config/schema.js +5 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/configpanel/responses.d.ts +33 -1
- package/dist/configpanel/responses.js +89 -0
- package/dist/configpanel/responses.js.map +1 -1
- package/dist/history-v1.js +12 -9
- package/dist/history-v1.js.map +1 -1
- package/dist/history-v2.d.ts +18 -6
- package/dist/history-v2.js +275 -41
- package/dist/history-v2.js.map +1 -1
- package/dist/ilp-writer.d.ts +22 -0
- package/dist/ilp-writer.js +76 -4
- package/dist/ilp-writer.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +326 -58
- package/dist/index.js.map +1 -1
- package/dist/influx-detect.d.ts +19 -0
- package/dist/influx-detect.js +165 -0
- package/dist/influx-detect.js.map +1 -0
- package/dist/migration.d.ts +147 -0
- package/dist/migration.js +824 -0
- package/dist/migration.js.map +1 -0
- package/dist/query-client.d.ts +9 -0
- package/dist/query-client.js +11 -0
- package/dist/query-client.js.map +1 -1
- package/dist/restore.js +9 -0
- package/dist/restore.js.map +1 -1
- package/dist/schema-errors.d.ts +15 -0
- package/dist/schema-errors.js +38 -0
- package/dist/schema-errors.js.map +1 -0
- package/dist/test/configpanel-responses.test.js +90 -1
- package/dist/test/configpanel-responses.test.js.map +1 -1
- package/dist/test/history-v2.test.js +440 -2
- package/dist/test/history-v2.test.js.map +1 -1
- package/dist/test/ilp-writer.test.js +28 -0
- package/dist/test/ilp-writer.test.js.map +1 -1
- package/dist/test/influx-detect.test.d.ts +1 -0
- package/dist/test/influx-detect.test.js +287 -0
- package/dist/test/influx-detect.test.js.map +1 -0
- package/dist/test/migration.test.d.ts +1 -0
- package/dist/test/migration.test.js +851 -0
- package/dist/test/migration.test.js.map +1 -0
- package/dist/test/restore.test.js +47 -0
- package/dist/test/restore.test.js.map +1 -1
- package/package.json +5 -4
- package/public/assets/PluginConfigurationPanel-CR4mD9IH.js +9 -0
- package/public/assets/{index-Z7eUk0W6.js → index-CyI4zKUm.js} +1 -1
- package/public/assets/{virtualExposes-CyrNon4j.js → virtualExposes-BBIkbTtD.js} +1 -1
- package/public/remoteEntry.js +1 -1
- package/public/assets/PluginConfigurationPanel-CyS3A7gD.js +0 -9
package/.coderabbit.yaml
CHANGED
|
@@ -91,7 +91,7 @@ reviews:
|
|
|
91
91
|
defaultSamplingRate)` BEFORE building the ILP line. Flag any
|
|
92
92
|
path that builds the ILP string before throttling.
|
|
93
93
|
- `ILPWriter` (`src/ilp-writer.ts`) buffers and flushes every
|
|
94
|
-
|
|
94
|
+
5000ms or 1000 lines. Don't add per-write socket flushes.
|
|
95
95
|
|
|
96
96
|
## Config schema is the source of truth
|
|
97
97
|
|
|
@@ -211,8 +211,9 @@ reviews:
|
|
|
211
211
|
- The single-worker QuestDB env vars
|
|
212
212
|
(`QDB_SHARED_WORKER_COUNT=1`, etc.) in `src/index.ts` — tuned
|
|
213
213
|
for Pi/Cerbo, do not "fix" by raising.
|
|
214
|
-
- The
|
|
215
|
-
`src/ilp-writer.ts` —
|
|
214
|
+
- The 5000ms default / 1000-line ILP flush thresholds in
|
|
215
|
+
`src/ilp-writer.ts` — the default is deliberate, and the interval
|
|
216
|
+
is operator-configurable (`ilpFlushIntervalMs`, 500-300000).
|
|
216
217
|
- Resource caps applied via signalk-container's
|
|
217
218
|
`ContainerResourceLimits` (memory + cpus) — the defaults of
|
|
218
219
|
`768m` / `1.5 cpus` are deliberate for the typical Signal K
|
package/README.md
CHANGED
|
@@ -9,6 +9,7 @@ Stores all vessel data in QuestDB running as a managed container (via [signalk-c
|
|
|
9
9
|
- **Automatic container management** -- QuestDB runs in Podman/Docker, managed by signalk-container
|
|
10
10
|
- **ILP ingestion** -- writes via InfluxDB Line Protocol over raw TCP (no client library needed)
|
|
11
11
|
- **v2 History API** -- `getValues`, `getPaths`, `getContexts` with all aggregate methods
|
|
12
|
+
- **Source-aware history** -- read one source's rows with `path|sourceRef`, or split a path into one column per recording source with `sourcePolicy=all` (opt-in)
|
|
12
13
|
- **v1 Legacy API** -- `hasAnyData`, `streamHistory`, `getHistory` for WebSocket playback
|
|
13
14
|
- **Path filtering** -- include/exclude paths with glob patterns
|
|
14
15
|
- **Sampling rates** -- per-path throttling to control write volume
|
|
@@ -18,7 +19,7 @@ Stores all vessel data in QuestDB running as a managed container (via [signalk-c
|
|
|
18
19
|
- **On-disk compression** -- LZ4 (fast) or ZSTD (smaller) via QuestDB WAL segment compression
|
|
19
20
|
- **Parquet export** -- native QuestDB Parquet export with configurable compression
|
|
20
21
|
- **CSV export** -- download historical data via REST endpoint
|
|
21
|
-
- **InfluxDB migration** --
|
|
22
|
+
- **InfluxDB migration** -- detect InfluxDB 1.x/2.x, browse its buckets and measurements, and import history into QuestDB with original timestamps
|
|
22
23
|
- **One-click updates** -- check for new QuestDB releases and update from the config panel
|
|
23
24
|
- **Console webapp** -- QuestDB's own SQL console embedded in the Signal K admin UI (admin only)
|
|
24
25
|
- **Config panel** -- status dashboard with row counts, version picker, update check, collapsible compression/migration/export sections
|
|
@@ -34,9 +35,10 @@ The plugin embeds a React config panel in the Signal K Admin UI showing:
|
|
|
34
35
|
- **Image Version** -- dropdown with latest, pre-releases, and last 3 stable releases
|
|
35
36
|
- **Connection** -- managed container toggle, host/ports, PostgreSQL port for Grafana
|
|
36
37
|
- **Recording** -- record self, record AIS targets, startup restore, console webapp, retention days
|
|
38
|
+
- **History** -- allow `sourcePolicy=all`, letting callers split a path by recording source
|
|
37
39
|
- **Path filtering** (collapsible) -- exclude or include-only paths with glob patterns
|
|
38
40
|
- **Compression** (collapsible) -- LZ4/ZSTD codec selection for on-disk storage
|
|
39
|
-
- **InfluxDB Migration** (collapsible) --
|
|
41
|
+
- **InfluxDB Migration** (collapsible) -- detect or enter a URL, pick a bucket/database and time range, then run the import with live progress
|
|
40
42
|
- **Data Export** (collapsible) -- date range picker, Parquet/CSV format, download button
|
|
41
43
|
- **Danger zone** (collapsible) -- "Remove container & all data" to fully reset QuestDB (deletes data Signal K's plugin-uninstall can't, on rootless Podman)
|
|
42
44
|
|
|
@@ -95,6 +97,59 @@ GET /signalk/v2/api/history/values?paths=navigation.position|gps.main,navigation
|
|
|
95
97
|
|
|
96
98
|
Without a sourceRef a path returns all sources mixed, as before.
|
|
97
99
|
|
|
100
|
+
> **Breaking change in the v2 values response.** The per-column source is
|
|
101
|
+
> reported as `$source`, not `sourceRef`. That is the key
|
|
102
|
+
> [signalk-server#2817](https://github.com/SignalK/signalk-server/pull/2817)
|
|
103
|
+
> settled on — its own contract test asserts `$source` — and it matches what
|
|
104
|
+
> v1 playback has always emitted. It applies to every source-bearing column,
|
|
105
|
+
> including the explicit `path|sourceRef` filter that shipped in 2.0.1, so a
|
|
106
|
+
> consumer reading `sourceRef` from a v2 response must be updated. The
|
|
107
|
+
> REQUEST side is unchanged: `paths=<path>|<sourceRef>` still uses that name.
|
|
108
|
+
|
|
109
|
+
#### sourcePolicy=all
|
|
110
|
+
|
|
111
|
+
`sourcePolicy=all`
|
|
112
|
+
([signalk-server#2817](https://github.com/SignalK/signalk-server/pull/2817))
|
|
113
|
+
asks for every source separated without naming them up front. Each path that
|
|
114
|
+
does not already specify a source is expanded into one column per source that
|
|
115
|
+
actually recorded it in range, with the source in the `$source` field of the
|
|
116
|
+
column's `values` entry:
|
|
117
|
+
|
|
118
|
+
```http
|
|
119
|
+
GET /signalk/v2/api/history/values?paths=navigation.speedOverGround&duration=PT1H&sourcePolicy=all
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
```jsonc
|
|
123
|
+
"values": [
|
|
124
|
+
{ "path": "navigation.speedOverGround", "method": "average", "$source": "gps.aux" },
|
|
125
|
+
{ "path": "navigation.speedOverGround", "method": "average", "$source": "gps.main" },
|
|
126
|
+
{ "path": "navigation.speedOverGround", "method": "average" } // unattributed rows
|
|
127
|
+
]
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Named sources come first, sorted, so column order is stable between requests.
|
|
131
|
+
Rows whose source is unset — recorded before the `source` column existed, or
|
|
132
|
+
from a delta that carried none — form their own trailing column with no
|
|
133
|
+
`$source` claim.
|
|
134
|
+
|
|
135
|
+
**Off by default**, behind the plugin setting that allows the policy. Expansion multiplies the work one request can ask for: a path
|
|
136
|
+
recorded by four receivers becomes four queries and four columns, which on a
|
|
137
|
+
Pi-class host turns a cheap request into an expensive one. The sample-bucket
|
|
138
|
+
cap counts expanded columns, so a resolution that is fine unexpanded may be
|
|
139
|
+
rejected once expanded — use a coarser resolution or a shorter range.
|
|
140
|
+
|
|
141
|
+
Two ceilings bound the fan-out. A single path expands into a limited number of
|
|
142
|
+
columns; if more sources recorded it in range, the first named sources in
|
|
143
|
+
sorted order are returned and the rest are dropped, which is reported in the
|
|
144
|
+
plugin debug log only. A whole request is bounded too, and one that exceeds
|
|
145
|
+
that limit is rejected outright rather than truncated — returning some of the
|
|
146
|
+
asked-for series without saying so would be worse than refusing a request that
|
|
147
|
+
is too broad. The error names the limit that was hit.
|
|
148
|
+
|
|
149
|
+
An explicit `path|sourceRef` stays a filter and takes precedence over the
|
|
150
|
+
policy, matching the upstream contract. Requests that name their sources are
|
|
151
|
+
unaffected by the setting either way.
|
|
152
|
+
|
|
98
153
|
### v1 (WebSocket playback)
|
|
99
154
|
|
|
100
155
|
Registered via `app.registerHistoryProvider()`. Supports playback at configurable speed multipliers using chunked reads from QuestDB. Replayed updates carry the recorded sourceRef as `$source`, one update per source, so consumers see the same attribution the live stream had.
|
|
@@ -112,7 +167,12 @@ All mounted at `/plugins/signalk-questdb/api/`:
|
|
|
112
167
|
| GET | `/update/check` | Compare running version against latest release |
|
|
113
168
|
| POST | `/update/apply` | Pull latest image, recreate container, reconnect |
|
|
114
169
|
| POST | `/purge-data` | Remove the QuestDB container and delete all its data (rootless-Podman-safe) |
|
|
115
|
-
| GET | `/migration/detect` |
|
|
170
|
+
| GET | `/migration/detect` | Detect InfluxDB (supports `?url=` for remote) |
|
|
171
|
+
| POST | `/migration/buckets` | List buckets (2.x) or databases (1.x); credentials in the body, never the query string |
|
|
172
|
+
| POST | `/migration/measurements` | List measurements and their field keys in a bucket/database |
|
|
173
|
+
| POST | `/migration/start` | Start an import; returns immediately, progress via `/migration/status` |
|
|
174
|
+
| GET | `/migration/status` | Progress and state of the current/last import |
|
|
175
|
+
| POST | `/migration/cancel` | Cancel the running import |
|
|
116
176
|
| GET | `/export?from=...&to=...&format=parquet` | Parquet or CSV export of the `signalk` numeric table (date range required) |
|
|
117
177
|
| GET | `/full-export/tables` | List tables exposed by the per-table full-export route |
|
|
118
178
|
| GET | `/full-export/:table?from=...&to=...` | Stream a table as Parquet. Optional half-open `[from, to)` range for slicing into shards |
|
|
@@ -127,6 +187,41 @@ wants to slice it into kopia-dedup-friendly shards. Allowed tables:
|
|
|
127
187
|
- Repeated query params (`?from=A&from=B`) and empty strings (`?from=`) are rejected with HTTP 400 — silently downgrading to a full-table export would hide bugs in the caller.
|
|
128
188
|
- Output format and compression follow the plugin's `compression` config (LZ4_RAW or ZSTD), same as `/export`.
|
|
129
189
|
|
|
190
|
+
## Migrating from InfluxDB
|
|
191
|
+
|
|
192
|
+
The **InfluxDB Migration** section of the config panel copies history out of an
|
|
193
|
+
existing InfluxDB into QuestDB. It supports both InfluxDB 1.x (InfluxQL) and
|
|
194
|
+
2.x (Flux).
|
|
195
|
+
|
|
196
|
+
1. **Detect** finds an InfluxDB on `localhost:8086`, or enter a URL for a
|
|
197
|
+
remote one (loopback and private-network addresses only).
|
|
198
|
+
2. Select the detected instance, supply credentials — an API token and
|
|
199
|
+
organisation for 2.x, or username/password for 1.x if authentication is
|
|
200
|
+
enabled — and list its buckets/databases. Credentials are used for the
|
|
201
|
+
import only, are never written to the plugin's settings, and travel in the
|
|
202
|
+
request body rather than the query string (Signal K logs full request URLs).
|
|
203
|
+
3. Pick a bucket/database and a time range, then **Start import**. Progress is
|
|
204
|
+
polled while it runs and the import can be cancelled at any point.
|
|
205
|
+
|
|
206
|
+
How the data maps:
|
|
207
|
+
|
|
208
|
+
- A measurement with the conventional `value` field becomes the Signal K path
|
|
209
|
+
of the same name; a measurement with several named fields becomes
|
|
210
|
+
`measurement.field` paths, so two fields cannot overwrite each other.
|
|
211
|
+
- Numbers go to `signalk`, strings and booleans to `signalk_str` (booleans
|
|
212
|
+
tagged `value_kind=boolean`), and `latitude`/`longitude` field pairs are
|
|
213
|
+
recombined into `signalk_position`.
|
|
214
|
+
- Rows keep their **original nanosecond timestamps**, so imported history sorts
|
|
215
|
+
and aggregates alongside live data.
|
|
216
|
+
- Every imported row is tagged `source=influxdb-import`, which makes it
|
|
217
|
+
distinguishable from live recording — and because the tables deduplicate on
|
|
218
|
+
`(ts, path, context, source)`, **re-running the same range overwrites rather
|
|
219
|
+
than duplicating**. An interrupted import can simply be run again.
|
|
220
|
+
|
|
221
|
+
Anything that cannot be mapped (a gap, an unsupported value type, a latitude
|
|
222
|
+
with no matching longitude) is counted in the run's `skipped` total rather than
|
|
223
|
+
being dropped silently.
|
|
224
|
+
|
|
130
225
|
## Configuration
|
|
131
226
|
|
|
132
227
|
| Setting | Default | Description |
|
|
@@ -146,6 +241,7 @@ wants to slice it into kopia-dedup-friendly shards. Allowed tables:
|
|
|
146
241
|
| Restore vessels on startup | `false` | Replay each vessel's last recorded position after a restart (see Startup restore) |
|
|
147
242
|
| Restore max age (minutes) | `9` | Only replay values recorded within this window |
|
|
148
243
|
| QuestDB console webapp | `true` | Serve QuestDB's console in the Signal K admin UI, admin only (see Console webapp) |
|
|
244
|
+
| Allow `sourcePolicy=all` | `false` | Let History API callers split a path into one column per source (see History API) |
|
|
149
245
|
| Retention (days) | `0` | Auto-delete old partitions (0 = keep forever) |
|
|
150
246
|
| Path filter mode | `exclude` | `exclude` matching paths, or `include` only matching paths |
|
|
151
247
|
| Path filter paths | _(empty)_ | Glob patterns, one per line (e.g. `notifications.*`); empty = record everything, which is the default |
|
|
@@ -194,8 +290,10 @@ before names arrive. The chart fills in gradually instead of showing the traffic
|
|
|
194
290
|
that was there a moment ago.
|
|
195
291
|
|
|
196
292
|
With **Restore vessels on startup** enabled, the plugin replays each vessel's
|
|
197
|
-
last recorded position (plus course, speed, heading and identity
|
|
198
|
-
as soon as it connects, so the chart
|
|
293
|
+
last recorded position (plus course, speed, heading and identity — name,
|
|
294
|
+
dimensions and AIS ship type) from QuestDB as soon as it connects, so the chart
|
|
295
|
+
is populated immediately, with each target drawn in its ship-type colour rather
|
|
296
|
+
than the default.
|
|
199
297
|
|
|
200
298
|
**A restored position is where a vessel _was_, not where it is now.** Nothing is
|
|
201
299
|
dead-reckoned forward. The plugin presents these values as the history they are
|
|
@@ -334,6 +432,54 @@ It is installed — the browser tab is still running the admin UI it loaded
|
|
|
334
432
|
before the update, which looks for the panel bundle it knew then. A hard
|
|
335
433
|
refresh of the tab (Shift-Reload) fixes it.
|
|
336
434
|
|
|
435
|
+
### "Cannot apply a change: the QuestDB container cannot be stopped or removed"
|
|
436
|
+
|
|
437
|
+
The plugin needed to recreate the QuestDB container to apply a change — a new
|
|
438
|
+
image tag, a network or resource setting, a raised file-descriptor limit — but
|
|
439
|
+
the container runtime refused to stop or remove the running container. The
|
|
440
|
+
recreate is **deferred, not abandoned**: QuestDB keeps running and keeps
|
|
441
|
+
recording, on its **previous** configuration. The plugin reports the error
|
|
442
|
+
rather than a "Recording" status, because the change you asked for has not
|
|
443
|
+
been applied and reporting success would be a lie.
|
|
444
|
+
|
|
445
|
+
The usual cause on rootless Podman is an orphaned user namespace left behind
|
|
446
|
+
when the Podman service restarted underneath a running container. The error
|
|
447
|
+
text carries the specific remedy; the general one is to clear the stale
|
|
448
|
+
namespace and remove the container so the plugin can recreate it:
|
|
449
|
+
|
|
450
|
+
```bash
|
|
451
|
+
podman system migrate # re-attaches orphaned user namespaces
|
|
452
|
+
podman ps -a | grep questdb # find the managed container's name
|
|
453
|
+
podman rm -f <name-from-above>
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
Run all three as the **same OS user that owns the container**. Rootless and
|
|
457
|
+
rootful Podman keep separate container stores, so running them as root (or as
|
|
458
|
+
another user) will not find, and will not remove, a rootless container.
|
|
459
|
+
|
|
460
|
+
Look the name up rather than assuming it: the plugin's container is
|
|
461
|
+
`signalk-questdb` behind a prefix that defaults to `sk-` but is configurable
|
|
462
|
+
(`SIGNALK_CONTAINER_NAMESPACE`), so it is not always `sk-signalk-questdb`.
|
|
463
|
+
|
|
464
|
+
Then disable and re-enable the plugin, or restart Signal K. The plugin
|
|
465
|
+
recreates the container with the settings that were pending. Recorded data
|
|
466
|
+
lives in a bind mount under Signal K's data directory, not inside the
|
|
467
|
+
container, so removing the container does not touch it.
|
|
468
|
+
|
|
469
|
+
**Do not** mask `podman.socket` to work around this. That socket is how the
|
|
470
|
+
plugin reaches Podman at all, so masking it turns a deferred recreate into a
|
|
471
|
+
container the plugin cannot manage in any way. (`podman.service` is the unit
|
|
472
|
+
the socket activates, and masking that has the same effect.) If the socket
|
|
473
|
+
itself is unhealthy, restart it rather than masking it:
|
|
474
|
+
|
|
475
|
+
```bash
|
|
476
|
+
systemctl --user restart podman.socket
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
This error is reported by signalk-container 1.29.0 or later. On older
|
|
480
|
+
versions the wedge still happens, but appears only as a repeating drift
|
|
481
|
+
message in the Signal K server log with no plugin error to go with it.
|
|
482
|
+
|
|
337
483
|
### "QuestDB keeps dropping the write connection — the container may be unhealthy or out of memory"
|
|
338
484
|
|
|
339
485
|
This status appears when the plugin's ILP writer connects to QuestDB, gets
|
package/dist/api-contract.d.ts
CHANGED
|
@@ -155,3 +155,65 @@ export interface MigrationSource {
|
|
|
155
155
|
export interface MigrationDetectResponse extends ApiError {
|
|
156
156
|
sources: MigrationSource[];
|
|
157
157
|
}
|
|
158
|
+
/** One InfluxDB container of series: a 2.x bucket or a 1.x database. */
|
|
159
|
+
export interface MigrationBucket {
|
|
160
|
+
/** Bucket name (2.x) or database name (1.x) — what the import reads from. */
|
|
161
|
+
name: string;
|
|
162
|
+
/** 2.x bucket id, absent for 1.x. Only `name` is used in queries. */
|
|
163
|
+
id?: string;
|
|
164
|
+
/** Retention in seconds, 0 meaning infinite. Advisory, shown in the UI. */
|
|
165
|
+
retentionSeconds?: number;
|
|
166
|
+
}
|
|
167
|
+
/** POST /api/migration/buckets — credentials travel in the body. */
|
|
168
|
+
export interface MigrationBucketsResponse extends ApiError {
|
|
169
|
+
buckets: MigrationBucket[];
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* How one InfluxDB measurement maps onto the plugin's tables. The importer
|
|
173
|
+
* decides this per measurement from the field types it actually sees, so a
|
|
174
|
+
* measurement carrying both numbers and strings lands in both tables rather
|
|
175
|
+
* than being dropped.
|
|
176
|
+
*/
|
|
177
|
+
export interface MigrationMeasurement {
|
|
178
|
+
name: string;
|
|
179
|
+
/** Field keys seen on this measurement. */
|
|
180
|
+
fields: string[];
|
|
181
|
+
}
|
|
182
|
+
/** POST /api/migration/measurements — credentials travel in the body. */
|
|
183
|
+
export interface MigrationMeasurementsResponse extends ApiError {
|
|
184
|
+
measurements: MigrationMeasurement[];
|
|
185
|
+
}
|
|
186
|
+
/** Per-run counters, also the shape the panel renders as progress. */
|
|
187
|
+
export interface MigrationProgress {
|
|
188
|
+
/** Rows read from InfluxDB. */
|
|
189
|
+
read: number;
|
|
190
|
+
/** Rows handed to the ILP writer (numeric + string + position). */
|
|
191
|
+
written: number;
|
|
192
|
+
/** Rows read but not written — unmappable value types, blank paths. */
|
|
193
|
+
skipped: number;
|
|
194
|
+
/** Measurements fully drained so far. */
|
|
195
|
+
measurementsDone: number;
|
|
196
|
+
/** Total measurements this run will visit. */
|
|
197
|
+
measurementsTotal: number;
|
|
198
|
+
/** Measurement currently being read, for the status line. */
|
|
199
|
+
currentMeasurement?: string;
|
|
200
|
+
/** Window start currently being read, ISO — lets the user see it advance. */
|
|
201
|
+
currentWindowStart?: string;
|
|
202
|
+
}
|
|
203
|
+
export type MigrationRunState = "running" | "done" | "failed" | "cancelled";
|
|
204
|
+
/** GET /api/migration/status, and the body of POST /api/migration/start. */
|
|
205
|
+
export interface MigrationStatusResponse extends ApiError {
|
|
206
|
+
/** Absent when no run has ever been started this process lifetime. */
|
|
207
|
+
run?: {
|
|
208
|
+
id: string;
|
|
209
|
+
state: MigrationRunState;
|
|
210
|
+
/** Source URL and bucket, echoed so the panel can label the run. */
|
|
211
|
+
url: string;
|
|
212
|
+
bucket: string;
|
|
213
|
+
startedAt: string;
|
|
214
|
+
finishedAt?: string;
|
|
215
|
+
progress: MigrationProgress;
|
|
216
|
+
/** Set when state is "failed". */
|
|
217
|
+
error?: string;
|
|
218
|
+
};
|
|
219
|
+
}
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare const ConfigSchema: Type.TObject<{
|
|
|
19
19
|
recordOthers: Type.TBoolean;
|
|
20
20
|
restoreOnStart: Type.TBoolean;
|
|
21
21
|
restoreMaxAgeMinutes: Type.TNumber;
|
|
22
|
+
historySourcePolicyAll: Type.TBoolean;
|
|
22
23
|
enableConsole: Type.TBoolean;
|
|
23
24
|
retentionDays: Type.TNumber;
|
|
24
25
|
networkName: Type.TString;
|
package/dist/config/schema.js
CHANGED
|
@@ -86,6 +86,11 @@ export const ConfigSchema = Type.Object({
|
|
|
86
86
|
title: "Restore max age (minutes)",
|
|
87
87
|
description: "Only replay values recorded within this many minutes. Matches Freeboard's default AIS expiry (9 minutes), so a restored target is one that would still have been on the chart. Raising this puts progressively staler positions on the chart.",
|
|
88
88
|
}),
|
|
89
|
+
historySourcePolicyAll: Type.Boolean({
|
|
90
|
+
default: false,
|
|
91
|
+
title: "Allow sourcePolicy=all in the History API",
|
|
92
|
+
description: "Let History API callers pass sourcePolicy=all to get one column per recording source instead of all sources merged into one series. Off by default because it multiplies the work a single request can ask for: a path recorded by four receivers becomes four queries and four columns, which on a Pi-class host turns a cheap request into an expensive one. Requests that name a source explicitly (paths=<path>|<sourceRef>) are unaffected and keep working either way.",
|
|
93
|
+
}),
|
|
89
94
|
enableConsole: Type.Boolean({
|
|
90
95
|
default: true,
|
|
91
96
|
title: "QuestDB console webapp",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAU,MAAM,SAAS,CAAC;AAEvC,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC;IACtC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC;QACvB,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,cAAc;QACrB,WAAW,EACT,oHAAoH;KACvH,CAAC;IACF,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC;QAC1B,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EACT,4HAA4H;KAC/H,CAAC;IACF,eAAe,EAAE,IAAI,CAAC,MAAM,CAAC;QAC3B,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EACT,4HAA4H;KAC/H,CAAC;IACF,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC;QACzB,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EACT,uHAAuH;KAC1H,CAAC;IACF,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC;QAC1B,OAAO,EAAE,QAAQ;QACjB,KAAK,EAAE,uBAAuB;KAC/B,CAAC;IAEF,gBAAgB,EAAE,IAAI,CAAC,OAAO,CAAC;QAC7B,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,gDAAgD;QACvD,WAAW,EAAE,oDAAoD;KAClE,CAAC;IAEF,kBAAkB,EAAE,IAAI,CAAC,MAAM,CAAC;QAC9B,OAAO,EAAE,MAAM;QACf,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AAa,EAAE,MAAM,CAAC,aAAa,IAAI,EAAE;QACzC,mEAAmE;QACnE,uEAAuE;QACvE,wEAAwE;QACxE,UAAU,EAAE,MAAM,CAAC,UAAU,KAAK,KAAK;QACvC,YAAY,EAAE,MAAM,CAAC,YAAY,KAAK,KAAK;QAC3C,qEAAqE;QACrE,kEAAkE;QAClE,sEAAsE;QACtE,mDAAmD;QACnD,cAAc,EAAE,MAAM,CAAC,cAAc,KAAK,IAAI;QAC9C,oBAAoB,EAClB,MAAM,CAAC,oBAAoB,IAAI,MAAM,CAAC,oBAAoB,GAAG,CAAC;YAC5D,CAAC,CAAC,MAAM,CAAC,oBAAoB;YAC7B,CAAC,CAAC,CAAC;QACP,uEAAuE;QACvE,wEAAwE;QACxE,0DAA0D;QAC1D,aAAa,EAAE,MAAM,CAAC,aAAa,KAAK,KAAK;QAC7C,sEAAsE;QACtE,uEAAuE;QACvE,qEAAqE;QACrE,kEAAkE;QAClE,qEAAqE;QACrE,qBAAqB;QACrB,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,IAAI,MAAM;QACvD,eAAe,EAAE,MAAM,CAAC,eAAe,IAAI,GAAG;KAC/C,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MigrationSource } from "../api-contract.js";
|
|
1
|
+
import type { MigrationBucket, MigrationMeasurement, MigrationSource, MigrationStatusResponse } from "../api-contract.js";
|
|
2
2
|
/**
|
|
3
3
|
* GET /api/migration/detect returns `{ sources: [...] }`. A body without it
|
|
4
4
|
* means "nothing detected", which is also what an empty array means — so the
|
|
@@ -6,3 +6,35 @@ import type { MigrationSource } from "../api-contract.js";
|
|
|
6
6
|
* as "Detection failed".
|
|
7
7
|
*/
|
|
8
8
|
export declare function toMigrationSources(body: unknown): MigrationSource[];
|
|
9
|
+
/**
|
|
10
|
+
* POST /api/migration/buckets. Same trust boundary as the sources list: every
|
|
11
|
+
* name below is rendered as a React child and used as a query parameter.
|
|
12
|
+
*/
|
|
13
|
+
export declare function toMigrationBuckets(body: unknown): MigrationBucket[];
|
|
14
|
+
/** POST /api/migration/measurements. */
|
|
15
|
+
export declare function toMigrationMeasurements(body: unknown): MigrationMeasurement[];
|
|
16
|
+
/**
|
|
17
|
+
* GET /api/migration/status and POST /api/migration/start.
|
|
18
|
+
*
|
|
19
|
+
* The progress counters drive a percentage and are rendered directly, so a
|
|
20
|
+
* missing or non-numeric counter has to become 0 rather than reaching the
|
|
21
|
+
* render as undefined and printing "NaN%".
|
|
22
|
+
*/
|
|
23
|
+
export declare function toMigrationStatus(body: unknown): MigrationStatusResponse["run"] | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Validate the two `datetime-local` values an import range is entered as.
|
|
26
|
+
*
|
|
27
|
+
* A datetime-local input reads back "" while it is incomplete, and
|
|
28
|
+
* `new Date("")` is an Invalid Date whose `.toISOString()` THROWS. Calling it
|
|
29
|
+
* straight from the click handler would kill the handler before any request
|
|
30
|
+
* went out, leaving the button stuck with no explanation — so the conversion
|
|
31
|
+
* happens here, where the failure is a value rather than an exception.
|
|
32
|
+
*
|
|
33
|
+
* Returns the ISO strings to send, or the reason the range is unusable.
|
|
34
|
+
*/
|
|
35
|
+
export declare function toMigrationRange(from: string, to: string): {
|
|
36
|
+
from: string;
|
|
37
|
+
to: string;
|
|
38
|
+
} | {
|
|
39
|
+
error: string;
|
|
40
|
+
};
|
|
@@ -29,4 +29,93 @@ export function toMigrationSources(body) {
|
|
|
29
29
|
typeof s.status === "string" &&
|
|
30
30
|
(s.version === undefined || typeof s.version === "string"));
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* POST /api/migration/buckets. Same trust boundary as the sources list: every
|
|
34
|
+
* name below is rendered as a React child and used as a query parameter.
|
|
35
|
+
*/
|
|
36
|
+
export function toMigrationBuckets(body) {
|
|
37
|
+
const buckets = isRecord(body) ? body.buckets : undefined;
|
|
38
|
+
if (!Array.isArray(buckets))
|
|
39
|
+
return [];
|
|
40
|
+
return buckets.filter((b) => isRecord(b) &&
|
|
41
|
+
typeof b.name === "string" &&
|
|
42
|
+
(b.id === undefined || typeof b.id === "string") &&
|
|
43
|
+
(b.retentionSeconds === undefined ||
|
|
44
|
+
typeof b.retentionSeconds === "number"));
|
|
45
|
+
}
|
|
46
|
+
/** POST /api/migration/measurements. */
|
|
47
|
+
export function toMigrationMeasurements(body) {
|
|
48
|
+
const list = isRecord(body) ? body.measurements : undefined;
|
|
49
|
+
if (!Array.isArray(list))
|
|
50
|
+
return [];
|
|
51
|
+
return list.filter((m) => isRecord(m) &&
|
|
52
|
+
typeof m.name === "string" &&
|
|
53
|
+
// `fields` is declared required and is mapped over by consumers, so a
|
|
54
|
+
// missing one must not be narrowed to MigrationMeasurement — that would
|
|
55
|
+
// hand `undefined` to a `.map()` that tsc believes is safe.
|
|
56
|
+
Array.isArray(m.fields));
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* GET /api/migration/status and POST /api/migration/start.
|
|
60
|
+
*
|
|
61
|
+
* The progress counters drive a percentage and are rendered directly, so a
|
|
62
|
+
* missing or non-numeric counter has to become 0 rather than reaching the
|
|
63
|
+
* render as undefined and printing "NaN%".
|
|
64
|
+
*/
|
|
65
|
+
export function toMigrationStatus(body) {
|
|
66
|
+
const run = isRecord(body) ? body.run : undefined;
|
|
67
|
+
if (!isRecord(run))
|
|
68
|
+
return undefined;
|
|
69
|
+
if (typeof run.id !== "string" || typeof run.state !== "string")
|
|
70
|
+
return undefined;
|
|
71
|
+
const state = run.state;
|
|
72
|
+
if (state !== "running" &&
|
|
73
|
+
state !== "done" &&
|
|
74
|
+
state !== "failed" &&
|
|
75
|
+
state !== "cancelled")
|
|
76
|
+
return undefined;
|
|
77
|
+
const p = isRecord(run.progress) ? run.progress : {};
|
|
78
|
+
const num = (v) => typeof v === "number" && Number.isFinite(v) ? v : 0;
|
|
79
|
+
const str = (v) => typeof v === "string" ? v : undefined;
|
|
80
|
+
return {
|
|
81
|
+
id: run.id,
|
|
82
|
+
state,
|
|
83
|
+
url: str(run.url) ?? "",
|
|
84
|
+
bucket: str(run.bucket) ?? "",
|
|
85
|
+
startedAt: str(run.startedAt) ?? "",
|
|
86
|
+
finishedAt: str(run.finishedAt),
|
|
87
|
+
error: str(run.error),
|
|
88
|
+
progress: {
|
|
89
|
+
read: num(p.read),
|
|
90
|
+
written: num(p.written),
|
|
91
|
+
skipped: num(p.skipped),
|
|
92
|
+
measurementsDone: num(p.measurementsDone),
|
|
93
|
+
measurementsTotal: num(p.measurementsTotal),
|
|
94
|
+
currentMeasurement: str(p.currentMeasurement),
|
|
95
|
+
currentWindowStart: str(p.currentWindowStart),
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Validate the two `datetime-local` values an import range is entered as.
|
|
101
|
+
*
|
|
102
|
+
* A datetime-local input reads back "" while it is incomplete, and
|
|
103
|
+
* `new Date("")` is an Invalid Date whose `.toISOString()` THROWS. Calling it
|
|
104
|
+
* straight from the click handler would kill the handler before any request
|
|
105
|
+
* went out, leaving the button stuck with no explanation — so the conversion
|
|
106
|
+
* happens here, where the failure is a value rather than an exception.
|
|
107
|
+
*
|
|
108
|
+
* Returns the ISO strings to send, or the reason the range is unusable.
|
|
109
|
+
*/
|
|
110
|
+
export function toMigrationRange(from, to) {
|
|
111
|
+
const fromDate = new Date(from);
|
|
112
|
+
const toDate = new Date(to);
|
|
113
|
+
if (Number.isNaN(fromDate.getTime()) || Number.isNaN(toDate.getTime())) {
|
|
114
|
+
return { error: "Enter a valid From and To date for the import." };
|
|
115
|
+
}
|
|
116
|
+
if (toDate <= fromDate) {
|
|
117
|
+
return { error: "The To date must be after the From date." };
|
|
118
|
+
}
|
|
119
|
+
return { from: fromDate.toISOString(), to: toDate.toISOString() };
|
|
120
|
+
}
|
|
32
121
|
//# sourceMappingURL=responses.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responses.js","sourceRoot":"","sources":["../../src/configpan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CAAC,CAAC,CAAC,OAAO,CAAC;YACvB,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC;YACvB,gBAAgB,EAAE,GAAG,CAAC,CAAC,CAAC,gBAAgB,CAAC;YACzC,iBAAiB,EAAE,GAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC;YAC3C,kBAAkB,EAAE,GAAG,CAAC,CAAC,CAAC,kBAAkB,CAAC;YAC7C,kBAAkB,EAAE,GAAG,CAAC,CAAC,CAAC,kBAAkB,CAAC;SAC9C;KACF,CAAC;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAC9B,IAAY,EACZ,EAAU;IAEV,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC;IAC5B,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;QACvE,OAAO,EAAE,KAAK,EAAE,gDAAgD,EAAE,CAAC;IACrE,CAAC;IACD,IAAI,MAAM,IAAI,QAAQ,EAAE,CAAC;QACvB,OAAO,EAAE,KAAK,EAAE,0CAA0C,EAAE,CAAC;IAC/D,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,WAAW,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC;AACpE,CAAC"}
|
package/dist/history-v1.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { validateTimestamp } from "./query-client.js";
|
|
2
|
+
import { isMissingKindColumn, isMissingSourceColumn } from "./schema-errors.js";
|
|
2
3
|
// v1 replays raw deltas rather than aggregating, so all three value tables can
|
|
3
4
|
// be read in one pass and interleaved by timestamp. Every branch below emits
|
|
4
5
|
// the same unified shape — ts, path, context, valuetext, kind — which
|
|
@@ -46,15 +47,6 @@ function unionValueRowsSQL(where, orderAndLimit, withKind = true, withSource = t
|
|
|
46
47
|
`${strBranch(where, withKind, withSource)} UNION ALL ` +
|
|
47
48
|
`${posBranch(where, withSource)} ${orderAndLimit}`);
|
|
48
49
|
}
|
|
49
|
-
// True for the error QuestDB returns when value_kind has not been added yet.
|
|
50
|
-
function isMissingKindColumn(err) {
|
|
51
|
-
return /Invalid column:\s*value_kind/i.test(err instanceof Error ? err.message : String(err));
|
|
52
|
-
}
|
|
53
|
-
// Same, for the source column (a later migration than value_kind, so each
|
|
54
|
-
// can be missing independently of the other).
|
|
55
|
-
function isMissingSourceColumn(err) {
|
|
56
|
-
return /Invalid column:\s*source/i.test(err instanceof Error ? err.message : String(err));
|
|
57
|
-
}
|
|
58
50
|
// Turn a unified row back into the value a Signal K delta carries. Numbers
|
|
59
51
|
// must not stay strings (consumers do arithmetic on them), positions must be
|
|
60
52
|
// objects again, and a value recorded as a boolean must replay as a boolean.
|
|
@@ -186,12 +178,23 @@ export function createHistoryProviderV1(queryClient, selfContext, debug) {
|
|
|
186
178
|
return await queryClient.exec(build(state.withKind, state.withSource));
|
|
187
179
|
}
|
|
188
180
|
catch (err) {
|
|
181
|
+
// Each degradation is announced ONCE per state object, not per query:
|
|
182
|
+
// the retry is deliberate and keeps playback working, but it silently
|
|
183
|
+
// changes what the caller gets back, and "playback works but the data
|
|
184
|
+
// looks wrong" is far harder to diagnose than a line in the log.
|
|
189
185
|
if (state.withKind && isMissingKindColumn(err)) {
|
|
190
186
|
state.withKind = false;
|
|
187
|
+
debug("history v1: signalk_str has no 'value_kind' column, so values " +
|
|
188
|
+
'recorded as booleans replay as the strings "true"/"false" — ' +
|
|
189
|
+
"their original type is not recoverable. Re-create or migrate " +
|
|
190
|
+
"the table to restore boolean replay.");
|
|
191
191
|
continue;
|
|
192
192
|
}
|
|
193
193
|
if (state.withSource && isMissingSourceColumn(err)) {
|
|
194
194
|
state.withSource = false;
|
|
195
|
+
debug("history v1: tables have no 'source' column, so replayed updates " +
|
|
196
|
+
"carry no $source attribution. Re-create or migrate the tables " +
|
|
197
|
+
"to restore it.");
|
|
195
198
|
continue;
|
|
196
199
|
}
|
|
197
200
|
throw err;
|
package/dist/history-v1.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history-v1.js","sourceRoot":"","sources":["../src/history-v1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAiBnE,+EAA+E;AAC/E,6EAA6E;AAC7E,sEAAsE;AACtE,4EAA4E;AAC5E,uCAAuC;AACvC,EAAE;AACF,6EAA6E;AAC7E,6EAA6E;AAC7E,6EAA6E;AAC7E,4EAA4E;AAC5E,yDAAyD;AACzD,wEAAwE;AACxE,4EAA4E;AAC5E,6EAA6E;AAC7E,cAAc;AACd,SAAS,SAAS,CAAC,UAAmB;IACpC,OAAO,UAAU,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,sBAAsB,CAAC;AACxE,CAAC;AAED,SAAS,SAAS,CAAC,KAAa,EAAE,UAAmB,EAAE,IAAI,GAAG,EAAE;IAC9D,OAAO,CACL,6BAA6B,SAAS,CAAC,UAAU,CAAC,WAAW;QAC7D,mCAAmC;QACnC,oCAAoC,KAAK,GAAG,IAAI,EAAE,CACnD,CAAC;AACJ,CAAC;AAED,6EAA6E;AAC7E,sEAAsE;AACtE,2EAA2E;AAC3E,4EAA4E;AAC5E,2EAA2E;AAC3E,wBAAwB;AACxB,SAAS,SAAS,CAChB,KAAa,EACb,QAAiB,EACjB,UAAmB,EACnB,IAAI,GAAG,EAAE;IAET,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,sBAAsB,CAAC;IAC9E,OAAO,CACL,6BAA6B,SAAS,CAAC,UAAU,CAAC,WAAW;QAC7D,wBAAwB,IAAI,QAAQ;QACpC,0BAA0B,K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