You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 49817f3
Browse filesBrowse the repository at this point in the historyBrowse files
feat(location): sync a location only after runs end or on request (#1421)
* fix(location): keep a smaller statistics page after a failed statistics read
A statistics read that timed out halved the shared page limit and rewound to
catalog. Finishing catalog reset that limit to the maximum, so statistics
retried at full size, timed out again and looped, keeping the warehouse busy.
Statistics now has its own page limit: it survives the rewind and returns to
the maximum once a statistics scan completes.
* fix(snowflake): sync the catalog and check schemas without a running warehouse
A code location's catalog sync listed relations and columns through
information_schema, and every Snowflake connection checked its session
schema through information_schema.schemata. Both need a running warehouse,
so each sync cycle resumed it and kept it from suspending.
The catalog page now uses the schema-scoped SHOW listings the build already
uses when the adapter provides them, and schema_exists asks SHOW SCHEMAS,
falling back to the information schema for names SHOW LIKE cannot express.
* feat(location): mirror column migrations, node results and consumption state
The location sync now reads every state table SQLBuild writes. Column
migrations, node results and consumption join the other kinds, ahead of
catalog and statistics. Node result and consumption rows have no event
ID, so the server derives one from their identity columns, and retried
identical rows collapse to one.
Each kind names its source state table, and a test fails when a state
table has no kind. The janitor's built-in exclusions now use the same
list. The warehouse_metadata main modules are grouped into ingest,
location-read and person-read buckets.
* fix(state): page state tables without event IDs on Snowflake and SQL Server
A table without an event_id column pages with a NULL placeholder key.
The history SQL wrapped that key in the adapter's binary conversion, and
Snowflake rejects TO_BINARY(NULL, 'UTF-8'). The placeholder now stays a
bare NULL and is left out of ORDER BY, where SQL Server rejects
constants.
* chore(location): point duplicate-code exemptions at the moved ingest and person-read modules
* refactor(location): keep each sync kind's names in one table
* test(location): accept one relation prefix in migration history fixtures
* feat(location): read the warehouse only after a run ends
An idle location no longer polls the warehouse every 30 seconds. It asks
the control server every 5 seconds whether a run for its target ended
since its last synchronization began, and starts one only then. The first
synchronization still runs at startup, and full reconciliation still runs
on the first synchronization after its interval.
* feat(location): sync a location from the warehouse on request
People with connection-test access can ask a location to read SQLBuild's
state and catalog from the warehouse now, with Sync now on the location
page or sqb control sync. The request is audited location work that the
location acknowledges and follows with a sync, or one more sync after the
current one.
* chore: count only shipped code in GitHub's language statistics
Test suites, development scripts and benchmarks are marked as
documentation for Linguist.
* test(location): refuse sync requests outside their location, target and role
The sync-due read refuses another location, another target's session and a
stale generation, and answers only two times. A sync request is refused
outside the Developer's location and target and for Viewer and Operator.
* fix(location): keep a quiet location's last sync visible
Locations now sync only after runs, so location health reads every
retained day instead of the last two. Sync now waits for a changed sync
report instead of comparing browser and server clocks, and stops waiting
when the request expires. sqb control sql without a node and sync with a
node are usage errors.
* fix(ui): end the Sync now wait on any new sync report
A requested sync that fails the same way as before now ends the wait too.
Copy file name to clipboardExpand all lines: crates/sqlbuild-cli/src/argv/command_table.json
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -82,12 +82,12 @@
82
82
"name": "control",
83
83
"parser": {
84
84
"prog": "sqb control",
85
-
"description": "Read one exact node's current published SQL using your saved sqb login session. Results are JSON; progress goes to stderr. No project or warehouse connection is opened.",
85
+
"description": "Use your saved sqb login session to read one exact node's current published SQL, or to ask a location to sync from the warehouse now. Results are JSON; progress goes to stderr. No project or warehouse connection is opened.",
{"kind": "help", "options": ["-h", "--help"], "dest": "help", "nargs": 0, "default": {"suppress": true}, "help": "show this help message and exit", "group": 1},
89
-
{"kind": "store", "dest": "person_action", "choices": ["sql"], "help": "inspect published raw and compiled SQL", "group": 0},
90
-
{"kind": "store", "dest": "person_node", "help": "exact published node key, for example model:orders (not a selector)", "group": 0},
89
+
{"kind": "store", "dest": "person_action", "choices": ["sql", "sync"], "help": "sql: inspect published raw and compiled SQL; sync: ask the location to read SQLBuild's state and catalog from the warehouse now", "group": 0},
90
+
{"kind": "store", "dest": "person_node", "nargs": "?", "help": "for sql: exact published node key, for example model:orders (not a selector)", "group": 0},
91
91
{"kind": "store", "options": ["--server"], "dest": "login_server", "required": true, "help": "HTTPS SQLBuild server origin used by sqb login", "group": 1},
0 commit comments