Repository navigation
ci: run the database tests at release time, not on every push - #516
Merged
Merged
Conversation
Every Rust CI run started two database containers and rebuilt the workspace under coverage instrumentation, for a job whose measured cost was 30s of container startup and 3m24s of instrumented test run. That is a lot to pay on every push to every branch. The 59 tests that need a live server are marked #[ignore], so `cargo test` now passes on a bare checkout with no Docker at all — which it did not before. Ordinary CI runs the unit tests only, with no service containers. They run instead as a new `integration-db` job in the release workflow, which `build` depends on: a database regression blocks the release rather than shipping in it. Coverage moves there too, since it needs the same containers. The trade-off is deliberate and worth stating: an #[ignore]d test is a quiet test. A regression here surfaces when a release is cut rather than at the merge that caused it, so `make test-integration` is the thing to run locally before touching the query executor, connection manager or admin service. README and the Makefile say so. Co-Authored-By: Claude Opus 5 <[email protected]>
EVWorth
added a commit
that referenced
this pull request
Aug 29, 2026
…ord (#526) The frontend never receives credentials, so on edit it sends them back absent, and the command layer fills them in from the store. It did that with `if let Ok(stored)`, which treats every failure the same way: a keyring that is locked, sandboxed or momentarily unavailable looked exactly like "this profile has no stored password". The field stayed empty, and `save()` reads an empty password as "the user cleared it" and calls `delete_password`. The user edits a profile name, sees a success toast, and the credential is gone. `ConnectionStore::get_existing` now returns `Option`, so the two outcomes have different types and the call site has to decide. A profile that does not exist is `None` — a new profile, where empty really is the intent. Anything else is an error, and the save is refused with a message saying that nothing was written and the stored password is untouched. `test_connection` had the same pattern, where the cost was a false "Access denied" sending the user off to debug credentials that were fine. Also completes #277. Enforcement landed in #522; the other half of that issue is a connection marked read-only being indistinguishable from any other until the executor refuses something. Read-only connections now carry a lock in their tab. Two things found while testing: The mock specifiers in ConnectionTabs.test.tsx resolve relative to the test file, not the component, so `../../stores/connectionStore` pointed at `src/components/stores/…`, which does not exist. None of that file's mocks were ever applied — the tests ran against the real stores and asserted only things that held either way. Fixed, which is what let the new tests render a tab at all. Three ConnectionStore tests were swept up by the blanket #[ignore] in #516. They touch only the store and an in-memory keyring, so they are back on the ordinary test path where they belong; CI has no database services, so a green Test Rust job is the proof they need none. Refs #274, #277
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.
Every Rust CI run started two database containers and rebuilt the workspace under coverage instrumentation. Measured on the last run of that job (4m20s total):
What changed
The 59 tests needing a live server are
#[ignore]d, socargo testpasses on a bare checkout with no Docker — which it did not before this change. PR CI runs unit tests only, with no service containers and no coverage instrumentation.They run instead in a new
integration-dbjob inrelease.yml, whichbuilddepends on, so a database regression blocks the release rather than shipping in it. Coverage moved there too, since it needs the same containers.mas-sqlite's integration tests stay on the PR path — they're in-memory and need no server.The trade-off
An
#[ignore]d test is a quiet test. A regression now surfaces when a release is cut rather than at the merge that caused it. That was the explicit call; the mitigation ismake test-integration, documented in the README and the Makefile as the thing to run before touching the query executor, connection manager or admin service.Verification
make test-rust— 65 passed, 59 ignored, no Docker runningmake test-integration— 59 passed against MySQL 8 + MariaDB 11upload-artifactpin matches the v7.0.1 SHA used elsewhere in the repo🤖 Generated with Claude Code