Skip to content

test(s3): cover native download and staged upload regressions - #431

Open
GatewayJ wants to merge 2 commits into
rustfs:mainfrom
GatewayJ:fix/native-transfer-regression-tests
Open

GatewayJ wants to merge 2 commits into
rustfs:mainfrom
GatewayJ:fix/native-transfer-regression-tests

Conversation

@GatewayJ

@GatewayJ GatewayJ commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Related work

Follow-up to the three regression-test requests in #430.

Changes

  • Exercise the direct-file download provider with an existing destination. Verify that a successful transfer replaces it, that both kinds of length mismatch preserve it, and that a rejection or failure after writing leaves the original file intact and sends no HTTP GET. Download review
  • Exercise automatic staged-upload probes for acceptance, decline, NotAccepted and OutcomeUnknown. On acceptance, require exactly one probe followed by an UploadPart for part 1 of the same multipart upload, then check the payload and completion. Check that the reader stays unpolled on the other paths and that HTTP fallback requires a successful multipart abort after a decline. Probe review
  • Hold the first file-part receipt while the second part fails. Check that the only SDK request at that point is multipart creation, then release the receipt and require exactly one abort. Receipt review

All changes are in the rc-s3 unit tests and their transport fixture.

Verification

  • cargo fmt --all --check
  • cargo test --locked -p rc-s3 --lib client::tests::native_transfer
  • cargo test --workspace --locked
  • cargo clippy --workspace --all-targets --locked -- -D warnings

Temporarily bypassing the file-length check, declining an accepted probe, allowing fallback after a failed abort, and skipping the outstanding receipt wait caused all four new tests to fail. The workspace checks ran against the original implementation.

Three independent changes to the reader path verified the accepted-probe assertion. Substituting PutObject, using a different upload ID, or sending part 2 each failed the test.

@GatewayJ
GatewayJ requested a balanced review from Copilot November 21, 2026 10:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@GatewayJ

Copy link
Copy Markdown
Member Author

@codex

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T10:59:52.839614Z 8139dbb Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 8139dbb3a7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

2 participants