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

GZIP resources before uploading #1566

Merged
merged 12 commits into from
Apr 2, 2024
Merged

GZIP resources before uploading #1566

merged 12 commits into from
Apr 2, 2024

Conversation

pankaj443
Copy link
Contributor

@pankaj443 pankaj443 commented Apr 2, 2024

JIRA: https://browserstack.atlassian.net/browse/PER-3058
Now we are gziping resources before uploading if PERCY_GZIP env var is set. This is useful in cases where dom resources are greater than 25mb and large payload error is received.

@pankaj443 pankaj443 requested a review from a team as a code owner April 2, 2024 06:15
@@ -589,6 +590,27 @@ describe('PercyClient', () => {
}
});
});

it('can upload a resource from a local path in GZIP format', async () => {
process.env.PERCY_GZIP = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be moved to before and after block so that it can be cleared after current test.

@@ -57,6 +59,50 @@ describe('Discovery', () => {
await server.close();
});

it('gathers resources for a snapshot in GZIP format', async () => {
process.env.PERCY_GZIP = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

@pankaj443 pankaj443 merged commit 55b5184 into master Apr 2, 2024
36 checks passed
@pankaj443 pankaj443 deleted the PER_9999_zip_res branch April 2, 2024 09:11
rishigupta1599 pushed a commit that referenced this pull request Apr 3, 2024
* gzip resources before uploading

* add env var

* Add tests for client.js

* Add test for discovery

* Use pako in test

* Use pako in test

* unset env var

* unset env var

* remove test

* Add test

* delete process.env.PERCY_GZIP before each it block
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.

2 participants