Skip to content

fix(s3): preserve list version page missing-bucket errors#164

Open
overtrue wants to merge 1 commit intomainfrom
codex/test-ls-version-page-contract
Open

fix(s3): preserve list version page missing-bucket errors#164
overtrue wants to merge 1 commit intomainfrom
codex/test-ls-version-page-contract

Conversation

@overtrue
Copy link
Copy Markdown
Contributor

Related issue(s)

Follow-up coverage for the ls --versions work in #162.

Background

The recent ls --versions change introduced S3Client::list_object_versions_page to preserve pagination markers and delete markers for version listings. That helper is the behavior boundary the CLI now relies on.

Root cause

The new helper had no direct regression coverage. When exercised against a NoSuchBucket service response, it still used the raw SDK display string for classification, which drops the AWS error code in this test harness and falls back to Error::General instead of the expected Error::NotFound.

Solution

This change adds focused unit coverage for the version-listing page contract and aligns the helper with the existing S3 error formatting path. The new tests verify that the request carries the versions subresource, prefix, and max-keys parameters, that delete markers and pagination metadata are preserved, and that NoSuchBucket maps back to the bucket-not-found contract.

Validation

  • cargo test -p rc-s3 list_object_versions_page --lib
  • cargo test -p rustfs-cli ls::tests --lib
  • make pre-commit

@overtrue overtrue marked this pull request as ready for review April 29, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant