mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 08:18:18 +00:00
refactor: route admin runtime consumers through app context (#3943)
This commit is contained in:
@@ -5,24 +5,25 @@ 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-global-fallback-removal-batch`
|
||||
- Branch: `overtrue/arch-global-admin-context-consumer-batch`
|
||||
- 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/API-093/API-094/API-095/API-096/API-097/API-098/API-099/API-100/API-101/API-102/API-103/API-104/API-105/API-106/API-107/API-108/API-109/API-110/API-111/API-112/API-113/API-114/API-115/API-116/API-117/API-118/API-119/API-120/API-121/API-122/API-123/API-124/API-125/API-126/API-127/API-128/API-129/API-130/API-131/API-132/API-133/API-134/API-135/API-136/API-137/API-138/API-139/API-140/API-141/API-142/API-143/API-144/API-145/API-146/API-147/API-148/API-149/API-150/API-151/API-152/API-153/API-154/API-155/API-156/API-157/API-158/API-159/API-160/API-161/API-162/API-163/API-164/API-165/API-166/API-167/API-168/API-169/API-170/API-171/API-172/API-173/API-174/API-175/API-176/API-177/API-178/API-179/API-180/API-181/API-182/API-183/API-184/API-185/API-186/API-187/API-188/API-189/API-190/API-191/API-192/API-193/API-194/API-195/API-196/API-197/API-198/API-199/API-200/API-201/API-202/API-203/API-204/API-205/API-206/API-207/API-208/API-209/API-210/API-211/API-212/API-213/API-214/API-215/API-216/API-217/API-218/API-219/API-220/API-221/API-222/API-223/API-224/API-225/API-226/API-227/API-228/API-229/API-230/API-231/API-232/API-233/API-234/API-235/API-236/API-237/API-238/API-239/API-240/API-241/API-242/API-243/API-244/API-245/API-246/API-247/API-248/API-249/API-250/API-251/API-252/API-253/API-254/CTX-002`.
|
||||
- Current baseline also includes API-255 from PR #3923, API-256 from PR
|
||||
#3925, CFG-009 from PR #3927, C-007/C-009 from PR #3935, C-008/C-010
|
||||
from PR #3936, and DOC-001/DOC-002/DOC-003/DOC-004/DOC-005/
|
||||
TEST-DOC-001 from PR #3938, GLOB-001/GLOB-002/GLOB-003/GLOB-004/
|
||||
GLOB-005/CRATE-001/CRATE-002 from PR #3939, and GLOB-006 from PR #3941.
|
||||
- Current phase PR: GLOB-007 admin runtime context handoff batch.
|
||||
- Based on: `origin/main` after PR #3941 merged.
|
||||
GLOB-005/CRATE-001/CRATE-002 from PR #3939, GLOB-006 from PR #3941,
|
||||
and the first GLOB-007 admin runtime context handoff from PR #3942.
|
||||
- Current phase PR: GLOB-007 admin context consumer batch.
|
||||
- Based on: `origin/main` after PR #3942 merged.
|
||||
- PR type for this branch: `ci-gate`.
|
||||
- Runtime behavior changes: none intended.
|
||||
- Rust code changes: add context-aware notification-system and server-config
|
||||
resolution, then route admin config, OIDC config, audit runtime config, and
|
||||
dynamic KMS config storage access through current AppContext-aware resolver
|
||||
boundaries before falling back to legacy globals.
|
||||
- Rust code changes: add admin current-runtime resolver helpers and route the
|
||||
remaining admin handler/router object-store, notification-system, and
|
||||
server-config consumers through AppContext-aware boundaries before legacy
|
||||
fallbacks.
|
||||
- CI/script changes: none intended.
|
||||
- Docs changes: update the global-state plan and this progress ledger for the
|
||||
admin runtime context handoff batch.
|
||||
- Docs changes: update this progress ledger for the admin context consumer
|
||||
batch.
|
||||
|
||||
## Phase 0 Tasks
|
||||
|
||||
@@ -2776,15 +2777,20 @@ Status values: `[ ]` not started, `[~]` in progress, `[x]` complete, `[!]` block
|
||||
- Verification: focused compile coverage, architecture migration guard, diff
|
||||
hygiene, Rust risk scan, and full PR gate.
|
||||
- [~] `GLOB-007` Remove fallbacks.
|
||||
- Current slice: move admin config, OIDC config, audit runtime config, and
|
||||
- Completed slice: move admin config, OIDC config, audit runtime config, and
|
||||
dynamic KMS config storage access paths to current AppContext-aware
|
||||
resolver boundaries, and expose notification-system/server-config
|
||||
resolution for explicit AppContext handoff.
|
||||
- Current slice: route the remaining admin handler/router direct
|
||||
object-store, notification-system, and server-config consumers through
|
||||
admin current-runtime helpers backed by AppContext-aware resolver
|
||||
boundaries.
|
||||
- Remaining work: remove one fallback family per PR only after scans prove no
|
||||
production caller depends on it; this slice keeps the fallback behavior
|
||||
because broader admin/server consumers still use the root resolvers.
|
||||
- Verification: focused RustFS compile, resolver residual scan, formatting,
|
||||
diff hygiene, architecture guard, Rust risk scan, and full PR gate.
|
||||
because broader app/storage/server consumers still use the root resolvers.
|
||||
- Verification: focused RustFS compile and admin test-target compile,
|
||||
resolver residual scan, formatting, diff hygiene, architecture guard, Rust
|
||||
risk scan, and full PR gate.
|
||||
- [~] `CRATE-001/CRATE-002` Evaluate future crate splits.
|
||||
- Current slice: record evidence required before `ecstore-erasure` or
|
||||
`storage-cluster` split proposals.
|
||||
@@ -6048,6 +6054,9 @@ Status values: `[ ]` not started, `[~]` in progress, `[x]` complete, `[!]` block
|
||||
|
||||
| Expert | Status | Notes |
|
||||
|---|---|---|
|
||||
| Quality/architecture | pass | GLOB-007 adds admin current-runtime resolver helpers and moves remaining admin handler/router object-store, notification-system, and server-config consumers off direct root resolver calls without changing owner boundaries. |
|
||||
| Migration preservation | pass | The helpers call `current_app_context()` and delegate to the same AppContext-aware resolver/fallback paths from PR #3942, so account, bucket metadata, heal, zip download, pool, quota, rebalance, replication, site replication, table catalog, tier, and router behavior stays unchanged. |
|
||||
| Testing/verification | pass | Focused RustFS compile/tests, admin test-target compile, admin resolver residual scan, formatting, architecture guard, diff hygiene, Rust risk scan, and full `make pre-pr` passed before PR. |
|
||||
| Quality/architecture | pass | GLOB-007 adds AppContext-aware notification-system and server-config resolver boundaries, then routes admin config, OIDC config, audit runtime config, and dynamic KMS config storage access through current AppContext-aware owners before legacy fallbacks. |
|
||||
| Migration preservation | pass | Existing admin config reload, OIDC restart detection, audit config writes, and dynamic KMS config load/save behavior stay unchanged because context lookup falls back to the same root object-store, notification, and server-config owners. |
|
||||
| Testing/verification | pass | Focused RustFS compile/tests, resolver residual scan, formatting, architecture guard, diff hygiene, Rust risk scan, and full `make pre-pr` passed before PR. |
|
||||
@@ -6408,6 +6417,20 @@ Status values: `[ ]` not started, `[~]` in progress, `[x]` complete, `[!]` block
|
||||
|
||||
Passed before push:
|
||||
|
||||
- Issue #660 GLOB-007 admin context consumer slice:
|
||||
- Branch freshness check: rebased onto `origin/main` after PR #3942 merged.
|
||||
- `cargo fmt --all --check`: passed.
|
||||
- `git diff --check`: passed.
|
||||
- `./scripts/check_architecture_migration_rules.sh`: passed.
|
||||
- Admin resolver residual scan: passed.
|
||||
- Diff-added Rust risk scan: passed; no new production unwrap/expect,
|
||||
unchecked narrow casts, stringly errors, or ad-hoc stdout/stderr.
|
||||
- `cargo check -p rustfs --lib`: passed.
|
||||
- `cargo test -p rustfs --lib admin --no-run`: passed.
|
||||
- Three-expert review: passed.
|
||||
- `make pre-pr`: passed, including 6911 nextest tests passed, 112 skipped,
|
||||
and doctests.
|
||||
|
||||
- Issue #660 GLOB-007 current slice:
|
||||
- Branch freshness check: rebased onto `origin/main` after PR #3941 merged.
|
||||
- `cargo fmt --all --check`: passed.
|
||||
|
||||
Reference in New Issue
Block a user