Skip to content

fix(services/cos): preserve list metadata etag and last_modified#7331

Merged
Xuanwo merged 1 commit intomainfrom
fix/cos-list-metadata
Apr 10, 2026
Merged

fix(services/cos): preserve list metadata etag and last_modified#7331
Xuanwo merged 1 commit intomainfrom
fix/cos-list-metadata

Conversation

@suyanhanx
Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #7306.

Rationale for this change

COS list responses include ETag and LastModified, but the normal list path only deserialized key and size, so list metadata lost those fields even though stat() could return them.

What changes are included in this PR?

  • deserialize LastModified and ETag in COS ListObjectsOutputContent
  • populate last_modified, etag, and content_md5 in the normal COS lister path
  • extend the COS XML parsing unit test to cover both fields

Are there any user-facing changes?

Users of COS list operations can now read etag and last_modified metadata from list results consistently across bindings.

AI Usage Statement

Used Codex (GPT-5) to investigate the issue, implement the fix, run tests, and validate the behavior with a Python reproduction script.

@suyanhanx suyanhanx requested a review from Xuanwo as a code owner March 28, 2026 13:54
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. releases-note/fix The PR fixes a bug or has a title that begins with "fix" labels Mar 28, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 10, 2026
@Xuanwo Xuanwo merged commit 1755db1 into main Apr 10, 2026
785 of 786 checks passed
@Xuanwo Xuanwo deleted the fix/cos-list-metadata branch April 10, 2026 03:38
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/fix The PR fixes a bug or has a title that begins with "fix" size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: COS list response metadata cannot return ETag and LastModified

2 participants