mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-08 22:33:22 +00:00
refactor: isolate specialized runtime fallbacks (#3958)
This commit is contained in:
@@ -5,7 +5,7 @@ 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-runtime-scalar-resolver-fallback-removal`
|
||||
- Branch: `overtrue/arch-runtime-specialized-fallback-boundary`
|
||||
- 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
|
||||
@@ -23,20 +23,22 @@ Status values: `[ ]` not started, `[~]` in progress, `[x]` complete, `[!]` block
|
||||
from PR #3951, the GLOB-007 optional runtime handle fallback removal from
|
||||
PR #3952, the GLOB-007 AppContext-only fallback signature cleanup from
|
||||
PR #3953, the GLOB-007 runtime resolver fallback boundary cleanup from
|
||||
PR #3954, and the GLOB-007 service/credential resolver fallback removal from
|
||||
PR #3955.
|
||||
- Current phase PR: GLOB-007 scalar/handle resolver fallback removal.
|
||||
- Based on: `origin/main` after PR #3955 merged.
|
||||
PR #3954, the GLOB-007 service/credential resolver fallback removal from
|
||||
PR #3955, and the GLOB-007 scalar/handle resolver fallback removal from
|
||||
PR #3957.
|
||||
- Current phase PR: GLOB-007 specialized resolver fallback boundary.
|
||||
- Based on: `origin/main` after PR #3957 merged.
|
||||
- PR type for this branch: `ci-gate`.
|
||||
- Runtime behavior changes: when no AppContext is published, scalar and handle
|
||||
resolvers for outbound TLS generation, daily tier stats, runtime port,
|
||||
metrics, local node name, tier config, expiry state, and buffer config now
|
||||
return local empty/default values instead of consulting legacy globals.
|
||||
- Rust code changes: remove those public no-AppContext read fallbacks while
|
||||
preserving the default AppContext interface sources used after startup.
|
||||
- Runtime behavior changes: AppContext specialized resolver helpers for KMS
|
||||
initialization, notify interface, outbound TLS state, scanner metrics, S3
|
||||
Select DB, server-config publish, and storage-class publish now stop at the
|
||||
AppContext boundary, while root runtime facades preserve the existing
|
||||
no-AppContext fallback contracts for callers.
|
||||
- Rust code changes: move those specialized no-AppContext fallbacks out of
|
||||
`app::context` public resolvers and into the root `runtime_sources` facade.
|
||||
- CI/script changes: none intended.
|
||||
- Docs changes: update this progress ledger for the scalar/handle fallback
|
||||
removal.
|
||||
- Docs changes: update this progress ledger for the specialized fallback
|
||||
boundary.
|
||||
|
||||
## Phase 0 Tasks
|
||||
|
||||
@@ -2833,6 +2835,10 @@ Status values: `[ ]` not started, `[~]` in progress, `[x]` complete, `[!]` block
|
||||
- Current slice: remove the public no-AppContext legacy fallbacks from
|
||||
service/credential resolvers for KMS manager lookup, encryption service,
|
||||
IAM readiness/handle, ready IAM handle, and action credentials.
|
||||
- Current slice: move specialized KMS initialization, notify interface,
|
||||
outbound TLS state, scanner metrics, S3 Select DB, server-config publish,
|
||||
and storage-class publish no-AppContext fallbacks from AppContext resolvers
|
||||
to root runtime facade wrappers.
|
||||
- Remaining work: remove the next fallback family per PR only after scans
|
||||
prove no production caller depends on it.
|
||||
- Verification: focused RustFS compile and admin test-target compile,
|
||||
@@ -6101,6 +6107,9 @@ Status values: `[ ]` not started, `[~]` in progress, `[x]` complete, `[!]` block
|
||||
|
||||
| Expert | Status | Notes |
|
||||
|---|---|---|
|
||||
| Quality/architecture | pass | GLOB-007 moves specialized no-AppContext fallback behavior from AppContext public resolvers to root runtime facade wrappers, keeping resolver helpers context-only. |
|
||||
| Migration preservation | pass | Existing callers keep concrete root facade return contracts for KMS initialization, notify interface, outbound TLS state, scanner metrics, S3 Select DB, server-config publish, and storage-class publish. |
|
||||
| Testing/verification | pass | Focused resolver, site-replication TLS, S3 Select, and config tests passed; compile, formatting, architecture guard, specialized fallback residual scan, diff hygiene, Rust risk scan, Rust quality scan, and full `make pre-pr` passed before PR. |
|
||||
| Quality/architecture | pass | GLOB-007 removes the scalar/handle fallback family while keeping concrete no-context defaults at the root runtime facade boundary. |
|
||||
| Migration preservation | pass | AppContext-backed behavior is unchanged; absent AppContext no longer consults legacy globals for TLS generation, tier stats, runtime port, metrics, local node name, tier config, expiry state, or buffer config. |
|
||||
| Testing/verification | pass | Focused resolver, site-replication, config, concurrency, and RPC tests passed; compile, formatting, architecture guard, scalar/handle fallback residual scan, diff hygiene, Rust risk scan, Rust quality scan, and full `make pre-pr` passed before PR. |
|
||||
@@ -9813,6 +9822,32 @@ Notes:
|
||||
- `make pre-pr`: passed, including 6917 nextest tests passed, 112 skipped,
|
||||
and doctests passed.
|
||||
|
||||
- Issue #660 GLOB-007 specialized resolver fallback boundary:
|
||||
- `cargo test -p rustfs --lib app::context::tests::resolver_helpers_are_context_first_and_empty_when_context_is_absent`:
|
||||
passed.
|
||||
- `cargo test -p rustfs --lib admin::handlers::site_replication::tests::test_site_replication_peer_client_rebuilds_when_generation_changes`:
|
||||
passed.
|
||||
- `cargo test -p rustfs --lib admin::handlers::site_replication::tests::test_site_replication_local_endpoint`:
|
||||
passed, 4 passed.
|
||||
- `cargo test -p rustfs --lib app::select_object::tests`: passed, 19
|
||||
passed.
|
||||
- `cargo test -p rustfs --lib admin::handlers::config_admin::tests`: passed,
|
||||
29 passed.
|
||||
- `cargo test -p rustfs --lib admin::service::config::tests`: passed, 7
|
||||
passed.
|
||||
- `cargo fmt --all --check`: passed.
|
||||
- `cargo check -p rustfs --lib`: passed.
|
||||
- `./scripts/check_architecture_migration_rules.sh`: passed.
|
||||
- `git diff --check`: passed.
|
||||
- Specialized fallback residual scan: passed; legacy defaults remain only in
|
||||
root runtime facade wrappers or AppContext default construction paths.
|
||||
- Rust risk scan: passed; no new production unwrap/expect, numeric casts,
|
||||
string error public APIs, boxed public errors, or production
|
||||
println/eprintln introduced in changed Rust files. Relaxed atomics are
|
||||
limited to the test-only TLS generation override.
|
||||
- `make pre-pr`: passed, including 6917 nextest tests passed, 112 skipped,
|
||||
and doctests passed.
|
||||
|
||||
## Handoff Notes
|
||||
|
||||
- Continue with larger consumer-migration batches outside the cleaned
|
||||
|
||||
Reference in New Issue
Block a user