serverless-registry icon indicating copy to clipboard operation
serverless-registry copied to clipboard

registry: Fixes to allow layer uploads above 5GB

Open gabivlj opened this issue 1 year ago • 3 comments

As we need to copy a stream of the uploaded layer (random uuid) to a blobs/.../<digest> path, that might surpass the maximum size of a monolithic upload to R2 without using multipart uploads.

To circumvent this, we will calculate the digest from the uploaded path and compare. Then, we will create a reference in the original blobs/.../digest path pointing to the upload path.

Should fix #69

gabivlj avatar Nov 25 '24 17:11 gabivlj

tests fail due to some random vitest stuff that ive yet to figure out. However, behavior looks ok to me from manual testing. Will fix tests tomorrow

gabivlj avatar Nov 27 '24 00:11 gabivlj

This PR fix the 5GB size limit on my local tests ! Any update on this @gabivlj for merge soon ? Thank you !

Dramelac avatar Jan 16 '25 10:01 Dramelac

Pull Requests #100 and #101 should be merged in this PR first before merging to main branch.

PS: The vitest error cmme from the direct import of import sha256Wasm from "@taylorzane/hash-wasm/wasm/sha256.wasm": https://github.com/cloudflare/serverless-registry/blob/b7403912288a4361582b6600b99448ba133e912f/src/registry/r2.ts#L37 But i'm not sure how to fix it properly.

Dramelac avatar Apr 18 '25 12:04 Dramelac