Skip to content

feat(clients/gateway): Add content compression to gateway POSTs#3505

Merged
rodrodros merged 4 commits intomainfrom
feat/gzip-gateway-posts
Mar 26, 2026
Merged

feat(clients/gateway): Add content compression to gateway POSTs#3505
rodrodros merged 4 commits intomainfrom
feat/gzip-gateway-posts

Conversation

@brbrr
Copy link
Copy Markdown
Contributor

@brbrr brbrr commented Mar 24, 2026

No description provided.

@brbrr brbrr self-assigned this Mar 24, 2026
Copilot AI review requested due to automatic review settings March 24, 2026 10:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.doPost and set Content-Encoding: gzip.
  • Update newTestServer to transparently decompress gzipped request bodies before validating/reading them.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@rodrodros rodrodros left a comment

Choose a reason for hiding this comment

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

Where are the tests asserting this new behaviour?

@rodrodros rodrodros changed the title feat(gateway): Add content compression to gateway POSTs feat(clients/gateway): Add content compression to gateway POSTs Mar 24, 2026
@brbrr brbrr force-pushed the feat/gzip-gateway-posts branch from 1845eb9 to 7becd38 Compare March 24, 2026 18:07
@brbrr brbrr requested a review from rodrodros March 24, 2026 18:08
@brbrr
Copy link
Copy Markdown
Contributor Author

brbrr commented Mar 24, 2026

@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).

@brbrr
Copy link
Copy Markdown
Contributor Author

brbrr commented Mar 25, 2026

@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
Copy link
Copy Markdown

codecov bot commented Mar 25, 2026

Codecov Report

❌ Patch coverage is 58.06452% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.46%. Comparing base (0e84cab) to head (4118679).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
clients/gateway/gateway.go 58.06% 6 Missing and 7 partials ⚠️

❌ 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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rodrodros rodrodros enabled auto-merge (squash) March 26, 2026 10:07
@rodrodros rodrodros disabled auto-merge March 26, 2026 10:30
@rodrodros rodrodros merged commit ba3d21e into main Mar 26, 2026
20 of 22 checks passed
@rodrodros rodrodros deleted the feat/gzip-gateway-posts branch March 26, 2026 10:31
brbrr added a commit that referenced this pull request Mar 26, 2026
* 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>
brbrr added a commit that referenced this pull request Mar 26, 2026
* 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>
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.

3 participants