Skip to content

test(storage): send a full first chunk in the resume ownership test - #14026

Merged
ChiragAgg5k merged 1 commit into
mainfrom
fix/resume-ownership-chunk-size
Sep 30, 2026
Merged

ChiragAgg5k merged 1 commit into
mainfrom
fix/resume-ownership-chunk-size

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

testCreateFileResumeRequiresOwnership (from #14014) uploads a 12-byte first chunk of a 5MB+1 file. Local storage accepts that, but S3-backed storage rejects any non-final multipart part under 5MB, so on Cloud the owner's resume fails with 400 Your proposed upload is smaller than the minimum allowed object size before the ownership checks run (seen on appwrite-labs/cloud#6185).

The first chunk is now a full $chunkSize (5MB), like the other chunked upload tests. The ranges already derive from strlen($firstBody), so nothing else changes.

S3-backed storage, as on Cloud, rejects a non-final multipart part under 5MB, so the 12-byte first chunk failed there with 400 before the ownership checks ran.
@ghost

ghost commented Sep 30, 2026

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The new payload matches the existing chunk ranges and established chunked-upload test pattern; no defects were found.

Updates the resume-ownership E2E test to upload a full 5 MiB first chunk instead of a short string. This meets S3's minimum non-final multipart part size while preserving the existing ownership and permission assertions.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 1
File Change
tests/e2e/Services/Storage/StorageCustomClientTest.php Generate a full-sized first chunk for the resume-ownership test.

Reviewed de25c86 · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Tier S · Looks good to merge. Summary

@greptile-apps

greptile-apps Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low risk] Updates a test fixture for file upload resumption.

The PR appears safe to merge.

Summary

The test now sends a full 5 MB first chunk before checking who may resume the upload, so its non-final multipart part meets the cloud-storage minimum.

Reviews (1) · Last reviewed commit: "test(storage): send a full first chunk i..."

@github-actions

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → fix/resume-ownership-chunk-size (after).

Metric Before After Change
🚀 Requests/sec 198.41 205.78 ⚪ +3.7%
⏱️ Latency P50 86.11 ms 84.38 ms ⚪ -2%
⏱️ Latency P95 206.17 ms 196.63 ms ⚪ -4.6%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 84.38 196.63 12,768 205.78 -9.54
Account 160.21 296.64 672 11.13 -18.9
TablesDB 81.83 153.56 6,944 113.73 -0.9
Storage 78.16 174.92 3,360 57.05 -3.3
Functions 116.58 232.89 1,792 31.04 -54.64

Top API waits (after)

API request Max wait (ms)
tablesdb.rows.increment 450.97
account.name.update 445.82
account.prefs.update 417.24
functions.variables.update 358.81
functions.create 341.05

@ChiragAgg5k
ChiragAgg5k merged commit ad30bd2 into main Sep 30, 2026
52 checks passed
abnegate added a commit that referenced this pull request Oct 1, 2026
Main moved by 20 commits, which left the PR conflicting, so GitHub ran
no CI on f4351e9. The commits bring:
- the email-password session duration parameter (#14004);
- resolved-address reuse for outbound requests (#14028);
- VCS and build commands through Utopia\Command (#14022);
- the full first chunk in the resume ownership test (#14026). That is
  the same change as the branch's e24bef4, so it merged cleanly.

The one conflict was the import block of
src/Appwrite/Deployment/Deployments.php. The branch had added
ClientExceptionInterface and main had added Utopia\Command, so both
stay, in alphabetical order. Main changed neither the root
composer.json nor composer.lock, and none of its changes touch the
database 8 API.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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