fix(115_open): refresh expired OSS credentials during upload - #3063
Open
xqmmcqs wants to merge 1 commit into
Open
fix(115_open): refresh expired OSS credentials during upload#3063xqmmcqs wants to merge 1 commit into
xqmmcqs wants to merge 1 commit into
Conversation
- Refresh OSS credentials and retry the rejected multipart operation - Preserve upload IDs, completed parts, callbacks, and outer part retries - Rewind parts before resending and pass the upload context to OSS requests Co-authored-by: Codex <267193182+codex@users.noreply.github.com>
xqmmcqs
force-pushed
the
fix/115-open-upload-token-expired
branch
from
September 10, 2026 00:35
f986a05 to
ab23d1f
Compare
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.
Summary / 摘要
Long-running 115 Open uploads fail when OSS credentials expire because retries keep using the original credentials. Refresh credentials on
SecurityTokenExpiredand retry the rejected multipart initiation, part upload, or completion once, preserving the upload ID, completed parts, and callbacks.Part uploads retain their three outer attempts; each can make one additional attempt after refreshing expired credentials. Rewind the current part before resending it and pass the upload context to OSS requests. This PR changes only
drivers/115_open/upload.go.Related repository PRs / 关联仓库 PR: None.
Related Issues / 关联 Issue
Fixes #1376
Testing / 测试
Linux amd64, Go 1.27.1 in Docker:
go test -tags=jsoniter ./drivers/115_open -count=1passed with local, untracked tests. Those tests are not included in this PR. They exercise credential replacement and retries for multipart initiation, part upload, and completion, plus non-expiration errors and refresh failures.git diff --checkpassed./pingand frontend checks passed. The image was not rebuilt after that refactor.TestNewOSSClientUsesEnvironmentHTTPSProxy, fails because it expects*http.Transportbut receives*net.safeTransport. This was also reproduced on the unmodified base checkout.go test ./...— not run; validation focused on the affected driver and related network package.Checklist / 检查清单
gofmt,go fmt, orprettierwhere applicable.AI Disclosure / AI 使用声明
Tools used / 使用工具:
Usage scope / 使用范围:
Code generation / 代码生成
Refactoring / 重构
Documentation / 文档 — commit and PR descriptions
Tests / 测试 — local validation only; test files are not included
Review assistance / 审查辅助
I have reviewed and validated all AI-assisted content included in this PR.
I have ensured that all AI-assisted commits include
Co-Authored-Byattribution.I can reproduce all AI-assisted content included in this PR without any AI tools.
Codex implemented the change and performed the validation described above at the contributor's request. Human attestations not established during this work remain unchecked.