mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-09 14:49:25 +00:00
refactor: clean shared list operation consumers (#3563)
This commit is contained in:
@@ -106,3 +106,8 @@ and the separate `NamespaceLocking` operation group.
|
||||
The old `StorageAPI` aggregate facade must not reappear in production
|
||||
`crates/ecstore/src` or `rustfs/src` code after the storage operation groups
|
||||
have been made explicit.
|
||||
|
||||
Outer RustFS/IAM consumers must use `rustfs-storage-api` generic list response
|
||||
contracts directly for `ListObjectsV2Info`, `ListObjectVersionsInfo`, and
|
||||
`ObjectInfoOrErr`; ECStore keeps the concrete aliases only for internal
|
||||
implementation and compatibility.
|
||||
|
||||
@@ -5,19 +5,19 @@ 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-storage-operation-consumer-cleanup`
|
||||
- Baseline: `main` at `e5cad7ed207265f5312c58d8dac6042e31ba95a3`
|
||||
after the object and multipart operation contract merge.
|
||||
- PR type for this branch: `api-extraction`
|
||||
- Branch: `overtrue/arch-storage-shared-operation-bounds`
|
||||
- Baseline: `main` at `46e200c290e3fc0887f4c19172bcc146e019d737`
|
||||
after the heal/namespace-lock operation contract merge.
|
||||
- PR type for this branch: `consumer-migration`
|
||||
- Runtime behavior changes: no external behavior change expected.
|
||||
- Rust code changes: move `HealOperations` and `NamespaceLocking` into
|
||||
`rustfs-storage-api` as generic operation contracts with associated
|
||||
ECStore-bound types, then keep ECStore's existing public names as fixed
|
||||
associated-type compatibility subtraits.
|
||||
- CI/script changes: extend migration guards for the heal/namespace-lock
|
||||
operation public re-exports and ECStore local-method regressions.
|
||||
- Docs changes: record the heal and namespace-lock operation contract
|
||||
extraction slice.
|
||||
- Rust code changes: migrate RustFS bucket response builders and IAM walk
|
||||
channel typing away from ECStore list response aliases to the generic
|
||||
`rustfs-storage-api` list contracts while keeping ECStore-owned
|
||||
`ObjectInfo`, `ObjectOptions`, readers, delete DTOs, and implementation
|
||||
behavior in ECStore.
|
||||
- CI/script changes: extend migration guards so outer RustFS/IAM list response
|
||||
consumers do not drift back to ECStore alias imports.
|
||||
- Docs changes: record the shared list operation consumer cleanup slice.
|
||||
|
||||
## Phase 0 Tasks
|
||||
|
||||
@@ -732,6 +732,27 @@ Status values: `[ ]` not started, `[~]` in progress, `[x]` complete, `[!]` block
|
||||
checks, migration/layer guards, formatting, diff hygiene, Rust risk scan,
|
||||
full pre-commit, and required three-expert review passed.
|
||||
|
||||
- [x] `API-024` Clean shared list operation consumer bounds.
|
||||
- Completed slice: migrate RustFS S3/bucket usecase list response builders from
|
||||
ECStore `ListObjectVersionsInfo`/`ListObjectsV2Info` aliases to
|
||||
`rustfs-storage-api` generic list response contracts bound to ECStore
|
||||
`ObjectInfo`; migrate IAM walk channel typing from ECStore
|
||||
`ObjectInfoOrErr` alias to the shared generic item contract.
|
||||
- Acceptance: outer RustFS/IAM consumers use storage-api list response
|
||||
contracts directly, ECStore keeps concrete aliases for internal
|
||||
implementation and compatibility, and migration guards reject restoring the
|
||||
old outer-consumer imports.
|
||||
- Must preserve: S3 list v2/version output mapping, IAM config walk channel
|
||||
item/error handling, ECStore concrete object metadata shape, walk options
|
||||
inference, and storage error conversion behavior.
|
||||
- Risk defense: this slice moves only low-coupling generic response/channel
|
||||
typing; ECStore still owns `ObjectInfo`, `ObjectOptions`, readers,
|
||||
filemeta-bound walk filter type, delete DTOs, and list/walk implementation
|
||||
bodies.
|
||||
- Verification: focused RustFS/IAM compile and tests, migration/layer guards,
|
||||
formatting, diff hygiene, Rust risk scan, full pre-commit, and required
|
||||
three-expert review passed.
|
||||
|
||||
## Phase 8 Background Controller Tasks
|
||||
|
||||
- [x] `BGC-001` Inventory background services.
|
||||
@@ -1008,17 +1029,17 @@ Status values: `[ ]` not started, `[~]` in progress, `[x]` complete, `[!]` block
|
||||
|
||||
| Expert | Status | Notes |
|
||||
|---|---|---|
|
||||
| Quality/architecture | passed | Generic heal and namespace-lock traits now live in `rustfs-storage-api`; ECStore still owns concrete type bindings and implementations. |
|
||||
| Migration preservation | passed | Existing ECStore public trait names remain as fixed associated-type compatibility subtraits while method resolution moves to shared traits where needed. |
|
||||
| Testing/verification | passed | Focused storage-api tests, ECStore compat tests, downstream compile checks, migration/layer guards, formatting, diff hygiene, Rust risk scan, and full `make pre-commit` passed. |
|
||||
| Quality/architecture | passed | Outer RustFS/IAM list response consumers now use the generic storage-api contracts; ECStore keeps concrete aliases only for implementation and compatibility. |
|
||||
| Migration preservation | passed | S3 list response mapping and IAM walk item/error handling keep the same ECStore `ObjectInfo`, error conversion, and walk option inference behavior. |
|
||||
| Testing/verification | passed | Focused RustFS/IAM compile/tests, migration/layer guards, formatting, diff hygiene, Rust risk scan, and full `make pre-commit` passed. |
|
||||
|
||||
## Verification Notes
|
||||
|
||||
Passed before push:
|
||||
|
||||
- `cargo test -p rustfs-storage-api`: passed.
|
||||
- `cargo test -p rustfs-ecstore --test ecstore_contract_compat_test`: passed.
|
||||
- `cargo check --tests -p rustfs-storage-api -p rustfs-ecstore -p rustfs -p rustfs-heal -p rustfs-scanner`: passed.
|
||||
- `cargo check --tests -p rustfs -p rustfs-iam`: passed.
|
||||
- `cargo test -p rustfs --lib storage::s3_api::bucket`: passed; 22 passed.
|
||||
- `cargo test -p rustfs-iam`: passed; 150 passed.
|
||||
- `./scripts/check_architecture_migration_rules.sh`: passed.
|
||||
- `./scripts/check_layer_dependencies.sh`: passed.
|
||||
- `cargo fmt --all --check`: passed.
|
||||
@@ -1031,21 +1052,20 @@ Passed before push:
|
||||
|
||||
Notes:
|
||||
|
||||
- This slice follows the object and multipart operation contract branch and keeps the old
|
||||
aggregate facade, bucket DTO, multipart DTO, bucket operation contract, object
|
||||
helper, range helper, list helper, object precondition, list response, and
|
||||
walk/list/object/multipart operation contract guards active.
|
||||
- The shared heal and namespace-lock operation contracts are now owned by
|
||||
`rustfs-storage-api`; ECStore keeps the concrete associated type bindings,
|
||||
`HealOpts`, `HealResultItem`, `NamespaceLockWrapper`, lock implementation,
|
||||
peer heal behavior, set/pool dispatch, and storage error mapping.
|
||||
- The slice does not alter heal, namespace-lock, object, list, walk,
|
||||
multipart, bucket, delete, reader, or tag/metadata runtime behavior.
|
||||
- This slice follows the heal and namespace-lock operation contract branch and
|
||||
keeps the old aggregate facade, DTO/helper, response, and operation contract
|
||||
guards active.
|
||||
- Outer RustFS/IAM consumers now bind low-coupling list response/channel
|
||||
containers through `rustfs-storage-api`; ECStore keeps the concrete aliases,
|
||||
object metadata, filemeta-bound walk filter, readers, delete DTOs, and list
|
||||
implementation behavior.
|
||||
- The slice does not alter list, walk, bucket, object, delete, reader,
|
||||
tag/metadata, heal, namespace-lock, multipart, or storage error runtime
|
||||
behavior.
|
||||
|
||||
## Handoff Notes
|
||||
|
||||
- Heal and namespace-lock operation contract cleanup is based on the merged
|
||||
object and multipart operation contract branch.
|
||||
- After this lands, remaining storage work can continue by removing low-value
|
||||
ECStore compatibility imports or extracting larger low-coupling object
|
||||
metadata/option/reader slices.
|
||||
- Shared list operation consumer cleanup is rebased onto `main` after
|
||||
`rustfs/rustfs#3560` merged.
|
||||
- After this lands, continue with larger consumer-migration batches instead of
|
||||
single-alias slices.
|
||||
|
||||
Reference in New Issue
Block a user