Skip to content

Commit 49b4934

Browse files
authored
feat!: runs say what failed and how to rerun it, unit tests run locally in DuckDB, health that works through outages (#1628)
Upgrade the server, its schedulers, every location and every worker together: 1. The server's control database migration 0012 rewrites stored `partial` run outcomes as `failed`, and sensors watching `partial` now watch `failed`. 2. Projects declaring `RunEventKind.PARTIAL` must use `RunEventKind.FAILED`. 3. `sqb scenario test --local` and `--strict` are removed: use `--run-on local`. 4. Container health checks can use `/livez` (process) or `/api/health` (dependencies). feat!: a run with any failure is failed; the partial outcome and RunEventKind.PARTIAL are removed feat!: unit tests and scenarios run locally in DuckDB when SQLQuack can convert them (--run-on auto|local|warehouse), falling back to the warehouse otherwise feat: run_failed events and alerts carry the run URL, the run-level error, failed audits with their warehouse error, duration, trigger and counts feat: audit:, run:, failed: and skipped: selectors in plan, build, test, audit and check, from local history or a server feat: the rerun page runs its selection as sqb build, with no hidden rerun state feat: a singular audit whose reads the target doesn't have is not run, counted on its own, instead of failing the job feat: the run page leads with what failed, one text filter for the log, quieter header and Details drawer feat(server): name the control database's real cause, and health that answers without it (/livez, /api/health, /status) feat(ui): health and outages in the shell, a public Status page feat(location): run-history sync retries within a minute and never stops for an unreached warehouse feat: failing event sinks, webhooks and run-history syncs are attention items fix: an audit whose query couldn't run keeps the warehouse's error fix(worker): sqb audit reports a singular audit under its own check fix(cli): an audit that isn't run shows only its NOT RUN row fix: Started execution is published before the Python phase, and no warehouse connection opens when the SQL phase has nothing to run fix(cli): the plan line leaves out zero counts build: pin SQLQuack 0.24.1
1 parent 41eab04 commit 49b4934

782 files changed

Lines changed: 22822 additions & 3424 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Cargo.lock‎

Lines changed: 191 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -215,22 +215,22 @@ sqlbuild-state = { path = "crates/sqlbuild-state" }
215215
# SQL lint Rules, quality Rules and the formatter.
216216
sqlclean = { git = "https://github.com/sqlstack-io/sqlclean.git", rev = "462a98779a2a11ff11884ff79feefbfb190ab8d1" }
217217
# SQL change fingerprints over SQLQuack's tokenizers.
218-
sqlquack-fingerprint = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d", features = ["bigquery", "databricks", "duckdb", "postgres", "snowflake", "sqlite", "sqlserver"] }
218+
sqlquack-fingerprint = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "63d0ce3baf8c981fac3c7164cbeb653f3ddb83a9", features = ["bigquery", "databricks", "duckdb", "postgres", "snowflake", "sqlite", "sqlserver"] }
219219
# Scopes, name resolution, types and lineage for the native analysis route.
220-
sqlquack-semantics = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d", features = ["bigquery", "clickhouse", "databricks", "duckdb", "postgres", "snowflake", "sqlite", "sqlserver"] }
220+
sqlquack-semantics = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "63d0ce3baf8c981fac3c7164cbeb653f3ddb83a9", features = ["bigquery", "clickhouse", "databricks", "duckdb", "postgres", "snowflake", "sqlite", "sqlserver"] }
221221
# SQLQuack's Snowflake-family parser and tokenizer, reached as SQLQuack exposes them.
222-
sqlquack-parse = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
222+
sqlquack-parse = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "63d0ce3baf8c981fac3c7164cbeb653f3ddb83a9" }
223223
# SQLQuack's syntax tree and lossless tokens.
224-
sqlquack-syntax = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
224+
sqlquack-syntax = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "63d0ce3baf8c981fac3c7164cbeb653f3ddb83a9" }
225225
# SQLQuack's tokenizer: lossless tokens and tokenize failures.
226-
sqlquack-tokenize = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
227-
sqlquack-syntax-bigquery = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
228-
sqlquack-syntax-clickhouse = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
229-
sqlquack-syntax-databricks = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
230-
sqlquack-syntax-duckdb = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
231-
sqlquack-syntax-postgres = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
232-
sqlquack-syntax-sqlite = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
233-
sqlquack-syntax-sqlserver = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "083ccc7121a43a3c471d646ef45845ce3ea69d6d" }
226+
sqlquack-tokenize = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "63d0ce3baf8c981fac3c7164cbeb653f3ddb83a9" }
227+
sqlquack-syntax-bigquery = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "63d0ce3baf8c981fac3c7164cbeb653f3ddb83a9" }
228+
sqlquack-syntax-clickhouse = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "63d0ce3baf8c981fac3c7164cbeb653f3ddb83a9" }
229+
sqlquack-syntax-databricks = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "63d0ce3baf8c981fac3c7164cbeb653f3ddb83a9" }
230+
sqlquack-syntax-duckdb = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "63d0ce3baf8c981fac3c7164cbeb653f3ddb83a9" }
231+
sqlquack-syntax-postgres = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "63d0ce3baf8c981fac3c7164cbeb653f3ddb83a9" }
232+
sqlquack-syntax-sqlite = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "63d0ce3baf8c981fac3c7164cbeb653f3ddb83a9" }
233+
sqlquack-syntax-sqlserver = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "63d0ce3baf8c981fac3c7164cbeb653f3ddb83a9" }
234234
stacker = "0.1"
235235
# Counts heap allocations in growth tests, which measure work instead of time.
236236
stats_alloc = "0.1"

