fix(obs): 修复选择华为obs作为对象存储并配置proxyDomain参数时校验出错的bug - #2790
Open
CodeMarker0 wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
补充合入信息:
PR 创建后主分支已有后续提交;如维护流程要求基于最新 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When Huawei OBS is configured with
OBS_PROXY_DOMAIN, upload and copy operations currently return the proxy URL as the file's physical path. The resource registry determines the storage provider from that physical path, so an HTTP(S) proxy URL cannot be reliably identified as an OBS object. This can cause resource registration, later reads, and multi-backend routing to fail.This PR separates the internal physical path from the externally accessible URL:
obs://<bucket>/<objectKey>.OBS_PROXY_DOMAINis used only when generating an accessible URL throughGetFileURL.OBS_PROXY_DOMAINremain readable and copyable.No database migration is required. Newly uploaded or copied objects use the canonical
obs://representation, while supported legacy paths continue to be resolved at read time.Type of Change
Related Issue
No linked issue. This PR fixes the OBS upload and resource-registration failure reproduced when
OBS_PROXY_DOMAINis configured.Testing
Added regression coverage for:
SaveBytesreturning a canonicalobs://<bucket>/<objectKey>path when a proxy domain is configuredstorage://<backend-id>/obs://...resource pathsAutomated checks:
Checklist
git diff --check origin/main...HEADpassesScreenshots / Recordings
N/A — no user-visible UI changes.