Skip to content

Clean up space limit constants and increase it to 250 MB - #446

Merged
wojtekn merged 3 commits into
trunkfrom
update/demo-site-limit-to-250-mb
Aug 13, 2024
Merged

Clean up space limit constants and increase it to 250 MB#446
wojtekn merged 3 commits into
trunkfrom
update/demo-site-limit-to-250-mb

Conversation

@wojtekn

@wojtekn wojtekn commented Aug 8, 2024

Copy link
Copy Markdown
Contributor

Related to https://github.com/Automattic/dotcom-forge/issues/8515

Proposed Changes

I propose increasing the demo size limit to 250 MB and cleaning up constants to avoid calculating values twice.

Testing Instructions

Happy path

  1. Create a site in Studio
  2. Upload 100-150MB of media to the site
  3. Add a demo site
  4. Confirm that demo site is created successfully

Error

  1. Create a site in Studio
  2. Upload >250MB of media to the site
  3. Add a demo site
  4. Confirm error message shows that limit of 250 MB was exceeded

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@wojtekn
wojtekn requested a review from a team August 8, 2024 12:58
@wojtekn wojtekn self-assigned this Aug 8, 2024

@kozer kozer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested it and works as expected! Nice work Wojtek!
image

@sejas sejas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good! Thanks for increasing the snapshots size. I confirm the alert appears when the wp-content zip file is bigger than 250MB and it works if its smaller.

I've added a suggestion about removing Math.floor.

TeMPT1.mp4
Comment thread src/hooks/use-archive-site.ts Outdated
'The site exceeds the maximum size of %dMB. Please remove some files and try again.'
),
Math.floor( LIMIT_ARCHIVE_SIZE / 1024 / 1024 )
Math.floor( SIZE_LIMIT_MB )

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we remove the Math.floor ?

Suggested change
Math.floor( SIZE_LIMIT_MB )
SIZE_LIMIT_MB

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done: daa9183

@wojtekn
wojtekn merged commit 18f0ea7 into trunk Aug 13, 2024
@wojtekn
wojtekn deleted the update/demo-site-limit-to-250-mb branch August 13, 2024 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants