mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-16 09:58:21 +00:00
chore: merge main into quota reservation branch
This commit is contained in:
@@ -5420,6 +5420,36 @@ require_source_contains \
|
||||
"fn set_disks_implements_storage_heal_operations_contract()" \
|
||||
"SetDisks storage-api HealOperations compile-time coverage test"
|
||||
|
||||
# --- Leaf crates must stay free of internal dependencies (backlog#1834) ---
|
||||
# ARCHITECTURE.md invariant 2 names config, credentials, crypto, io-metrics,
|
||||
# and madmin as leaf crates that depend only on external crates. Allowlist:
|
||||
# io-metrics -> rustfs-s3-ops (contract crate; leaf-allowance adjudication is
|
||||
# tracked as backlog#1834 PR2). Adding any other rustfs-* dependency to a leaf
|
||||
# crate needs a maintainer decision, not a quiet Cargo.toml edit.
|
||||
LEAF_CRATE_DEP_HITS_FILE="${TMP_DIR}/leaf_crate_dep_hits.txt"
|
||||
: >"$LEAF_CRATE_DEP_HITS_FILE"
|
||||
(
|
||||
cd "$ROOT_DIR"
|
||||
for leaf in config credentials crypto io-metrics madmin; do
|
||||
manifest="crates/${leaf}/Cargo.toml"
|
||||
[[ -f "$manifest" ]] || continue
|
||||
leaf_dep_status=0
|
||||
rg -n --with-filename '^rustfs-[a-z0-9-]+ *=' "$manifest" >"${TMP_DIR}/leaf_dep_raw.txt" || leaf_dep_status=$?
|
||||
if [[ "$leaf_dep_status" -ne 0 && "$leaf_dep_status" -ne 1 ]]; then
|
||||
exit "$leaf_dep_status"
|
||||
fi
|
||||
if [[ "$leaf" == "io-metrics" ]]; then
|
||||
rg -v '^[^:]*:[0-9]+:rustfs-s3-ops *=' "${TMP_DIR}/leaf_dep_raw.txt" >>"$LEAF_CRATE_DEP_HITS_FILE" || true
|
||||
else
|
||||
cat "${TMP_DIR}/leaf_dep_raw.txt" >>"$LEAF_CRATE_DEP_HITS_FILE"
|
||||
fi
|
||||
done
|
||||
)
|
||||
|
||||
if [[ -s "$LEAF_CRATE_DEP_HITS_FILE" ]]; then
|
||||
report_failure "leaf crates (config/credentials/crypto/io-metrics/madmin) must not depend on internal rustfs-* crates (allowlist: io-metrics -> rustfs-s3-ops, backlog#1834): $(paste -sd '; ' "$LEAF_CRATE_DEP_HITS_FILE")"
|
||||
fi
|
||||
|
||||
if (( FAILURES > 0 )); then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Regular → Executable
@@ -21,22 +21,14 @@ cycle|composition<->interface
|
||||
cycle|infra<->interface
|
||||
dep|rustfs/src/admin/handlers/scanner.rs|interface->composition|crate::startup_background::ENV_SCANNER_ENABLED
|
||||
dep|rustfs/src/admin/handlers/scanner.rs|interface->composition|crate::startup_background::scanner_enabled_from_env
|
||||
dep|rustfs/src/app/admin_usecase.rs|app->interface|crate::server::DependencyReadiness
|
||||
dep|rustfs/src/app/admin_usecase.rs|app->interface|crate::server::collect_dependency_readiness_report
|
||||
dep|rustfs/src/app/bucket_usecase.rs|app->interface|crate::admin::handlers::site_replication::site_replication_bucket_meta_hook
|
||||
dep|rustfs/src/app/bucket_usecase.rs|app->interface|crate::admin::handlers::site_replication::site_replication_delete_bucket_hook
|
||||
dep|rustfs/src/app/bucket_usecase.rs|app->interface|crate::admin::handlers::site_replication::site_replication_make_bucket_hook
|
||||
dep|rustfs/src/app/bucket_usecase.rs|app->interface|crate::server::RemoteAddr
|
||||
dep|rustfs/src/app/object_usecase.rs|app->interface|crate::server::convert_ecstore_object_info
|
||||
dep|rustfs/src/cluster_snapshot.rs|infra->interface|crate::server::DependencyReadiness
|
||||
dep|rustfs/src/cluster_snapshot.rs|infra->interface|crate::server::DependencyReadinessReport
|
||||
dep|rustfs/src/cluster_snapshot.rs|infra->interface|crate::server::ReadinessDegradedReason
|
||||
dep|rustfs/src/cluster_snapshot.rs|infra->interface|crate::server::snapshot_dependency_readiness_report
|
||||
dep|rustfs/src/runtime_sources.rs|infra->app|crate::app::context
|
||||
dep|rustfs/src/storage/access.rs|infra->interface|crate::server::RemoteAddr
|
||||
dep|rustfs/src/storage/ecfs_extend.rs|infra->interface|crate::server::cors
|
||||
dep|rustfs/src/storage/ecfs_extend.rs|infra->interface|crate::storage::ecfs::ListObjectUnorderedQuery
|
||||
dep|rustfs/src/storage/helper.rs|infra->interface|crate::server::convert_ecstore_object_info
|
||||
dep|rustfs/src/storage/helper.rs|infra->interface|crate::server::is_audit_module_enabled
|
||||
dep|rustfs/src/storage/helper.rs|infra->interface|crate::server::is_notify_module_enabled
|
||||
dep|rustfs/src/storage/helper.rs|infra->interface|crate::server::refresh_audit_module_enabled
|
||||
|
||||
Reference in New Issue
Block a user