Repository navigation
Add scale-in, bounded CI load, ID namespace tests, and CI gate docs - #22
Merged
Merged
Conversation
These are new tests and a reporting workflow only. Product and runtime code are unchanged, and the existing ci.yml workflow is not edited. Co-authored-by: RustFS <hello@rustfs.com>
There was a problem hiding this comment.
🟡 Changes recommended
The dependency audit workflow skips cargo deny after audit failures, and the restart test checks live membership rather than independently verifying persisted voters.
2 open issues
What changed in this PR
Adds regression tests and dependency-audit reporting while documenting what CI does—and does not—prove. Runtime code and the existing ci.yml workflow remain unchanged.
Changes:
- Adds membership-planner, ID-namespace, and in-process scale-in/restart tests.
- Adds a bounded load fixture with 100 creates and 50 mutations at concurrency 4.
- Introduces dependency-audit checks and documents CI gates, known advisory failures, and the separate three-VM validation requirements.
| File | Description |
|---|---|
docs/en/ci-and-release-gates.md |
Documents CI checks, release prerequisites, and validation limits. |
deny.toml |
Configures dependency advisory, license, version, and source checks. |
crates/metadb-server/tests/scale_in_restart_tests.rs |
Tests three-to-two and three-to-one scale-in followed by graceful restart. |
crates/metadb-server/tests/ci_bounded_prefix_load.rs |
Adds a reduced concurrent load fixture with correctness assertions. |
crates/metadb-cluster/tests/membership_retarget_tests.rs |
Tests voter growth, shrinkage, ensured joins, and invalid inputs. |
crates/metadb-cluster/tests/id_namespace_join_tests.rs |
Tests fresh allocator namespaces and stored-counter preservation on reopen. |
.github/workflows/dependency-audit.yml |
Adds cargo-audit and cargo-deny checks for pushes and pull requests. |
Review effort: Balanced
Comment on lines
+39
to
+40
| - name: cargo deny | ||
| run: cargo deny --locked check |
| } | ||
|
|
||
| fn persisted_voters(cluster: &PersistentMetaDbCluster) -> BTreeSet<u64> { | ||
| let routes = cluster.cell_manager().list_routes(); |
CELL_MANAGER_STATE is decoded directly so the shrink check does not use the live Raft overlay from list_routes. The audit workflow still runs cargo deny after a failing cargo audit, and the job stays failed when audit reports findings. Co-authored-by: RustFS <hello@rustfs.com>
The scale-in test decodes CELL_MANAGER_STATE with wincode, and the locked CI build needs that edge in the lockfile. Co-authored-by: RustFS <hello@rustfs.com>
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.

Summary
Adds white-box tests and CI-gate documentation that can merge without product or runtime changes.
.github/workflows/ci.ymlis not edited. This does not merge.A green
ci.ymlrun is not production readiness and is not evidence that the official million-operation load passed.New files
crates/metadb-cluster/tests/membership_retarget_tests.rs—plan_membership_voters: grow from the lowest registered ids, shrink from the highest ids,ensure_node, refusal of target 0, refusal of node id 0, and not enough registered nodes.crates/metadb-server/tests/scale_in_restart_tests.rs— three localhost voters in one OS process shrink to 2 and to 1 viaDurableCellManager::scale_out_replicas, then the same data directories are reopened. Acknowledged writes stay readable, the Raft voter set matches the target, and the checked path records zero application errors. The persisted voter set is decoded fromCELL_MANAGER_STATEon disk.list_routesoverlays that file with live Raft membership, so the test does not use it for the disk check.crates/metadb-server/tests/ci_bounded_prefix_load.rs— reduced CI fixture: 4 prefixes × 25 creates, then 50 overwrite/delete operations, concurrency 4. Assertserrors == 0andcorrectness_errors == 0.crates/metadb-cluster/tests/id_namespace_join_tests.rs—DurableIdAllocator::open_for_nodefor node ids in1..=32767. Fresh node>1 directories start in that node's namespace. A dirty allocator reopens from stored counters and is not relocated.docs/en/ci-and-release-gates.md— current CI (fmt,clippy -D warnings,cargo test --workspace --locked, packaging, 45-minute timeout onubuntu-24.04) and what those gates do not prove..github/workflows/dependency-audit.yml—cargo-audit0.23.0 andcargo-deny0.21.0 onpull_requestandpush.cargo denystill runs whencargo audithas already failed, and the job stays failed if either command fails. Branch protection is unchanged.deny.toml— initial reporting config for that workflow.metadb-server's dev-dependencies declarewincodeso the scale-in test can decode the cell-state file.Cargo.lockrecords that edge. No runtime code changed.How to run
cargo test --workspace --lockedalready runs the new integration tests, so the existing CI test step picks them up without a workflow edit.Locally on this commit: membership 6 passed, ID namespace 4 passed, scale-in 2 passed (including the on-disk voter check before and after restart), bounded prefix load 1 passed. Clippy
-D warningsonmetadb-serverpassed after the disk-decode change.CI versus three VMs
Dependency audit will fail on known unmaintained crates
cargo auditreported three unmaintained advisories and no vulnerability advisories:chrono0.4.45 —RUSTSEC-2026-0543chrono-tz0.8.6 —RUSTSEC-2026-0555chrono-tz-build0.2.1 —RUSTSEC-2026-0559No fixed upgrade was listed. They come in through
openraft. This PR does not change those crates.cargo audit -D unmaintainedandcargo deny --locked check advisoriesboth fail on those three findings, so Dependency audit is expected to be red. Deny still runs after that audit failure.cargo deny --locked check licenses bans sourcesexited 0; duplicate crate versions were warnings only. Licenses matched were Apache-2.0, MIT, BSD-3-Clause, Unicode-3.0, and Zlib.Overlap left out
A parallel agent (
bc-fd965b0c-73ba-5043-aa19-dd2247eff7f5, no GitHub PR when this branch was cut) is writing regression and stress fixtures from the same base commit. It had already committed edits to:crates/metadb-server/tests/prefix_load.rs(a different CI shape: 2 prefixes × 8 creates, then SetAttr and deletes)crates/metadb-server/tests/auth_fail_closed.rsdocs/en/testing.mddocs/en/configuration.mddocs/en/operations.md.github/workflows/ci.ymlThis PR does not edit those files. The required 4×25 fixture is the new file
ci_bounded_prefix_load.rs, so it is picked up bycargo test --workspacewithout taking ownership ofci.ymlordocs/en/testing.md. No required deliverable was dropped.