‎Makefile‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ rust-check: rust-lint
5858
uv run fensu check
5959
$(MAKE) test-native
6060

61-
NATIVE_TEST_ARGS ?= --workspace --all-features
61+
# Every test binary runs, so one failing crate never hides another crate's failures.
62+
NATIVE_TEST_ARGS ?= --workspace --all-features --no-fail-fast
6263

6364
.PHONY: test-native
6465
test-native:
@@ -219,6 +220,7 @@ E2E_DUCKDB_CLI_DATA_PATHS := \
219220
tests/e2e/src/sqlbuild/cli/commands/main/scenario/test_fixture_columns.py \
220221
tests/e2e/src/sqlbuild/cli/commands/main/scenario/test_local_variant.py \
221222
tests/e2e/src/sqlbuild/cli/commands/main/scenario/test_local_lambda.py \
223+
tests/e2e/src/sqlbuild/cli/commands/main/scenario/test_local_guard.py \
222224
tests/e2e/src/sqlbuild/cli/commands/main/scenario/test_local_escaped_quotes.py \
223225
tests/e2e/src/sqlbuild/cli/commands/main/scenario/test_snapshot_staleness.py \
224226
tests/e2e/src/sqlbuild/cli/commands/main/scenario/test_unmocked_inputs.py
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[
2-
{"nodes": ["success", "failed"], "started": [true, true], "outcome": "partial"},
2+
{"nodes": ["success", "failed"], "started": [true, true], "outcome": "failed"},
33
{"nodes": ["failed", "failed"], "started": [true, true], "outcome": "failed"},
4-
{"nodes": ["success", "cancelled"], "started": [true, true], "outcome": "partial"},
5-
{"nodes": ["success", "skipped"], "started": [true, false], "outcome": "partial"},
4+
{"nodes": ["success", "cancelled"], "started": [true, true], "outcome": "failed"},
5+
{"nodes": ["success", "skipped"], "started": [true, false], "outcome": "failed"},
66
{"nodes": ["success", "warn"], "started": [true, true], "outcome": "warn"},
7-
{"nodes": ["success", "failed"], "started": [true, true], "outcome": "partial"},
7+
{"nodes": ["success", "failed"], "started": [true, true], "outcome": "failed"},
88
{"nodes": ["success", "success"], "started": [true, false], "outcome": "success"},
9-
{"nodes": ["success", "failed"], "started": [true, true], "outcome": "partial"},
9+
{"nodes": ["success", "failed"], "started": [true, true], "outcome": "failed"},
1010
{"nodes": ["success", "success"], "started": [true, true], "outcome": "success"},
1111
{"nodes": ["success", "success"], "started": [true, true], "outcome": "success"},
12-
{"nodes": ["success", "failed"], "started": [true, true], "outcome": "partial"}
12+
{"nodes": ["success", "failed"], "started": [true, true], "outcome": "failed"}
1313
]

‎benchmarks/duckshop/project/orchestration/sensors/edge_cases/edge_job_outcomes_sensor.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
"""Keep warning and partial job outcomes distinct from success."""
1+
"""Keep warning and failed job outcomes distinct from success."""
22

33
from sqlbuild.orchestration import RunEventKind, RunRequest, run_event, sensor
44

55

66
@sensor(
7-
description="Keep warning and partial outcomes distinct from success.",
8-
when=run_event(job="edge_snapshot_orders_job", kinds=[RunEventKind.WARN, RunEventKind.PARTIAL]),
7+
description="Keep warning and failed outcomes distinct from success.",
8+
when=run_event(job="edge_snapshot_orders_job", kinds=[RunEventKind.WARN, RunEventKind.FAILED]),
99
default_status="paused",
1010
)
1111
def edge_job_outcomes_sensor(ctx):

0 commit comments

Comments
 (0)