Skip to content

control-plane-api: run publication tests on catalog-tests - #3418

Open
jgraettinger wants to merge 1 commit into
johnny/v2-tests-3-catalog-testsfrom
johnny/v2-tests-4-publication-tests
Open

control-plane-api: run publication tests on catalog-tests#3418
jgraettinger wants to merge 1 commit into
johnny/v2-tests-3-catalog-testsfrom
johnny/v2-tests-4-publication-tests

Conversation

@jgraettinger

@jgraettinger jgraettinger commented Aug 27, 2026

Copy link
Copy Markdown
Member

Description:

Stack 4 of 5, one commit. Publication tests now call catalog_tests::run_tests in-process, against the build::Output the publication already produced.

Workflow steps:

No change to how a user runs tests — they still publish a draft and see test results in publication logs. What changes is where those results come from and how precisely failures are reported.

Documentation links affected:

None.

Notes for reviewers:

Most of the surface is deletion: data_plane() and its temp-data-plane shell-out, wait_for_sockets, the activate loop that stamped build labels onto derivation specs and activated them at 3 splits, the flowctl-go api test job, and the delete loop that tore it all down again. With no data plane there is nothing to race, so the tokio::select! driving the two jobs goes too. flowctl_go stops being threaded through Publisher, the agent's main, its integration-test harness, and test_server; locate-bin stays, since sops and flow-connector-init still use it.

Two behavior changes worth checking:

  • Failures anchor precisely. Each failing case becomes a tables::Error scoped to the failing step's source URL and JSON pointer, where before a whole run collapsed into one error at flow://publication/test/api/test with "View logs for details". A case the run never reached is reported as an error too, so a publication never silently understates its test coverage.
  • Log gating moved. Logs still stream under the test stream name existing consumers select on, but are now gated by each task's own shards: {logLevel} — so a user who wants a derivation's debug output in their publication logs raises that task's level.

Tests are a passing and a failing derive-sqlite catalog, asserting the failing one surfaces exactly one publication error naming the test and rendering the diff. They need no database, since test_catalog never touches Postgres.


Stack — each PR is based on the one above it, so review only the top commits of each.

  1. Housekeeping and prep for the catalog-test harness #3415 — Housekeeping and prep (merged)
  2. runtime-local: extract the local task-drive layer from flowctl #3416 — runtime-local: extract the local task-drive layer
  3. catalog-tests: the catalog test harness, and flowctl raw test #3417 — catalog-tests: the harness, and flowctl raw test
  4. control-plane-api: run publication tests on catalog-tests #3418 — control-plane-api: run publication tests on catalog-tests ← you are here
  5. Remove the V1 catalog-test machinery #3419 — Remove the V1 catalog-test machinery

@jgraettinger
jgraettinger requested a review from a team August 27, 2026 00:25
@jgraettinger
jgraettinger force-pushed the johnny/v2-tests-4-publication-tests branch 2 times, most recently from 4d689b9 to 12b25e5 Compare August 30, 2026 18:08
@jgraettinger
jgraettinger force-pushed the johnny/v2-tests-4-publication-tests branch from 12b25e5 to 893de73 Compare August 31, 2026 22:08
@jgraettinger
jgraettinger force-pushed the johnny/v2-tests-4-publication-tests branch from 893de73 to a7bf70c Compare August 31, 2026 22:19
@jgraettinger
jgraettinger force-pushed the johnny/v2-tests-4-publication-tests branch 2 times, most recently from a3a147b to e99bf9f Compare September 1, 2026 00:51
Publication tests now call `catalog_tests::run_tests` in-process, against the
`build::Output` the publication already produced.

That deletes most of the machinery: `data_plane()` and its `temp-data-plane`
shell-out, `wait_for_sockets`, the activate loop that stamped build labels onto
derivation specs and activated them at 3 splits, the `flowctl-go api test` job,
and the delete loop that tore it all down again. With no data plane there is
nothing to race, so the `tokio::select!` driving the two jobs goes too.

Failures now anchor precisely: each failing case becomes a `tables::Error` scoped
to the failing *step's* source URL and JSON pointer, where before a whole run
collapsed into one error at `flow://publication/test/api/test` with "View logs
for details". A case the run never reached is reported too, so a publication
never silently understates its test coverage. Logs still stream under the "test"
stream name existing consumers select on, now gated by each task's own
`shards: {logLevel}`.

`flowctl_go` is no longer threaded anywhere: dropped from `Publisher` and
`Publisher::new`, from the agent's `main`, from its integration-test harness, and
from `test_server`. The `locate-bin` crate stays — sops and flow-connector-init
still use it.

Tests: a passing and a failing derive-sqlite catalog, asserting the failing one
surfaces exactly one publication error naming the test and rendering the diff.
They need no database, since `test_catalog` never touches Postgres.
@jgraettinger
jgraettinger force-pushed the johnny/v2-tests-4-publication-tests branch from e99bf9f to 5727a84 Compare September 1, 2026 01:34
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