-
Notifications
You must be signed in to change notification settings - Fork 65
apollo_http_server: add test for the max_request_body_size config #12371
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
base: main-v0.14.1-committer
Are you sure you want to change the base?
apollo_http_server: add test for the max_request_body_size config #12371
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
27b6c13 to
9709dea
Compare
|
@eitanm-starkware regarding the: RPC provider doesn't return an informative error when Code quote: reqwest::StatusCode::PAYLOAD_TOO_LARGE, |
9709dea to
6afd26c
Compare
4f57e64 to
2a03207
Compare
6afd26c to
89af9bd
Compare
b4b1fb3 to
57eaeb6
Compare
89af9bd to
5401e86
Compare
57eaeb6 to
8efb25f
Compare
2a88e73 to
a9eb32e
Compare
8efb25f to
3bac13d
Compare
TzahiTaub
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.
@TzahiTaub reviewed 4 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ArniStarkware).
crates/apollo_http_server/src/http_server_test.rs line 430 at r1 (raw file):
Previously, ArniStarkware (Arnon Hod) wrote…
@eitanm-starkware regarding the: RPC provider doesn't return an informative error when
sncast declarefails.
This is the error message that is returned by our HTTP server.
Some message like this should return at some size...
@eitanm-starkware Should this be wrapped in a starknet error as this is what RPC providers always expect? Currently is a standard http error
crates/apollo_http_server/src/http_server_test.rs line 385 at r3 (raw file):
mock_gateway_client.expect_add_tx().times(1).return_const(Ok(default_gateway_output())); } let http_client = HttpClientServerSetupBuilder::new(index)
Can we remove the index from the input?
Suggestion:
HttpClientServerSetupBuilder::new(unique_u16!())|
Previously, TzahiTaub (Tzahi) wrote…
It will be hard to implement and maintain a wrap of this error with a starknet error. |
|
Previously, TzahiTaub (Tzahi) wrote…
Your suggestion, as written, does not work. I tried it now. |
3bac13d to
dad5315
Compare
a9eb32e to
108c567
Compare
108c567 to
f091655
Compare

Note
Low Risk
Test-only changes plus a small test utility builder setter; no production logic changes, with low risk beyond potential test flakiness from size assumptions.
Overview
Adds a parameterized test ensuring the HTTP server enforces
static_config.max_request_body_sizefor both deprecated gateway and RPCadd_txendpoints, expecting200 OKfor allowed sizes and413 PAYLOAD_TOO_LARGEwhen exceeded.Extends
HttpClientServerSetupBuildertest utilities withwith_max_request_body_size()to easily override this config in tests.Written by Cursor Bugbot for commit f091655. This will update automatically on new commits. Configure here.