Skip to content

feat!: discovered nodes, run output and node results, service accounts and republish - #1617

Merged
kvlonge merged 3 commits into
mainfrom
feat/release-b-discovered-nodes
Nov 23, 2026
Merged

kvlonge merged 3 commits into
mainfrom
feat/release-b-discovered-nodes

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Why

Ships release B: discovered nodes, run output and node results on the run page, service accounts, republish, and the fixes found while assembling it.

Changes

  • Discovered nodes: @discover with @asset(for_each=...), in parallel up to max_parallel.
  • Republish a location from the CLI, API or UI.
  • Run output in a local or S3 store, with paged, searchable reads and retention.
  • Per-node rows, progress and outcomes on the reworked run page.
  • Service accounts with sqbk_ API keys.
  • Ctrl+C stops any command with exit code 130.
  • sqb plan plans with missing secrets.
  • Fixes: trigger pause on unreadable jobs, sensor ticks, NUL in error text, expansion comments, sqb dev output watching.

Breaking: the commit message lists every breaking change and the upgrade order. Stop every server and scheduler before the new release migrates the store (0006 to 0009). With PostgreSQL, set [output] store in the same change. Resuming a run is from the Runs list or sqb admin rerun-run --from-failure.

Known issue: during a local run with parallel discovered steps, one Ctrl+C is sometimes not acted on; press it again to stop (CHI-1637).

This is one commit on purpose: squash merges take their message from the commits.

Verification

  • The final head passed make check-ci.
  • The manually dispatched full matrix covers what a draft's run skips.
  • Every test file changed since 0.258.0 ran on SQLite and PostgreSQL.
  • A real service-account key republished over plain HTTP.
  • Each topic branch was reviewed and tested on its own.

…s 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

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.
…the native host path

test: CI fixes for release B: the setting-help scan reads string literals only, the LogLevel host mirror, unix-only run output tests on Windows, a discovered set in the compiler differential's seeds, and regenerated seed goldens
…and Recall records a swallowed interrupt as cancelled

test: platform-absolute output folder paths on Windows, the spinner tests finish their nodes, and an interrupted command's end is bounded by the forced exit's own worst case
@kvlonge
kvlonge marked this pull request as ready for review November 23, 2026 11:38
@kvlonge kvlonge closed this Nov 23, 2026
@kvlonge kvlonge reopened this Nov 23, 2026
@chio-labs-delivery
chio-labs-delivery Bot added this pull request to the merge queue Nov 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 23, 2026
@kvlonge
kvlonge added this pull request to the merge queue Nov 23, 2026
@kvlonge
kvlonge removed this pull request from the merge queue due to a manual request Nov 23, 2026
@kvlonge
kvlonge merged commit a5059af into main Nov 23, 2026
180 of 207 checks passed
@kvlonge
kvlonge deleted the feat/release-b-discovered-nodes branch November 23, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant