mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-13 16:46:55 +00:00
docs(replication): register the http interop duplication and pin its wire values (#5996)
backlog#1833 PR1 prescribed deduplicating crates/replication/src/http.rs onto the canonical rustfs-utils http modules via a re-export facade. That plan conflicts with a standing architecture guard the issue's review missed: check_architecture_migration_rules.sh rejects any rustfs-utils import or dependency from the replication crate ("replication crate HTTP/helper contracts must not import or depend on rustfs-utils"), the same way it bans rustfs-filemeta and rustfs-storage-api — the wire-contract crate deliberately has zero internal dependencies.
So this lands the issue's fallback shape instead (the same bidirectional do-not-merge pattern the issue itself prescribes for the policy path.rs cluster): a module doc on replication/http.rs naming the canonical owners and the guard that forces the local copy, mirror notes on utils' metadata_compat.rs and header_compat.rs, and a new test pinning every duplicated constant to its literal wire value so the two copies cannot drift silently.
No production code changed.
Ref rustfs/backlog#1833 (PR1).
This commit is contained in:
@@ -17,6 +17,13 @@
|
||||
//!
|
||||
//! Use suffix-based API: `get_header(headers, SUFFIX_FORCE_DELETE)` queries both
|
||||
//! x-rustfs-force-delete and x-minio-force-delete.
|
||||
//!
|
||||
//! This module is the canonical owner of these interop values. One deliberate
|
||||
//! copy exists: `crates/replication/src/http.rs` re-declares the subset it
|
||||
//! needs because the wire-contract crate must stay free of internal
|
||||
//! dependencies (arch guard in `scripts/check_architecture_migration_rules.sh`
|
||||
//! bans replication -> rustfs-utils). When changing a value here, check the
|
||||
//! pinned copy there; its tests pin the shared wire values byte-for-byte.
|
||||
|
||||
use http::{HeaderMap, HeaderValue};
|
||||
use std::borrow::Cow;
|
||||
|
||||
@@ -14,6 +14,13 @@
|
||||
|
||||
//! System metadata compatibility: write both x-rustfs-internal-* and x-minio-internal-*
|
||||
//! for MinIO interoperability. Read prefers RustFS, fallback to MinIO.
|
||||
//!
|
||||
//! This module is the canonical owner of these interop values. One deliberate
|
||||
//! copy exists: `crates/replication/src/http.rs` re-declares the subset it
|
||||
//! needs because the wire-contract crate must stay free of internal
|
||||
//! dependencies (arch guard in `scripts/check_architecture_migration_rules.sh`
|
||||
//! bans replication -> rustfs-utils). When changing a value here, check the
|
||||
//! pinned copy there; its tests pin the shared wire values byte-for-byte.
|
||||
|
||||
use std::collections::{BTreeMap, HashMap};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user