-
Notifications
You must be signed in to change notification settings - Fork 138
Revert gzip compression of URL Metric data #1929
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
Revert gzip compression of URL Metric data #1929
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release/2025-03-17 #1929 +/- ##
======================================================
- Coverage 71.39% 71.20% -0.19%
======================================================
Files 86 86
Lines 7043 6998 -45
======================================================
- Hits 5028 4983 -45
Misses 2015 2015
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
This test case should be removed.
Lines 395 to 412 in ddcd3ae
| 'invalid_decoded_json_body_content_length' => array( | |
| 'params' => array_merge( | |
| $valid_params, | |
| array( | |
| // Fill the JSON with more than 1MB of highly compressible data. | |
| 'elements' => array( | |
| array_merge( | |
| $valid_element, | |
| array( | |
| 'xpath' => sprintf( '/HTML/BODY/DIV[@id=\'%s\']/*[1][self::DIV]', str_repeat( 'A', MB_IN_BYTES ) ), | |
| ) | |
| ), | |
| ), | |
| ) | |
| ), | |
| 'expected_status' => 413, | |
| 'expected_code' => 'rest_content_too_large', | |
| ), |
Co-authored-by: b1ink0 <[email protected]>
felixarntz
left a comment
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.
Thanks @westonruter for catching that.
It's a bummer this needs to be reverted, but we can hopefully reinstate it soon. This is something we can maybe reconsider post-1.0.0, as I don't anticipate it changing the API in any significant way.
I personally agree with your point from the ticket that we should eventually reintroduce this, despite the negative impact on BFCache for users where URL metrics are collected.
Summary
Fixes #1928
This reverts #1905
Relevant technical choices
An alternative to this is #1924 which keeps the code to gzip-compression the URL Metric in the codebase, but just disables it by default. However, since I found that Safari and Firefox always fail to send a URL Metric at
pagehidewhen compression is involved, and Chrome also usually fails as well, it seems better to remove this code since it is not safe to use currently. Hopefully this revert can be reverted so we can benefit from gzip compression again!