gumroad icon indicating copy to clipboard operation
gumroad copied to clipboard

Replace S3 with MinIO in development environment

Open ershad opened this issue 2 months ago • 5 comments

Ref: #959

This will help run Gumroad locally and upload/download files without AWS S3 credentials.

ershad avatar Oct 21 '25 17:10 ershad

Update: will resume the work on this after getting the tests run without sensitive credentials.

ershad avatar Oct 27 '25 19:10 ershad

Merged tests without creds branch and updated this branch with them

slavingia avatar Nov 04 '25 12:11 slavingia

can i address the failing tests ?

mahmudsudo avatar Nov 06 '25 21:11 mahmudsudo

Def!

slavingia avatar Nov 07 '25 03:11 slavingia

Hi @ershad , I see multiple specs failing due to presigned_url not being present for minio mocked AWS S3 objects. Since there is minio_presigned_url method in SignedUrlHelper module, I am thinking whether this can be used like in below PR to fix most of these specs - https://github.com/antiwork/gumroad/pull/1966 ?

I am thinking around idea that we can use minio deterministic url for local development returned by stub and not recreate internal S3 mocks. wdyt?

Edit: Created another approach to use the same public_url as as presigned_url for local only as per PR - https://github.com/antiwork/gumroad/pull/1985 as the s3 double does not have that so we can mock that value to public url for local only specs.

VarunArora14 avatar Nov 09 '25 19:11 VarunArora14

Think I'm up to speed here now; basically

  • We already use MinIO in test, but a bunch of URL generation is actually wrong because we still assume we're using S3+CloudFront
  • Part of this PR is fixing the URL generation to work properly, and that breaks a bunch of specs which are testing CloudFront URL formats (possibly some other things too, I haven't looked through all the failures yet)

Will review the related PRs and start fixing remaining specs tomorrow

binary-koan avatar Dec 02 '25 20:12 binary-koan