Skip to content

Conversation

@Anemy
Copy link
Member

@Anemy Anemy commented May 9, 2025

We're hitting the 10mb limit for the bundle:

/**
* Atlas Cloud uses in-flight compression that doesn't compress anything that is
* bigger than 10MB, we want to make sure that compass-web assets stay under the
* limit so that they are compressed when served
*/
const MAX_COMPRESSION_FILE_SIZE = 10_000_000;

These changes bring the size back down a bit. npm run analyze in the compass-web package for webpack analysis.

Related slack thread https://mongodb.slack.com/archives/G2L10JAV7/p1746808113154329

@Anemy Anemy added the no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) label May 9, 2025
Copy link
Collaborator

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

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

LGTM as is, suggestion about the export

@Anemy
Copy link
Member Author

Anemy commented May 14, 2025

I need to look into the test that's failing. Might be that our testing is using connection strings that use this. I'm thinking we might want to more explicitly throw here when the polyfill is used with a message indicating it's not supported and why.


it('can connect to an Atlas replicaset without srv', async function () {
if (!hasAtlasEnvironmentVariables()) {
if (!hasAtlasEnvironmentVariables() || TEST_COMPASS_WEB) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please don't skip those, most of our web tests will use the user-pass based auth, let's rather exclude sasl prep only for published bundle, and not for one that will be compiled for tests

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call. Updated the webpack to only run on production with the comment.

@Anemy Anemy merged commit 6027f6a into main May 19, 2025
30 of 55 checks passed
@Anemy Anemy deleted the add-saslprep-no-op-alias-for-webpack-bundle-web branch May 19, 2025 21:27
@Anemy
Copy link
Member Author

Anemy commented May 19, 2025

Merged to unblock compass-web package bundling size restriction so we can release new versions of that. @gribnoysup if the changes don't make sense feel free to revert, or I can make a follow up pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants