Conversation
Rename managed ingress profiles to remote storage targets across the entire codebase for improved clarity and consistency. - Rename database table `managed_ingress_profiles` to `remote_storage_targets` - Update entity model field `profile_key` to `target_key` - Rename service module from `managed_ingress_profile_service` to `remote_storage_target_service` - Rename repository from `managed_ingress_profile_repo` to `remote_storage_target_repo` - Update API endpoints from `/ingress-profiles` to `/storage-targets` (keep old paths as deprecated aliases) - Rename DTOs: `RemoteIngressProfileInfo` → `RemoteStorageTargetInfo`, `RemoteCreateIngressProfileRequest` → `RemoteCreateStorageTargetRequest`, `RemoteUpdateIngressProfileRequest` → `RemoteUpdateStorageTargetRequest` - Rename driver descriptors: `ManagedIngressDriverDescriptor` → `RemoteStorageTargetDriverDescriptor` - Update frontend components, types, and hooks to use new naming conventions - Rename frontend files from `ManagedIngress*` to `RemoteStorageTarget*` - Update all i18n translation keys and labels in English and Chinese - Maintain backward compatibility with deprecated `/ingress-profile*` endpoints since 0.4.0 - Update audit log entity types and presentation messages - Add database migration to rename table and columns - Update OpenAPI schemas and documentation - Refactor internal storage protocol to use new terminology - Update config schema comments and error messages - Add new Chinese developer documentation for service ownership, storage descriptors, and upload contracts
Rename configuration and terminology from "managed ingress" to "remote storage target" for clarity, while preserving backward compatibility. **Configuration changes:** - Rename `server.follower.managed_ingress_local_root` to `server.follower.remote_storage_target_local_root` - Keep `managed_ingress_local_root` as a compatibility alias in config deserialization - Update default value from `managed-ingress` to `remote-storage-targets` - Update all example configs and environment variable names **Documentation updates:** - Update English and Chinese documentation to reflect new terminology - Revise deployment guides (Docker, systemd, production checklist) - Update developer documentation and architecture guides - Clarify that config key is now under `[server.follower]` section **Code changes:** - Rename internal variables and struct fields to use `remote_storage_target_local_root` - Update error messages to reference new config key name - Add TODO comments to preserve wire protocol compatibility for `managed_ingress` in API responses and audit logs - Retain audit action names and entity types as `RemoteIngressProfile` for historical data compatibility **Frontend changes:** - Update i18n namespace from `managed-ingress` to `remote-storage-targets` - Update English and Chinese UI copy to reference `remote_storage_target_local_root` **Testing:** - Add test for legacy `managed_ingress_local_root` alias acceptance - Update existing tests to use new config key name **Backward compatibility:** - Config loader accepts both old and new key names under `[server.follower]` - API error codes remain `managed_ingress.*` for client compatibility - Audit log entity types and action names unchanged to preserve historical records - Wire protocol capabilities continue using `managed_ingress` field name
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (23)
✅ Files skipped from review due to trivial changes (4)
🚧 Files skipped from review as they are similar to previous changes (15)
📝 WalkthroughWalkthrough本 PR 将 Changesmanaged_ingress_profile → remote_storage_target 重命名
Estimated code review effort: 4 (Complex) | ~75 minutes Sequence Diagram(s)sequenceDiagram
participant Admin
participant AdminRoute as admin/remote_nodes.rs
participant RemoteSvc as remote_storage_target_service
participant Client as RemoteStorageClient
participant Follower
Admin->>AdminRoute: POST /remote-nodes/{id}/storage-targets
AdminRoute->>RemoteSvc: create_remote(node_id, request)
RemoteSvc->>Client: create_storage_target(request)
Client->>Follower: POST /internal/storage/targets
Follower-->>Client: RemoteStorageTargetInfo
Client-->>RemoteSvc: RemoteStorageTargetInfo
RemoteSvc-->>AdminRoute: RemoteStorageTargetInfo
AdminRoute-->>Admin: 审计记录 + 响应
Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
frontend-panel/src/components/admin/remoteStorageTargetDialogShared.ts (1)
44-130: 📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift又拿
driver_type === "s3"当能力开关用了,这不行。
normalizeRemoteStorageTargetForm(Line 47)、buildCreateRemoteStorageTargetPayload(Line 79)、buildUpdateRemoteStorageTargetPayload(Line 99)里全靠硬编码判断driver_type是不是"s3"来决定endpoint/bucket/access_key/secret_key是清空还是保留。这正是指导原则里明令禁止的白名单推断,同一个目录下RemoteNodeRemoteStorageTargetForm.tsx已经用activeDriverDescriptor.fields(后端 descriptor)判断字段该不该显示了——这里却反其道而行之,两边逻辑不一致,以后加新驱动类型(比如 azure)这几个函数全得跟着改,还容易漏改。把 descriptor(或至少字段名集合)传进来,用
fields.some(f => f.name === "endpoint")这种方式替代硬编码分支,才是照着后端 capability 走的正路。♻️ 思路示意(需要调用方一并传入 descriptor)
-function normalizeRemoteStorageTargetForm( - form: RemoteStorageTargetFormData, -): RemoteStorageTargetFormData { - if (form.driver_type !== "s3") { +function normalizeRemoteStorageTargetForm( + form: RemoteStorageTargetFormData, + supportedFieldNames: ReadonlySet<string>, +): RemoteStorageTargetFormData { + if (!supportedFieldNames.has("endpoint") && !supportedFieldNames.has("bucket")) { return { ...form, name: form.name.trim(), base_path: form.base_path.trim(), endpoint: "", bucket: "", }; } ... }
buildCreateRemoteStorageTargetPayload/buildUpdateRemoteStorageTargetPayload同理,用supportedFieldNames.has("access_key")等替换isS3。As per coding guidelines, "Do not add driver type whitelists (driver_type === 's3' || 'azure_blob' || ...) to infer capabilities; use descriptor metadata only" (
frontend-panel/src/components/**/*.{ts,tsx}).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend-panel/src/components/admin/remoteStorageTargetDialogShared.ts` around lines 44 - 130, The payload normalization logic is inferring capabilities from hardcoded driver_type checks instead of using descriptor metadata. Update normalizeRemoteStorageTargetForm, buildCreateRemoteStorageTargetPayload, and buildUpdateRemoteStorageTargetPayload to accept the active driver descriptor or a supported field-name set, and use that to decide whether endpoint, bucket, access_key, and secret_key should be preserved or cleared. Keep the behavior aligned with RemoteNodeRemoteStorageTargetForm and remove the isS3 branching so new drivers work without changing these helpers.Source: Coding guidelines
tests/test_remote_storage.rs (1)
876-886: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win把这几处旧字段名改掉
ServerFollowerConfig里已经只有remote_storage_target_local_root,alias = "managed_ingress_local_root"只管配置键,不会保留 Rust 字段。876-886、1554-1559、1629-1642 这里继续用.managed_ingress_local_root会直接编译失败。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/test_remote_storage.rs` around lines 876 - 886, The test code is still referencing the removed Rust field managed_ingress_local_root on ServerFollowerConfig, which now only exists as the config alias for remote_storage_target_local_root. Update the affected assertions and path builders in test_remote_storage.rs to use provider_state.config.server.follower.remote_storage_target_local_root instead of managed_ingress_local_root, and apply the same replacement wherever those old field accesses appear in the other referenced test blocks.
🧹 Nitpick comments (10)
frontend-panel/src/pages/admin/useAdminRemoteNodesPageController.ts (1)
603-623: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value参数名
profileKey没跟上改名节奏。这个值实际来自
RemoteStorageTargetInfo.target_key,别的地方(比如deleteRemoteStorageTarget里的profile.target_key)都已经统一叫target_key了,就这一处还叫profileKey,看着像没改完。RemoteNodeDialog.tsx里onUpdateRemoteStorageTarget的类型签名也用了同一个名字,顺手一起改了吧。不是什么大事,但既然全链路都在改名,半吊子的名字留着膈应人。♻️ 建议改动
- const updateRemoteStorageTarget = async ( - profileKey: string, - payload: RemoteUpdateStorageTargetRequest, - ) => { + const updateRemoteStorageTarget = async ( + targetKey: string, + payload: RemoteUpdateStorageTargetRequest, + ) => { if (editingId == null) { return; } try { await adminRemoteNodeService.updateStorageTarget( editingId, - profileKey, + targetKey, payload, );🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend-panel/src/pages/admin/useAdminRemoteNodesPageController.ts` around lines 603 - 623, The parameter naming in updateRemoteStorageTarget is inconsistent with the rest of the remote storage target flow. Rename profileKey to target_key in updateRemoteStorageTarget and update the matching onUpdateRemoteStorageTarget type/signature in RemoteNodeDialog.tsx so it aligns with RemoteStorageTargetInfo.target_key and deleteRemoteStorageTarget’s usage. Keep the service call and payload wiring unchanged, just propagate the new name consistently through these symbols.frontend-panel/src/components/admin/admin-remote-nodes-page/RemoteNodeRemoteStorageTargetSection.tsx (1)
29-40: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win改名改一半,别自己给自己挖坑。
组件本体、state(
editingTargetKey/pendingDeleteTargetKey)、字段(target_key)全部改成了 remote storage target,唯独对外暴露的接口onCreateProfile/onUpdateProfile/onDeleteProfile/profiles还叫着"Profile"没动。这不是我挑刺,是你自己的改名工程留了个尾巴——RemoteNodeRemoteStorageTargetsList.tsx里的onConfirmDeleteProfile/onRequestDeleteProfile/onEditProfile全是被这里传染的。功能没坏,但一个叫RemoteStorageTarget的组件对外还挂着Profile的招牌,下一个接手的人迟早看晕。Issue
#376说了"internal target-oriented module naming where practical",那就顺手改干净,別留半成品。♻️ 建议改法
interface RemoteNodeRemoteStorageTargetSectionProps { driverDescriptors: RemoteStorageTargetDriverDescriptor[]; errorMessage: string | null; loading: boolean; - onCreateProfile: (payload: RemoteCreateStorageTargetRequest) => Promise<void>; - onDeleteProfile: (profile: RemoteStorageTargetInfo) => Promise<void>; - onUpdateProfile: ( - profileKey: string, + onCreateTarget: (payload: RemoteCreateStorageTargetRequest) => Promise<void>; + onDeleteTarget: (target: RemoteStorageTargetInfo) => Promise<void>; + onUpdateTarget: ( + targetKey: string, payload: RemoteUpdateStorageTargetRequest, ) => Promise<void>; - profiles: RemoteStorageTargetInfo[]; + targets: RemoteStorageTargetInfo[]; }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend-panel/src/components/admin/admin-remote-nodes-page/RemoteNodeRemoteStorageTargetSection.tsx` around lines 29 - 40, The RemoteNodeRemoteStorageTargetSectionProps API still uses legacy “Profile” names even though the component and state have been renamed to remote storage target terminology. Rename the exposed props in RemoteNodeRemoteStorageTargetSection and the corresponding handlers in RemoteNodeRemoteStorageTargetsList to target-oriented names, keeping them consistent with editingTargetKey, pendingDeleteTargetKey, and target_key. Update all call sites and prop wiring together so the public interface matches the internal naming and doesn’t leave leftover Profile terminology.docs/storage/remote-follower.md (2)
348-355: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win故障排查清单里同样是新旧术语混用。
第 354 行"是否有已应用的默认接收落点"、第 355 行"从节点接收根目录是否可写"仍是旧词,紧邻的第 380 行已经改成了
remote_storage_target_local_root。同一份排查清单里字段名对不上,排障时容易找错配置项。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/storage/remote-follower.md` around lines 348 - 355, The troubleshooting checklist still mixes old and new terminology for the remote upload path configuration. Update the steps in the remote 策略上传失败 section to use the same field name as the rest of the document, specifically remote_storage_target_local_root, and revise the related wording in the affected checklist items so they consistently point to the current configuration symbol.
73-121: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win术语替换不彻底,"接收落点"和"远程存储目标"混着用。
第 96、103、115 行已经把配置键改成
remote_storage_target_local_root、路径示例改成/data/remote-storage-targets/...,但同一段里的小标题(第 73 行"创建默认接收落点")、字段说明(第 78、90、92、106、118-119 行)还是旧词"接收落点"。同一份操作指南里新旧术语来回跳,看着容易懵——猫猫这次改名改得挺勤快,就是这一段落了点。这块只是文档措辞,不影响功能,但既然本 PR 目标就是全链路改名,这里补齐一下更省心。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/storage/remote-follower.md` around lines 73 - 121, 该段文档的术语替换不完整,仍在混用“接收落点”和“远程存储目标”,需要统一为当前 PR 采用的新命名。请在这段说明中同步检查并更新标题、字段说明以及示例描述,重点调整 remote-follower 文档里“创建默认接收落点”相关表述,使其与 `remote_storage_target_local_root` 和 `/data/remote-storage-targets/...` 的新术语保持一致,避免同一流程中出现旧新词混杂。src/services/remote_storage_target_service/remote.rs (1)
58-78: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value日志文案重命名残留:"remote ... remote storage target" 重复用词
"deleting remote managed remote storage target"/"deleted remote managed remote storage target"里 "remote" 出现了两次,读起来别扭,明显是从 "remote managed ingress profile" 机械替换过来的残留。顺手清理一下更利落。✏️ 建议措辞
- "deleting remote managed remote storage target" + "deleting remote storage target" ... - "deleted remote managed remote storage target" + "deleted remote storage target"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/services/remote_storage_target_service/remote.rs` around lines 58 - 78, The tracing messages in delete_remote still contain awkward duplicated wording (“remote managed remote storage target”) from a mechanical rename. Update the debug/info log strings in delete_remote to use cleaner, non-redundant wording, keeping the same tracing::debug and tracing::info calls with remote_node_id and target_key intact.src/db/repository/remote_storage_target_repo.rs (2)
12-14: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value签名风格不统一:三个查询函数写死了
&DatabaseConnection
find_by_id、find_all_by_binding、find_default_by_binding用具体类型而不是像find_by_binding_and_target_key/count_by_binding/create/update那样泛型化为<C: ConnectionTrait>。这导致set_only_default_for_binding不得不再造一个私有的find_by_id_in_connection泛型版本才能在事务里查询。统一成泛型能减少这种重复,也方便以后有人需要在事务内做列表/查找。♻️ 建议改法(以 find_by_id 为例)
-pub async fn find_by_id(db: &DatabaseConnection, id: i64) -> Result<remote_storage_target::Model> { - find_by_id_in_connection(db, id).await -} +pub async fn find_by_id<C: ConnectionTrait>(db: &C, id: i64) -> Result<remote_storage_target::Model> { + find_by_id_in_connection(db, id).await +}Also applies to: 29-32, 43-46
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/db/repository/remote_storage_target_repo.rs` around lines 12 - 14, The query helpers are inconsistent because find_by_id, find_all_by_binding, and find_default_by_binding are still hard-coded to &DatabaseConnection while the other repository methods already use <C: ConnectionTrait>. Refactor these three functions to accept a generic connection trait like the existing find_by_binding_and_target_key, count_by_binding, create, and update methods, and route them through the generic query logic so set_only_default_for_binding can reuse them inside transactions without needing a separate private find_by_id_in_connection helper.
102-115: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value参数名
profile_id与整体重命名不一致其他地方都已经切到
target_key/remote_storage_target措辞,这里参数还叫profile_id,错误信息里也是 "managed remote storage target #{profile_id}",读起来有点错位。既然本 PR 就是做全链路重命名,顺手把这个参数改成target_id会更彻底。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/db/repository/remote_storage_target_repo.rs` around lines 102 - 115, The naming in set_only_default_for_binding is inconsistent with the rest of the rename: the parameter still uses profile_id while surrounding code now refers to target_key/remote_storage_target. Update this function’s argument and any local references in the validation path to a target-oriented name such as target_id, and make the error message use the same terminology so the repository method stays aligned with the new naming scheme.src/services/remote_storage_target_service/target.rs (1)
31-48: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value错误提示文案里的 "managed remote storage target" 混合措辞
第 35 行和 44 行的错误信息用了 "managed remote storage target",是老术语 "managed ingress profile" 替换后的残留组合词,跟本 PR 想统一到 "remote storage target" 的目标不一致。这些错误信息会通过
precondition_failed_with_code抛给上层(可能展示在管理端),建议顺手统一措辞。✏️ 建议措辞
- "managed remote storage target '{}' is not ready: {}", + "remote storage target '{}' is not ready: {}", ... - "managed remote storage target '{}' is pending apply", + "remote storage target '{}' is pending apply",As per coding guidelines,
src/**/*.rsrequires domain-specific naming consistency ("Organize code around AsterDrive file infrastructure semantics").🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/services/remote_storage_target_service/target.rs` around lines 31 - 48, 统一 remote_storage_target_service::target 中的错误文案措辞,当前在 precondition_failed_with_code 的提示里还残留“managed remote storage target”这种旧术语组合。请把 target.rs 里与 target.last_error 和 applied_revision/desired_revision 检查相关的错误消息统一改成“remote storage target”语义,保持与本 PR 的命名和 AsterDrive 文件基础设施术语一致,并确保 target.target_key 等上下文仍保留在提示中。Source: Coding guidelines
src/services/remote_storage_target_service/tests.rs (1)
170-175: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value测试夹具里残留 "igp"/"managed-ingress" 命名
model_with_driver的target_key: "igp_test"和setup_state的临时目录名"aster-managed-ingress-service-root-{}"还是老术语,跟实际生成规则rst_前缀(new_target_key)不一致。不影响用例结果,但既然是重命名 PR,顺手改掉更彻底、也少一点误导。Also applies to: 87-90
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/services/remote_storage_target_service/tests.rs` around lines 170 - 175, 测试夹具里还有旧的“igp/managed-ingress”命名残留,需要和新的 rst_ 命名规则保持一致。请在 remote_storage_target::tests 中更新 model_with_driver 的 target_key 以及 setup_state 里使用的临时目录名,改为与 new_target_key 一致的命名风格。优先通过这些测试辅助函数和相关常量/字符串定位并统一替换,避免重命名后的术语继续出现在测试里。src/services/remote_storage_target_service/models.rs (1)
7-11: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
ResolvedIngressTarget没改名,扎眼。整个服务、路由、驱动、路径全部从
ingress_profile改成remote_storage_target,就这个结构体名字纹丝不动,杵在remote_storage_target_service模块里格格不入。Issue#376明确要求"内部 target 导向的模块命名",这个漏网之鱼不补上说不过去。改名影响面不大——本文件定义处 +
mod.rs再导出 +target.rs里resolve_effective_target的返回类型,顺手就能扫干净。♻️ 建议改名
-pub struct ResolvedIngressTarget { +pub struct ResolvedRemoteStorageTarget { pub driver: Arc<dyn StorageDriver>, pub max_file_size: i64, }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/services/remote_storage_target_service/models.rs` around lines 7 - 11, Rename the lingering ResolvedIngressTarget type to match the new remote_storage_target naming so the module is consistent. Update the struct definition in models.rs, adjust the re-export in mod.rs, and change the return type used by resolve_effective_target in target.rs to the new name. Also fix any imports or references that still point to ResolvedIngressTarget so the rename is complete across the service.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/en/deployment/systemd.md`:
- Line 129: The systemd example still uses the old directory value even though
the environment variable was renamed to REMOTE_STORAGE_TARGET_LOCAL_ROOT. Update
the example in the deployment documentation so the value matches the new naming
scheme and the related default directory term used elsewhere, and keep the
change consistent with the surrounding systemd sample block.
In `@docs/guide/remote-nodes.md`:
- Around line 143-151: The TOML examples in the remote node docs use a
nonstandard root path for remote storage targets; update the example values in
the relevant configuration snippets to the schema’s default root name using the
same symbols shown in the doc section (remote_storage_target_local_root and the
follower remote storage target setting), while keeping the later explanation of
the final on-disk path unchanged. Also apply the same correction to the other
referenced example block so both snippets stay consistent with the default
value.
In `@frontend-panel/src/i18n/index.ts`:
- Line 118: The `errors` namespace split part and the actual JSON filename are
mismatched, so `loadNamespace` will look for the wrong file under `errors`.
Update `SPLIT_NAMESPACE_PARTS` in `index.ts` to use the same part name as the
existing `managed-ingress.json`, or rename the locale JSON to match
`remote-storage-targets` so the lookup resolves correctly.
In `@frontend-panel/src/services/api.generated.ts`:
- Line 11825: The 412 OpenAPI description for the old ingress-profiles alias is
still using the outdated “Managed remote storage targets require a single
primary binding” text, while the storage-targets route now uses “Remote storage
targets require a single primary binding.” Update the four OpenAPI annotations
in remote_nodes.rs for the alias routes to match the new wording, then
regenerate the client artifacts; do not edit api.generated.ts directly.
---
Outside diff comments:
In `@frontend-panel/src/components/admin/remoteStorageTargetDialogShared.ts`:
- Around line 44-130: The payload normalization logic is inferring capabilities
from hardcoded driver_type checks instead of using descriptor metadata. Update
normalizeRemoteStorageTargetForm, buildCreateRemoteStorageTargetPayload, and
buildUpdateRemoteStorageTargetPayload to accept the active driver descriptor or
a supported field-name set, and use that to decide whether endpoint, bucket,
access_key, and secret_key should be preserved or cleared. Keep the behavior
aligned with RemoteNodeRemoteStorageTargetForm and remove the isS3 branching so
new drivers work without changing these helpers.
In `@tests/test_remote_storage.rs`:
- Around line 876-886: The test code is still referencing the removed Rust field
managed_ingress_local_root on ServerFollowerConfig, which now only exists as the
config alias for remote_storage_target_local_root. Update the affected
assertions and path builders in test_remote_storage.rs to use
provider_state.config.server.follower.remote_storage_target_local_root instead
of managed_ingress_local_root, and apply the same replacement wherever those old
field accesses appear in the other referenced test blocks.
---
Nitpick comments:
In `@docs/storage/remote-follower.md`:
- Around line 348-355: The troubleshooting checklist still mixes old and new
terminology for the remote upload path configuration. Update the steps in the
remote 策略上传失败 section to use the same field name as the rest of the document,
specifically remote_storage_target_local_root, and revise the related wording in
the affected checklist items so they consistently point to the current
configuration symbol.
- Around line 73-121: 该段文档的术语替换不完整,仍在混用“接收落点”和“远程存储目标”,需要统一为当前 PR
采用的新命名。请在这段说明中同步检查并更新标题、字段说明以及示例描述,重点调整 remote-follower 文档里“创建默认接收落点”相关表述,使其与
`remote_storage_target_local_root` 和 `/data/remote-storage-targets/...`
的新术语保持一致,避免同一流程中出现旧新词混杂。
In
`@frontend-panel/src/components/admin/admin-remote-nodes-page/RemoteNodeRemoteStorageTargetSection.tsx`:
- Around line 29-40: The RemoteNodeRemoteStorageTargetSectionProps API still
uses legacy “Profile” names even though the component and state have been
renamed to remote storage target terminology. Rename the exposed props in
RemoteNodeRemoteStorageTargetSection and the corresponding handlers in
RemoteNodeRemoteStorageTargetsList to target-oriented names, keeping them
consistent with editingTargetKey, pendingDeleteTargetKey, and target_key. Update
all call sites and prop wiring together so the public interface matches the
internal naming and doesn’t leave leftover Profile terminology.
In `@frontend-panel/src/pages/admin/useAdminRemoteNodesPageController.ts`:
- Around line 603-623: The parameter naming in updateRemoteStorageTarget is
inconsistent with the rest of the remote storage target flow. Rename profileKey
to target_key in updateRemoteStorageTarget and update the matching
onUpdateRemoteStorageTarget type/signature in RemoteNodeDialog.tsx so it aligns
with RemoteStorageTargetInfo.target_key and deleteRemoteStorageTarget’s usage.
Keep the service call and payload wiring unchanged, just propagate the new name
consistently through these symbols.
In `@src/db/repository/remote_storage_target_repo.rs`:
- Around line 12-14: The query helpers are inconsistent because find_by_id,
find_all_by_binding, and find_default_by_binding are still hard-coded to
&DatabaseConnection while the other repository methods already use <C:
ConnectionTrait>. Refactor these three functions to accept a generic connection
trait like the existing find_by_binding_and_target_key, count_by_binding,
create, and update methods, and route them through the generic query logic so
set_only_default_for_binding can reuse them inside transactions without needing
a separate private find_by_id_in_connection helper.
- Around line 102-115: The naming in set_only_default_for_binding is
inconsistent with the rest of the rename: the parameter still uses profile_id
while surrounding code now refers to target_key/remote_storage_target. Update
this function’s argument and any local references in the validation path to a
target-oriented name such as target_id, and make the error message use the same
terminology so the repository method stays aligned with the new naming scheme.
In `@src/services/remote_storage_target_service/models.rs`:
- Around line 7-11: Rename the lingering ResolvedIngressTarget type to match the
new remote_storage_target naming so the module is consistent. Update the struct
definition in models.rs, adjust the re-export in mod.rs, and change the return
type used by resolve_effective_target in target.rs to the new name. Also fix any
imports or references that still point to ResolvedIngressTarget so the rename is
complete across the service.
In `@src/services/remote_storage_target_service/remote.rs`:
- Around line 58-78: The tracing messages in delete_remote still contain awkward
duplicated wording (“remote managed remote storage target”) from a mechanical
rename. Update the debug/info log strings in delete_remote to use cleaner,
non-redundant wording, keeping the same tracing::debug and tracing::info calls
with remote_node_id and target_key intact.
In `@src/services/remote_storage_target_service/target.rs`:
- Around line 31-48: 统一 remote_storage_target_service::target 中的错误文案措辞,当前在
precondition_failed_with_code 的提示里还残留“managed remote storage target”这种旧术语组合。请把
target.rs 里与 target.last_error 和 applied_revision/desired_revision
检查相关的错误消息统一改成“remote storage target”语义,保持与本 PR 的命名和 AsterDrive 文件基础设施术语一致,并确保
target.target_key 等上下文仍保留在提示中。
In `@src/services/remote_storage_target_service/tests.rs`:
- Around line 170-175: 测试夹具里还有旧的“igp/managed-ingress”命名残留,需要和新的 rst_ 命名规则保持一致。请在
remote_storage_target::tests 中更新 model_with_driver 的 target_key 以及 setup_state
里使用的临时目录名,改为与 new_target_key
一致的命名风格。优先通过这些测试辅助函数和相关常量/字符串定位并统一替换,避免重命名后的术语继续出现在测试里。
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 87b5b7c5-c60a-4df5-9b25-19bd9277b384
📒 Files selected for processing (100)
config.example.tomldeveloper-docs/en/api/admin.mddeveloper-docs/en/api/internal-storage.mddeveloper-docs/en/architecture.mddeveloper-docs/en/module-designs.mddeveloper-docs/zh-CN/README.mddeveloper-docs/zh-CN/api/admin.mddeveloper-docs/zh-CN/api/internal-storage.mddeveloper-docs/zh-CN/architecture.mddeveloper-docs/zh-CN/backend-service-ownership.mddeveloper-docs/zh-CN/module-designs.mddeveloper-docs/zh-CN/remote-storage-target-policy-ownership.mddeveloper-docs/zh-CN/storage-descriptor-normalization-contract.mddeveloper-docs/zh-CN/upload-finalization-contracts.mddocs/config/server.mddocs/deployment/docker-follower.mddocs/deployment/production-checklist.mddocs/deployment/runtime-behavior.mddocs/deployment/systemd.mddocs/en/config/server.mddocs/en/deployment/docker-follower.mddocs/en/deployment/production-checklist.mddocs/en/deployment/runtime-behavior.mddocs/en/deployment/systemd.mddocs/en/guide/admin-console.mddocs/en/guide/remote-nodes.mddocs/en/storage/remote-follower.mddocs/guide/admin-console.mddocs/guide/remote-nodes.mddocs/storage/remote-follower.mdfrontend-panel/src/components/admin/admin-remote-nodes-page/RemoteNodeDialog.tsxfrontend-panel/src/components/admin/admin-remote-nodes-page/RemoteNodeEditForm.tsxfrontend-panel/src/components/admin/admin-remote-nodes-page/RemoteNodeManagedIngressTypes.tsfrontend-panel/src/components/admin/admin-remote-nodes-page/RemoteNodeRemoteStorageTargetForm.tsxfrontend-panel/src/components/admin/admin-remote-nodes-page/RemoteNodeRemoteStorageTargetSection.test.tsxfrontend-panel/src/components/admin/admin-remote-nodes-page/RemoteNodeRemoteStorageTargetSection.tsxfrontend-panel/src/components/admin/admin-remote-nodes-page/RemoteNodeRemoteStorageTargetTypes.tsfrontend-panel/src/components/admin/admin-remote-nodes-page/RemoteNodeRemoteStorageTargetsList.tsxfrontend-panel/src/components/admin/admin-remote-nodes-page/remoteNodeRemoteStorageTargetPresentation.test.tsfrontend-panel/src/components/admin/admin-remote-nodes-page/remoteNodeRemoteStorageTargetPresentation.tsfrontend-panel/src/components/admin/remoteStorageTargetDialogShared.test.tsfrontend-panel/src/components/admin/remoteStorageTargetDialogShared.tsfrontend-panel/src/i18n/index.tsfrontend-panel/src/i18n/locales/en/admin/audit.jsonfrontend-panel/src/i18n/locales/en/admin/remote-nodes.jsonfrontend-panel/src/i18n/locales/en/admin/settings-common.jsonfrontend-panel/src/i18n/locales/en/errors/managed-ingress.jsonfrontend-panel/src/i18n/locales/zh/admin/audit.jsonfrontend-panel/src/i18n/locales/zh/admin/remote-nodes.jsonfrontend-panel/src/i18n/locales/zh/admin/settings-common.jsonfrontend-panel/src/i18n/locales/zh/errors/managed-ingress.jsonfrontend-panel/src/pages/admin/AdminRemoteNodesPage.test.tsxfrontend-panel/src/pages/admin/AdminRemoteNodesPage.tsxfrontend-panel/src/pages/admin/useAdminRemoteNodesPageController.tsfrontend-panel/src/services/adminService.test.tsfrontend-panel/src/services/adminService.tsfrontend-panel/src/services/api.generated.tsfrontend-panel/src/types/api-helpers.tsfrontend-panel/src/types/api.tsmigration/src/lib.rsmigration/src/m20260704_000001_rename_managed_ingress_profiles_to_remote_storage_targets.rssrc/api/api_error_code.rssrc/api/openapi.rssrc/api/routes/admin/mod.rssrc/api/routes/admin/remote_nodes.rssrc/api/routes/internal_storage.rssrc/cli/database_migration/mod.rssrc/config/loader.rssrc/config/schema.rssrc/db/repository/managed_ingress_profile_repo.rssrc/db/repository/mod.rssrc/db/repository/remote_storage_target_repo.rssrc/entities/master_binding.rssrc/entities/mod.rssrc/entities/remote_storage_target.rssrc/services/audit_service/details.rssrc/services/audit_service/presentation.rssrc/services/managed_ingress_profile_service/local_profiles.rssrc/services/managed_ingress_profile_service/mod.rssrc/services/managed_ingress_profile_service/remote.rssrc/services/master_binding_service.rssrc/services/mod.rssrc/services/remote_storage_target_service/capability.rssrc/services/remote_storage_target_service/driver.rssrc/services/remote_storage_target_service/local_profiles.rssrc/services/remote_storage_target_service/mod.rssrc/services/remote_storage_target_service/models.rssrc/services/remote_storage_target_service/normalization.rssrc/services/remote_storage_target_service/paths.rssrc/services/remote_storage_target_service/reconciliation.rssrc/services/remote_storage_target_service/remote.rssrc/services/remote_storage_target_service/target.rssrc/services/remote_storage_target_service/tests.rssrc/storage/remote_protocol/client.rssrc/storage/remote_protocol/mod.rssrc/storage/remote_protocol/models.rssrc/storage/remote_protocol/tests.rssrc/types/audit.rstests/test_remote_storage.rstests/test_schema_drift.rs
💤 Files with no reviewable changes (5)
- frontend-panel/src/components/admin/admin-remote-nodes-page/RemoteNodeManagedIngressTypes.ts
- src/services/managed_ingress_profile_service/remote.rs
- src/db/repository/managed_ingress_profile_repo.rs
- src/services/managed_ingress_profile_service/mod.rs
- src/services/managed_ingress_profile_service/local_profiles.rs
Standardize terminology across documentation, frontend, and backend: - Replace "managed-ingress" with "remote-storage-targets" in paths and configurations - Rename "ingress profile" to "remote storage target" throughout UI components - Update component prop names from profile-based to target-based naming (profiles → targets, onCreateProfile → onCreateTarget, etc.) - Rename ResolvedIngressTarget to ResolvedRemoteStorageTarget - Update API documentation descriptions for storage target endpoints - Simplify field handling logic to use supported field sets consistently - Update test fixtures and temporary directory naming to reflect new terminology
Summary
managed_ingress_profiles/profile_keytoremote_storage_targets/target_key, without modifying existing migrations.server.follower.remote_storage_target_local_root, withmanaged_ingress_local_rootkept as a nested serde alias.Validation
cargo fmt --checkcargo check -j 1cargo test --test test_schema_drift -j 1cargo test --features openapi --test generate_openapi -j 1cargo test --lib config::loader -j 1cargo test --lib remote_storage_target_service -j 1cd frontend-panel && bun run test -- src/pages/admin/AdminRemoteNodesPage.test.tsx src/services/adminService.test.ts src/components/admin/admin-remote-nodes-page/RemoteNodeRemoteStorageTargetSection.test.tsx src/components/admin/remoteStorageTargetDialogShared.test.ts src/components/admin/admin-remote-nodes-page/remoteNodeRemoteStorageTargetPresentation.test.tscd frontend-panel && bunx biome check ...Closes #374
Closes #376
Summary by CodeRabbit
新功能
改进