Skip to content

CLDSRV-909: Reject CopyObject when source exceeds 5 GiB#6177

Merged
bert-e merged 3 commits into
development/9.4from
bugfix/CLDSRV-909-enforce-copyobject-source-size-limit
Jun 17, 2026
Merged

CLDSRV-909: Reject CopyObject when source exceeds 5 GiB#6177
bert-e merged 3 commits into
development/9.4from
bugfix/CLDSRV-909-enforce-copyobject-source-size-limit

Conversation

@tcarmet

@tcarmet tcarmet commented May 28, 2026

Copy link
Copy Markdown
Contributor

Align cloudserver's CopyObject with the AWS S3 contract by rejecting requests whose source object exceeds 5 GiB. AWS S3 returns HTTP 400 InvalidRequest ("The specified copy source is larger than the maximum allowable size for a copy source: 5368709120") and expects clients to use the multipart copy flow instead; cloudserver currently accepts these requests, leaving a gap with the published contract.

Targeting development/9.4 because changing a previously-accepted response is a behavior break for clients that relied on cloudserver's permissive behavior, happy to retarget development/9.3 if we prefer wider rollout.

Last commit contains a prettier fmt command and is kept separate from the actual code change for review. We should not focus on it as most of it is existing change.

@bert-e

bert-e commented May 28, 2026

Copy link
Copy Markdown
Contributor

Hello tcarmet,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request TBA
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e

bert-e commented May 28, 2026

Copy link
Copy Markdown
Contributor

Incorrect fix version

The Fix Version/s in issue CLDSRV-909 contains:

  • None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 9.4.0

Please check the Fix Version/s of CLDSRV-909, or the target
branch of this pull request.

@claude

claude Bot commented May 28, 2026

Copy link
Copy Markdown

LGTM

Review by Claude Code

@codecov

codecov Bot commented May 28, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
9409 1 9408 0
View the full list of 1 ❄️ flaky test(s)
"after each" hook for "should fail if trying to overwrite a delete marker"::MPU with x-scal-s3-version-id header With v4 signature "after each" hook for "should fail if trying to overwrite a delete marker"

Flake rate in main: 100.00% (Passed 0 times, Failed 41 times)

Stack Traces | 0.015s run time
We encountered an internal error. Please try again.

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@tcarmet tcarmet force-pushed the bugfix/CLDSRV-909-enforce-copyobject-source-size-limit branch from 0094687 to be2daf0 Compare May 28, 2026 00:53
@claude

claude Bot commented May 28, 2026

Copy link
Copy Markdown

LGTM

Review by Claude Code

Comment thread lib/api/objectCopy.js Outdated
Comment thread tests/unit/api/objectCopy.js
@claude

claude Bot commented Jun 1, 2026

Copy link
Copy Markdown
  • config.bypassMaxPutObjectSize leaks if the bypass test fails — reset it in the after block (tests/unit/api/objectCopy.js:660)

Review by Claude Code

Comment thread tests/unit/api/objectCopy.js
@claude

claude Bot commented Jun 1, 2026

Copy link
Copy Markdown
  • config.bypassMaxPutObjectSize cleanup in the bypass test is inside the callback — if the assertion throws, the flag leaks. Move the reset into the after() block.
    • See inline comment on tests/unit/api/objectCopy.js:790

Review by Claude Code

Comment thread lib/api/objectCopy.js Fixed
Comment thread lib/api/objectCopy.js Fixed
Comment thread lib/api/objectCopy.js Fixed
Comment thread lib/api/objectCopy.js Fixed
Comment thread lib/api/objectCopy.js Fixed
Comment thread lib/api/objectCopy.js Fixed
Comment thread lib/api/objectCopy.js Fixed
@tcarmet tcarmet force-pushed the bugfix/CLDSRV-909-enforce-copyobject-source-size-limit branch from 35eb632 to 213648e Compare June 1, 2026 22:45
Comment thread tests/unit/api/objectCopy.js
@claude

claude Bot commented Jun 1, 2026

Copy link
Copy Markdown
  • config.bypassMaxPutObjectSize is not restored in the after() block of the 'objectCopy source size limit' test suite — if the test callback doesn't run (timeout, sync throw), the flag leaks to subsequent suites.
    - Add config.bypassMaxPutObjectSize = false; to the after() block.

    Review by Claude Code

@tcarmet tcarmet force-pushed the bugfix/CLDSRV-909-enforce-copyobject-source-size-limit branch from 213648e to f34ae66 Compare June 1, 2026 22:56
@claude

claude Bot commented Jun 1, 2026

Copy link
Copy Markdown

LGTM

Review by Claude Code

@tcarmet tcarmet marked this pull request as ready for review June 4, 2026 21:43
@tcarmet tcarmet requested a review from a team June 4, 2026 21:43
Comment thread lib/api/objectCopy.js Outdated
@tcarmet tcarmet force-pushed the bugfix/CLDSRV-909-enforce-copyobject-source-size-limit branch from f34ae66 to 636984c Compare June 5, 2026 19:35
@claude

claude Bot commented Jun 5, 2026

Copy link
Copy Markdown

LGTM

Review by Claude Code

@tcarmet tcarmet force-pushed the bugfix/CLDSRV-909-enforce-copyobject-source-size-limit branch from 636984c to c8e63e7 Compare June 17, 2026 21:13
Comment thread tests/unit/api/objectCopy.js
@claude

claude Bot commented Jun 17, 2026

Copy link
Copy Markdown
  • tests/unit/api/objectCopy.js:1908 — uses err.is.InvalidRequest instead of err.message for the error assertion; prefer assert.strictEqual(err.message, 'InvalidRequest') so failures show the actual error name

    Review by Claude Code

@tcarmet

tcarmet commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

/approve

@bert-e

bert-e commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/9.4

The following branches have NOT changed:

  • development/7.10
  • development/7.4
  • development/7.70
  • development/8.8
  • development/9.0
  • development/9.1
  • development/9.2
  • development/9.3

This pull request did not target the following hotfix branch(es) so they
were left untouched:

  • hotfix/7.10.15
  • hotfix/7.70.73
  • hotfix/7.4.5
  • hotfix/7.10.0
  • hotfix/6.4.7
  • hotfix/7.10.30
  • hotfix/7.10.49
  • hotfix/7.4.4
  • hotfix/7.6.0
  • hotfix/7.70.51
  • hotfix/7.4.1
  • hotfix/7.10.28
  • hotfix/7.9.0
  • hotfix/7.4.9
  • hotfix/7.4.0
  • hotfix/7.4.8
  • hotfix/7.7.0
  • hotfix/7.70.45
  • hotfix/7.4.7
  • hotfix/9.0.32
  • hotfix/7.70.11
  • hotfix/7.10.1
  • hotfix/7.2.0
  • hotfix/7.8.0
  • hotfix/7.70.21
  • hotfix/7.10.8
  • hotfix/7.10.3
  • hotfix/7.4.6
  • hotfix/7.4.3
  • hotfix/7.10.27
  • hotfix/8.8.45
  • hotfix/7.10.4
  • hotfix/7.4.10
  • hotfix/9.2.24
  • hotfix/7.10.2
  • hotfix/7.4.2
  • hotfix/9.0.7

Please check the status of the associated issue CLDSRV-909.

Goodbye tcarmet.

The following options are set: approve

@bert-e bert-e merged commit c8e63e7 into development/9.4 Jun 17, 2026
72 of 75 checks passed
@bert-e bert-e deleted the bugfix/CLDSRV-909-enforce-copyobject-source-size-limit branch June 17, 2026 23:47
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.

6 participants