-
Notifications
You must be signed in to change notification settings - Fork 21
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
Bump demo site's size limit to 2GB from 250MB #805
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! The changes are clear and the feature works as expected.
I've tested it along with 170040-ghe-Automattic/wpcom and I was able to create a Demo site of 1.5GB 🥳. It took 17 mins to upload it.
I also tested trying to upload a bigger site and I got this alert:
So we are getting a generic alert that we catch from archiveSite IPC call.
The messages updated in this PR are displayed when we got the CORS response from Nginx.
export const DEMO_SITE_SIZE_LIMIT_GB = 2; | ||
export const DEMO_SITE_SIZE_LIMIT_BYTES = DEMO_SITE_SIZE_LIMIT_GB * 1024 * 1024 * 1024; // 2GB | ||
export const SYNC_PUSH_SIZE_LIMIT_GB = 2; | ||
export const SYNC_PUSH_SIZE_LIMIT_BYTES = SYNC_PUSH_SIZE_LIMIT_GB * 1024 * 1024 * 1024; // 2GB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the past, we separated the limits for Demo sites and Sync Push. Now that we’ve decided both should share the same limit, I considered if it would make sense to consolidate them into a single variable again. However, keeping two distinct variables seems cleaner and provides greater flexibility for future adjustments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree! Consolidating only makes sense if it's guaranteed to not diverge in future.
Should we explicitly check for the size and not rely on the Node limit, which is accidentally equal to the current limit we want to use for demo sites and sync? In other case, the validation would stop working as soon as we fix https://github.com/Automattic/dotcom-forge/issues/8689. |
@wojtekn Not sure I fully understand what's being discussed, but in https://github.com/Automattic/dotcom-forge/issues/9174 I proposed showing a user friendly message as opposed to the error itself & rely on our defined constants to error out as opposed to remote api call rejection/failure |
@wojtekn , Agreed. We are already checking the file size, but what happens is that Let's handle the custom alert and checking the file size on https://github.com/Automattic/dotcom-forge/issues/9174 so we can merge this PR. |
Deployed on wpcom, so merging this PR. |
Bump demo site's max size limit to 2GB from 250MB
Note: Requires 170040-ghe-Automattic/wpcom deployed first
Related issues
Proposed Changes
Testing Instructions
uploads
dir to inflate the backup sizedd if=/dev/urandom bs=1M count=1800 | zip -0 dummy.zip -
The site exceeds the maximum size of 250MB.
Pre-merge Checklist