Repository navigation
Commit a5059af
authored
feat!: discovered nodes, run output and node results, service accounts and republish
Upgrade the server, its schedulers, every location and every worker together:
1. Pause every schedule and sensor, start no manual runs, and keep the scheduler running.
2. Let queued and running runs finish, or cancel them.
3. Stop every server process and every separate sqb scheduler on the control database before
the new release starts or migrates it with sqb server migrate or sqb admin.
4. Start the servers and schedulers on the new release, which applies control store
migrations 0006 to 0009.
5. Upgrade and restart every location, so each publishes its project again.
6. Once every location has published again, resume schedules and sensors.
A control store that an earlier work-in-progress build of this release migrated to version 7, 8
or 9 has a different schema at the same version, and must be recreated.
feat(python-nodes): discovered nodes, with @discover and @asset(for_each=...), run in parallel up to max_parallel
feat(location): republish a served location on request, with sqb location republish, the API or the UI, and read its discovered sets back
feat(runs): keep run output in a local or S3 output store, with paged, searchable and downloadable reads, a per-run byte cap and retention
feat(runs): record what each run node did: table rows, progress, no-change reason and not run
feat(ui): the run page shows each node's rows, checks, logged lines and output, and plans a selection with Plan these
feat(server): service accounts with sqbk_ API keys, managed with sqb admin and in the UI
feat(admin): sqb admin prints one line naming what it did, and JSON with --json
feat(dev): sqb dev accepts named hosts with --allow-host and a listen address with --host
fix(cli): Ctrl+C stops any command at any point, including at a sign-in prompt, with exit code 130
fix(plan): sqb plan plans as usual when a provider secret is missing and lists what can't run
fix(secrets): give advice that fits the command when a provider secret is missing
fix(triggers): pause or resume a schedule whose job can't be read, with trigger.toggle on every node of its target
fix(sensors): an unreadable stored tick no longer fails the sensor page or trigger list, and manual builds send check events
fix(runs): keep error and diagnostic text without NUL, or redacted, so PostgreSQL stores it
fix(compiler): keep an expansion from opening or extending a comment
fix(dev): sqb dev doesn't republish when a run writes its output inside the project
fix(discovery): a discovered item that names a node the project lacks fails only its own set
fix(deploy): the server image and compose.yml keep run output on a volume
Also: a model's table rows and a loader's affected rows stay on host results; Ctrl+C ends a command without loading the failure classes, and Recall records a swallowed interrupt as cancelled.
BREAKING CHANGE: This release changes the control store, the location and worker protocol, Python nodes, reruns and command output.
- Upgrade: the server, its schedulers, every location and every worker must run this release. Work polls require `scope`, a location's publication request carries `generation`, `rediscover`, `previous` and `seed`, and a run's execution always carries `discovered`.
- Control store: migrations 0006 to 0009 add node results, the run output index, a snapshot's discovered document and service accounts.
- Run page: it has no rerun buttons. Plan these opens the plan page for the selection, and running that plan starts a new run with its own `ctx.root_run_id`. To resume a run, rerun it from failure in the Runs list or with `sqb admin rerun-run --from-failure`, which keep its `ctx.root_run_id`.
- Reruns: rerun from failure, and automatic retries of runs nobody cancelled, include cancelled nodes as well as failed, skipped and unreached ones.
- Python nodes: `ctx.log` is a logger; use `ctx.log.info`, `ctx.log.warning` or `ctx.log.error`.
- Discovered nodes: a @discover function that returns no items fails its set, which keeps its last good items. Providers used by steps of a set with `max_parallel` must be thread-safe, and new SQL waits while those steps run. On in-memory DuckDB, MotherDuck or SQLite targets the items run one at a time.
- Cancels: a cancel waits 5 seconds for discovered steps still running, then records them cancelled and exits without tearing down the providers they may still use, and a sink's forced close leaves them open too.
- Ctrl+C: a command interrupted by Ctrl+C prints `error: interrupted (Ctrl+C)` and exits with 130, instead of a KeyboardInterrupt traceback and death by SIGINT.
- sqb plan: a missing provider secret no longer fails it with D012. It lists what the secret stops under Can't run and in `cant_run`, and no longer prints the note naming providers allowed to miss their secrets.
- sqb admin: it prints JSON only with `--json`; add it to scripts that parse its output.
- Run output: with a SQLite control database it is kept in `output` beside the database; with PostgreSQL in the service user's state folder (`$XDG_STATE_HOME/sqlbuild/output` or `~/.local/state/sqlbuild/output`). Set `[output] store` to keep it on a persistent volume, in the same change as the upgrade, as earlier releases refuse an `[output]` section.1 parent 9245cba commit a5059af
821 files changed
Lines changed: 46316 additions & 10469 deletions
File tree
- clients/typescript
- src
- tests
- crates
- sqlbuild-analysis/src
- job_settings
- planner_selection
- _helpers
- tests
- python_selection
- _helpers
- tests
- sql_macros
- _helpers
- parsing
- rendering
- typing
- sqlbuild-attachments/src
- audits
- _helpers
- main
- tests
- cursor_intrinsics/_helpers
- sqlbuild-cli
- src
- adhoc
- argv
- main
- dev_screen
- _helpers
- tests
- native_commands
- _helpers
- admin
- command
- location
- main
- tests
- person_login
- _helpers
- main
- server_config
- tests
- native_commands
- admin
- republish
- sqlbuild-core/src
- build_progress
- _helpers
- main
- tests
- process_environment/main
- redaction
- _helpers
- main
- tests
- screen_text/tests
- sqlbuild-discovery/src/project_validation/_helpers
- sqlbuild-host/src
- entries
- _helpers
- sqlbuild-orchestration
- src
- api
- _helpers
- authentication
- resources
- main
- authorization
- _helpers
- main
- decisions
- service_accounts
- credentials
- _helpers
- main
- identities
- service_keys
- sessions
- declarations
- _helpers
- main
- dev_events
- discovered_sets
- _helpers
- main
- platform
- _helpers
- location
- maintenance
- main
- installation
- person_reads
- work
- run_output
- _helpers
- main
- runs
- _helpers
- groups
- lifecycle
- requests
- main
- execution
- requests
- scheduler/_helpers
- sensors
- _helpers/ticks
- main
- snapshots
- main/publication
- store_migrations
- _helpers
- sql
- store
- warehouse_history
- _helpers
- main
- worker
- _helpers
- main
- tests
- api
- plans
- service_accounts
- credentials
- discovered_sets
- run_output
- runs
- claims
- scheduler
- sensors
- store/schema
- sqlbuild-python-base/src
- native_host
- _helpers
- main
- orchestration_reads/main
- records
- _helpers
- compile_records
- compiler_records
- native_classes
- sqlbuild-python-compile/src
- compile_driver/_helpers/stages
- input_loops/_helpers
- model
- resources
- provider_check/main
- sqlbuild-python-front
- src
- attachments
- _helpers
- main
- discovered_sets
- _helpers
- main
- discovery
- _helpers
- python_files
- sources
- main/python_files
- render/_helpers
- calls
- declarations
- expansion
- sqlbuild-python-output/src
- build_progress
- _helpers
- main
- compute_logs/_helpers
- output_capture
- _helpers
- main
- sqlbuild-python-planner/src/planner_resolution/_helpers/references
- sqlbuild-python-project/src
- compiled_project
- graph/_helpers/python_nodes
- native_host/main
- project_snapshot
- _helpers/snapshot
- main
- sqlbuild-python/src/bindings/_helpers
- build_command
- check
- cli
- compile_driver
- dbt_interop
- location_command
- native_host
- plan_command
- sqlbuild-render/src/macro_calls
- main
- tests
- sqlbuild-sqltext/src
- compiler/_helpers/sql_interpolation
- sql_scan
- _helpers
- main
- tests
- deploy
- scripts
- compiler_differential
- classes
- setting_help
- _helpers
- src/sqlbuild
- .agents/skills/sqlbuild/references/docs
- cli
- concepts
- models/hooks
- observability
- python-nodes
- adapters
- bigquery/classes
- clickhouse
- classes
- snowflake/classes
- adapter/contract
- classes
- cli/entry
- main
- compiler
- discovery/_helpers/validation
- python_nodes/_helpers
- executor
- build
- _helpers
- classes
- custom
- load
- _helpers
- main
- node_results
- classes
- main
- python_nodes
- _helpers
- classes
- main
- run
- _helpers
- execution
- validation
- main
- scenario/main
- scheduling
- _helpers
- classes
- main
- playground_templates/waffle_shop/materializations
- provider/classes
- python_nodes
- _helpers
- main
- runtime/execution_limits
- _helpers
- classes
- main
- tests
- e2e
- fixtures/waffle_shop/materializations
- src/sqlbuild/cli/commands/main
- build
- providers
- goldens/compiler
- failure
- seed
- integration/src/sqlbuild
- cli
- commands/main
- recall
- compiler/compiled_project/publication
- docker/compose
- person
- wheel/cli
- executor
- build/custom
- run
- view
- unit
- scripts
- native_module_paths/_helpers
- setting_help
- _helpers
- src/sqlbuild
- adapters
- adapter/contract/classes/node_logger
- compiler/compile/_helpers
- executor
- load
- python_nodes
- _helpers
- classes
- run/_helpers
- provider/classes
- python_nodes/main
- runtime/execution_limits
- ui
- e2e
- src
- lib
- api
- mock
- types
- components
- admin
- lineage
- operate
- platform
- selection
- lineage
- operate
- platform
- run
- routes
- admin
- audit
- people
- [name]
- api
- utils
- roles/[name]
- locations/[id]
- login
- runs/[id]
- api
- output/[node]
- utils
- settings
- triggers/[id]
- website
- examples/waffle-shop/materializations
- src
- content/docs/docs
- cli
- concepts
- models/hooks
- observability
- python-nodes
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
| |||
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
| 174 | + | |
173 | 175 | | |
174 | 176 | | |
175 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
0 commit comments