feat(clients/gateway): Add content compression to gateway POSTs#3505
feat(clients/gateway): Add content compression to gateway POSTs#3505
Conversation
There was a problem hiding this comment.
Pull request overview
Adds gzip request-body compression for Gateway client POST requests, updating the in-file test server helper to accept gzipped payloads.
Changes:
- Gzip-compress JSON payloads in
Client.doPostand setContent-Encoding: gzip. - Update
newTestServerto transparently decompress gzipped request bodies before validating/reading them.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rodrodros
left a comment
There was a problem hiding this comment.
Where are the tests asserting this new behaviour?
1845eb9 to
7becd38
Compare
|
@rodrodros I think I've addressed all the issues. Regarding the tests, the existing gateway test implicitly covers the < 1KB payload case, so I decided not to add an additional test for that case. I've chosen a 1KB size threshold because it seems like a sane default (based on my research). |
|
@rodrodros Addressed your feedback. Will move the gateway test server into a separate file in the follow-up PR. Note: RPC test failures are from main. |
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (58.06%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #3505 +/- ##
==========================================
+ Coverage 75.44% 75.46% +0.01%
==========================================
Files 385 384 -1
Lines 34983 34940 -43
==========================================
- Hits 26394 26368 -26
+ Misses 6745 6705 -40
- Partials 1844 1867 +23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
* feat(gateway): Add content compression to gateway POSTs * feat: gzip-compress payloads > 1KB * refactor: extract gzip code into a function * refactor(clients): some minor improvmenets --------- Co-authored-by: Rodrigo <rodrodpino@gmail.com>
* feat(gateway): Add content compression to gateway POSTs * feat: gzip-compress payloads > 1KB * refactor: extract gzip code into a function * refactor(clients): some minor improvmenets --------- Co-authored-by: Rodrigo <rodrodpino@gmail.com>
No description provided.