Skip to content

Fix: handle Scaleway InvalidRequest for large file CopyObject - #222

Merged
matthiasL-scality merged 2 commits into
mainfrom
fix/scaleway-invalidrequest-large-copy
Aug 6, 2026
Merged

Fix: handle Scaleway InvalidRequest for large file CopyObject#222
matthiasL-scality merged 2 commits into
mainfrom
fix/scaleway-invalidrequest-large-copy

Conversation

@matthiasL-scality

Copy link
Copy Markdown
Contributor

Summary

  • Scaleway returns InvalidRequest (not EntityTooLarge) when CopyObject is called on a file larger than 5 GB
  • The multipart copy fallback (UploadPartCopy) was never triggered on Scaleway because the detection only checked for EntityTooLarge
  • Confirmed via nginx logs: scality-adi-1.0.1.iso (10 GB) returned 400 with <Code>InvalidRequest</Code><Message>The specified copy source is larger than the maximum allowable size for a copy source: 5368709120</Message>

Test plan

  • Existing test_copy_via_multipart_copy passes (uses COPY_OBJECT_SIZE_LIMIT=0 to force multipart path)
  • Deploy 4.4.9 to devinfra and re-run ADI release workflow to confirm 10 GB ISO copies correctly

🤖 Generated with Claude Code

Scaleway returns InvalidRequest (not EntityTooLarge) when CopyObject
is called on a file larger than 5 GB. The multipart copy fallback
was never triggered for Scaleway builds because the error code check
only matched EntityTooLarge.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@matthiasL-scality
matthiasL-scality requested a review from a team as a code owner August 6, 2026 14:04
Comment thread lua/copy_build.lua
@claude

claude Bot commented Aug 6, 2026

Copy link
Copy Markdown
  • InvalidRequest is a generic S3 error code — matching on it alone at line 264 could trigger spurious multipart copy fallbacks for unrelated 400 errors, masking the real problem. Consider also checking for the Scaleway-specific message text (copy source is larger).
    - The comment on line 243 (-- Production mode: CopyObject batch, fall back to multipart on EntityTooLarge.) was not updated to reflect the new InvalidRequest fallback.

    Review by Claude Code

Use message substring 'copy source is larger' instead of the generic
error code InvalidRequest, to avoid triggering multipart fallback for
unrelated 400 errors.  Update production-mode comment to mention both
AWS S3 (EntityTooLarge) and Scaleway error signatures.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@claude

claude Bot commented Aug 6, 2026

Copy link
Copy Markdown

Nit: the comment at lua/copy_build.lua:74-75 still reads EntityTooLarge (file > 5 GB on Scaleway), implying Scaleway returns EntityTooLarge. Since this PR exists because Scaleway returns InvalidRequest instead, consider updating it to match the new comments at lines 190-191 and 243-244.
- e.g. Used as a fallback when CopyObject returns EntityTooLarge (AWS S3) or InvalidRequest (Scaleway) for files > 5 GB

Review by Claude Code

@matthiasL-scality
matthiasL-scality merged commit edf1aa7 into main Aug 6, 2026
5 checks passed
@matthiasL-scality
matthiasL-scality deleted the fix/scaleway-invalidrequest-large-copy branch August 6, 2026 14:10
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