Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Aug 13, 2024

Conversation

wojtekn
Copy link
Contributor

@wojtekn wojtekn commented Aug 8, 2024

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
Copy link
Contributor

@kozer kozer left a comment

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

Copy link
Member

@sejas sejas left a comment

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

@@ -84,7 +84,7 @@ export function useArchiveSite() {
__(
'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
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
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
10 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants