Skip to content

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

Merged
jgraettinger merged 2 commits into
masterfrom
johnny/v2-tests-4-publication-tests
Sep 2, 2026
Merged

control-plane-api: run publication tests on catalog-tests#3418
jgraettinger merged 2 commits into
masterfrom
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. One behavior changes:

  • 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.

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-3-catalog-tests branch from 7c143a6 to db1ce76 Compare August 30, 2026 17:56
@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-3-catalog-tests branch from db1ce76 to df38483 Compare August 31, 2026 22: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-3-catalog-tests branch from df38483 to 5dd646c Compare August 31, 2026 22:19
@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-3-catalog-tests branch from 5dd646c to 5106b77 Compare August 31, 2026 22:46
@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
@jgraettinger
jgraettinger force-pushed the johnny/v2-tests-3-catalog-tests branch from 5106b77 to 0b5782c Compare September 1, 2026 00:51
@jgraettinger
jgraettinger force-pushed the johnny/v2-tests-4-publication-tests branch from e99bf9f to 5727a84 Compare September 1, 2026 01:34
@jgraettinger
jgraettinger force-pushed the johnny/v2-tests-3-catalog-tests branch from 0b5782c to dae189d Compare September 1, 2026 04:46
@jgraettinger
jgraettinger force-pushed the johnny/v2-tests-4-publication-tests branch from 5727a84 to 8c84db4 Compare September 1, 2026 04:46
@jgraettinger
jgraettinger force-pushed the johnny/v2-tests-3-catalog-tests branch from dae189d to 0094e7a Compare September 1, 2026 15:34
@jgraettinger
jgraettinger force-pushed the johnny/v2-tests-4-publication-tests branch from 8c84db4 to d7b8fb9 Compare September 1, 2026 15:34
@jgraettinger
jgraettinger force-pushed the johnny/v2-tests-3-catalog-tests branch from 0094e7a to a2e9974 Compare September 1, 2026 16:17
@jgraettinger
jgraettinger force-pushed the johnny/v2-tests-4-publication-tests branch from d7b8fb9 to f53a04b Compare September 1, 2026 16:17
Base automatically changed from johnny/v2-tests-3-catalog-tests to master September 1, 2026 19:49
`run_test_case` returned the scope of the last step reached, documented as
being for error reporting, but no caller used it: the failure path takes its
scope from `LiveDriver::last_scope` — which the driver tracks itself — and the
success path uses the test's own first-step scope. The returned `String` was
dead and its doc comment misleading.

Return `()` instead, and drop the per-step tracking that fed it.
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 f53a04b to 875f483 Compare September 1, 2026 21:43

@bbartman bbartman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this looks OK. I don't see any problems with it.

@bbartman bbartman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I missed a button.

@jgraettinger
jgraettinger merged commit f4956af into master Sep 2, 2026
11 checks passed
@jgraettinger
jgraettinger deleted the johnny/v2-tests-4-publication-tests branch September 2, 2026 13:40
@github-actions github-actions Bot added pending:flowctl Merged, changes the flowctl binary, and not in a published release pending:agent Merged, in the control-plane-agent image, and not yet rolled to flow-agent pending:agent-api Merged, ships via Deploy agent-api, and not yet deployed and removed pending:agent-api Merged, ships via Deploy agent-api, and not yet deployed pending:agent Merged, in the control-plane-agent image, and not yet rolled to flow-agent labels Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending:flowctl Merged, changes the flowctl binary, and not in a published release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants