Run the whole utopia-server crate against Postgres in CI instead of a filter list - #869
Merged
Merged
Conversation
WaylandYang
force-pushed
the
ci/documents-routes-against-postgres
branch
from
September 23, 2026 06:57
e221787 to
6c68aba
Compare
Base automatically changed from
ci/documents-routes-against-postgres
to
dev
September 23, 2026 07:06
… filter list Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <145302500+WaylandYang@users.noreply.github.com>
WaylandYang
force-pushed
the
ci/server-crate-against-postgres
branch
from
September 23, 2026 07:07
1620ab2 to
085a15c
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #868 (stacked on it; GitHub retargets this PR to
devonce #868 merges).Why
#868 added one more filter to the
migrationsjob's list ofutopia-servertest namespaces run against Postgres. That list is the problem: every module gated ontest_db::url()that nobody remembered to add keeps skipping silently in CI (#248). Still outside the list after #868:api::jobs_routes::tests,api::rule_metadata_tests,api::rule_expression_tests,pipeline::pipeline_tests,ingest_sources::{source_checkpoint_tests, rss_sync_contract_tests, source_filename_tests},type_alignment::tests,extraction::tests,query_engine::postgres::tests.What
The four filter steps (
api::mcp::tests,api::chat::,api::documents_routes::,retrieval::) are replaced by a single step that runs the whole crate, the same wayutopia-storealready is in this job:New database-backed modules no longer need registering. The workflow-level
permissions: contents: readis untouched.Does this slow CI down?
No. Step timings from the #868 run of the
migrationsjob:The compile is paid once whichever filter runs first. The whole crate (385 tests) runs in about 8s locally, so one whole-crate step costs roughly the same ~150–160s the four steps cost together. The
backendjob is unchanged and remains the critical path (434s vs 574s formigrationstoday, dominated bysqlx-cliinstall and the store tests).Verification
Local, against a fresh database in the
docker composePostgres (host port 1517, #866),UTOPIA_TEST_REQUIRE_DB=1, migrated first (as the job's earliersqlx migrate runstep does), three consecutive runs:The 1 ignored test is the opt-in live-network RSS acceptance test in
rss_full_content.rs.One ordering caveat, recorded in the step comment: the chat and jobs-route fixtures do not run migrations themselves. Starting the whole crate against a completely empty database fails 32 tests with
relation "organizations" does not exist(concurrent tests racing a first migration). In this job the database is already migrated by the earlier全新库上跑一遍step, so the whole-crate step is safe; the caveat only matters for anyone runningcargo test -p utopia-serverlocally against a brand-new database.cargo fmt --all --checkpasses.🤖 Generated with Claude Code