refactor: prune app admin raw facade paths (#3703)

This commit is contained in:
安正超
2026-06-22 02:25:58 +08:00
committed by GitHub
parent 2a18088ca5
commit e528ee9452
5 changed files with 353 additions and 258 deletions
+3
View File
@@ -187,6 +187,9 @@ expose the raw ECStore facade path once narrowed.
The RustFS storage owner compatibility boundary must keep raw ECStore facade
paths centralized behind local `ecstore_*` module aliases rather than scattering
`rustfs_ecstore::api::...` references through its aliases and wrappers.
The RustFS app/admin storage compatibility boundaries must likewise route raw
ECStore facade access through their local `ecstore_*` module aliases instead of
scattering `rustfs_ecstore::api::...` paths through compatibility wrappers.
Scanner, notify, observability, and e2e `storage_compat.rs` boundaries must
also stay narrow. Scanner must not restore grouped bucket compatibility exports
for target, lifecycle, metadata, replication, or versioning modules. Notify
+36 -11
View File
@@ -5,16 +5,16 @@ Status values: `[ ]` not started, `[~]` in progress, `[x]` complete, `[!]` block
## Current Context
- Issue: [`rustfs/backlog#660`](https://github.com/rustfs/backlog/issues/660)
- Branch: `overtrue/arch-outer-compat-call-facade-prune`
- Baseline: completed `C-011/C-012/C-013/API-055/API-059/API-079/API-080/API-081/API-082/API-083/API-084/API-085/API-086/API-087/API-088/API-089/API-090/API-091`.
- Stacked on: `origin/main` after API-091 merged.
- Branch: `overtrue/arch-outer-compat-raw-facade-prune`
- Baseline: completed `C-011/C-012/C-013/API-055/API-059/API-079/API-080/API-081/API-082/API-083/API-084/API-085/API-086/API-087/API-088/API-089/API-090/API-091/API-092`.
- Stacked on: `overtrue/arch-outer-compat-call-facade-prune` pending API-092 merge.
- PR type for this branch: `pure-move`
- Runtime behavior changes: none.
- Rust code changes: centralize RustFS storage-owner raw ECStore facade paths
behind local `ecstore_*` module aliases.
- CI/script changes: guard the RustFS storage-owner compatibility boundary
against restoring scattered raw ECStore facade paths.
- Docs changes: record the API-092 storage-owner facade path cleanup.
- Rust code changes: centralize RustFS app/admin raw ECStore facade paths behind
local `ecstore_*` module aliases.
- CI/script changes: guard the RustFS app/admin storage compatibility
boundaries against restoring scattered raw ECStore facade paths.
- Docs changes: record the API-093 app/admin facade path cleanup.
## Phase 0 Tasks
@@ -319,6 +319,20 @@ Status values: `[ ]` not started, `[~]` in progress, `[x]` complete, `[!]` block
- Verification: RustFS compile coverage, storage-owner raw facade path
residual scan, migration guard, formatting, diff hygiene, Rust risk scan,
pre-commit quality gate, and three-expert review.
- [x] `API-093` Prune app/admin raw facade paths.
- Completed slice: replace scattered raw `rustfs_ecstore::api::...` paths in
the RustFS app/admin storage compatibility boundaries with local `ecstore_*`
module aliases.
- Acceptance: `rustfs/src/app/storage_compat.rs` and
`rustfs/src/admin/storage_compat.rs` no longer contain raw
`rustfs_ecstore::api::...` facade paths outside their centralized local
`ecstore_*` aliases.
- Must preserve: app lifecycle, metadata, object-lock, replication, data
usage, notification, tier, layout, compression, admin rebalance, metrics,
bucket target, quota, storage class, and server configuration compatibility.
- Verification: RustFS compile coverage, app/admin raw facade path residual
scan, migration guard, formatting, diff hygiene, Rust risk scan,
pre-commit quality gate, and three-expert review.
- [x] `G-012` Inventory placement and repair invariants.
- Acceptance:
[`placement-repair-invariants.md`](placement-repair-invariants.md) records
@@ -3352,14 +3366,25 @@ Status values: `[ ]` not started, `[~]` in progress, `[x]` complete, `[!]` block
| Expert | Status | Notes |
|---|---|---|
| Quality/architecture | passed | API-092 centralizes RustFS storage-owner ECStore facade paths behind local `ecstore_*` module aliases. |
| Migration preservation | passed | Storage metadata, object-lock, replication stats, tagging, RPC signature, metrics, tier reload, local disk lookup, and object I/O associated type compatibility keep the same ECStore contracts. |
| Testing/verification | passed | RustFS compile coverage, storage-owner raw facade path residual scan, migration guard, formatting, diff hygiene, Rust risk scan, full pre-commit, and three-expert review passed. |
| Quality/architecture | passed | API-093 centralizes RustFS app/admin ECStore facade paths behind local `ecstore_*` module aliases without adding nested compatibility modules. |
| Migration preservation | passed | App lifecycle, metadata, object-lock, replication, data usage, notification, tier, layout, compression, admin rebalance, metrics, bucket target, quota, storage class, and server configuration compatibility keep the same ECStore contracts. |
| Testing/verification | passed | RustFS compile coverage, app/admin raw facade path residual scan, migration and layer guards, formatting, diff hygiene, Rust risk scan, full pre-commit, and three-expert review passed. |
## Verification Notes
Passed before push:
- Issue #660 API-093 current slice:
- `cargo check -p rustfs`: passed.
- `cargo fmt --all --check`: passed.
- `git diff --check`: passed.
- `bash -n scripts/check_architecture_migration_rules.sh`: passed.
- `./scripts/check_architecture_migration_rules.sh`: passed.
- `./scripts/check_layer_dependencies.sh`: passed.
- RustFS app/admin raw facade path residual scan: passed.
- Rust risk scan on changed Rust files: passed.
- `make pre-commit`: passed.
- Issue #660 API-092 current slice:
- `cargo check -p rustfs`: passed.
- `cargo fmt --all --check`: passed.