Skip to content

refactor(services/cos): migrate to reqsign v2#7228

Merged
Xuanwo merged 1 commit intomainfrom
xuanwo/reqsign-cos-migration
Feb 26, 2026
Merged

refactor(services/cos): migrate to reqsign v2#7228
Xuanwo merged 1 commit intomainfrom
xuanwo/reqsign-cos-migration

Conversation

@Xuanwo
Copy link
Member

@Xuanwo Xuanwo commented Feb 26, 2026

Which issue does this PR close?

Part of #6553.

Rationale for this change

services/cos was still using the old monolithic reqsign APIs (TencentCosCredentialLoader and TencentCosSigner).
This PR migrates COS to reqsign v2 (reqsign-core + reqsign-tencent-cos) and aligns signing with the unified Signer<Credential> model.

What changes are included in this PR?

  • Dependency migration in services/cos:
    • remove old reqsign
    • add reqsign-core, reqsign-tencent-cos, reqsign-file-read-tokio, reqsign-http-send-reqwest
  • Backend credential wiring migration:
    • build reqsign_core::Context with tokio file reader and reqwest HTTP sender
    • replace old loader/signer setup with reqsign_tencent_cos::DefaultCredentialProvider + reqsign_core::Signer
    • keep explicit secret_id/secret_key as StaticCredentialProvider with highest priority (push_front)
    • preserve disable_config_load behavior by disabling default env/assume-role providers when enabled
  • Core signing migration:
    • replace TencentCosCredentialLoader + TencentCosSigner with Signer<reqsign_tencent_cos::Credential>
    • convert signing APIs from in-place &mut Request to owned Request -> Request
    • update all signing call sites accordingly
  • Writer migration:
    • update writer code paths to use the new owned signing flow

Are there any user-facing changes?

No user-facing API changes are intended.

AI Usage Statement

This PR was implemented with assistance from Codex (GPT-5) in the local development workflow.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. releases-note/refactor The PR does a refactor on code or has a title that begins with "refactor" labels Feb 26, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 26, 2026
@Xuanwo Xuanwo merged commit d37828e into main Feb 26, 2026
401 of 402 checks passed
@Xuanwo Xuanwo deleted the xuanwo/reqsign-cos-migration branch February 26, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer releases-note/refactor The PR does a refactor on code or has a title that begins with "refactor" size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants