Skip to content

apollo_infra: add request max size tests#13559

Merged
Itay-Tsabary-Starkware merged 1 commit into
mainfrom
03-29-apollo_infra_add_request_max_size_tests
Apr 12, 2026
Merged

apollo_infra: add request max size tests#13559
Itay-Tsabary-Starkware merged 1 commit into
mainfrom
03-29-apollo_infra_add_request_max_size_tests

Conversation

@Itay-Tsabary-Starkware
Copy link
Copy Markdown
Contributor

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware commented Mar 29, 2026

Note

Medium Risk
Changes the serialized ServerError returned for oversized requests, which can break clients/tests that pattern-match on the previous RequestDeserializationFailure variant. Otherwise the change is localized (HTTP size limit path + new tests) and low complexity.

Overview
Remote server now returns a distinct ServerError::RequestBodyTooLarge when an incoming HTTP request exceeds max_request_body_bytes, logging it at warn and responding with 413 Payload Too Large.

Adds max_request_size_test to validate the 413/RequestBodyTooLarge behavior and that the remote client surfaces ClientError::ResponseParsingFailure when a response exceeds max_response_body_bytes; also centralizes FAST_FAILING_CLIENT_CONFIG into tests::test_utils for reuse.

Reviewed by Cursor Bugbot for commit f071271. Bugbot is set up for automated code reviews on this repo. Configure here.

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

Copy link
Copy Markdown
Contributor Author

Itay-Tsabary-Starkware commented Mar 29, 2026

@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Mar 29, 2026

Merge activity

  • Mar 29, 4:28 PM UTC: This pull request can not be added to the Graphite merge queue. Please try rebasing and resubmitting to merge when ready.
  • Mar 29, 4:28 PM UTC: Graphite disabled "merge when ready" on this PR due to: a merge conflict with the target branch; resolve the conflict and try again..
  • Apr 12, 10:20 AM UTC: This pull request can not be added to the Graphite merge queue. Please try rebasing and resubmitting to merge when ready.
  • Apr 12, 10:20 AM UTC: Graphite disabled "merge when ready" on this PR due to: a merge conflict with the target branch; resolve the conflict and try again..

@github-actions
Copy link
Copy Markdown

Artifacts upload workflows:

@graphite-app graphite-app Bot changed the base branch from 04-09-apollo_infra_add_keepalive_time_greater_than_1_validation to main April 12, 2026 09:39
@Itay-Tsabary-Starkware Itay-Tsabary-Starkware force-pushed the 03-29-apollo_infra_add_request_max_size_tests branch from c1e5146 to f071271 Compare April 12, 2026 09:43
@Itay-Tsabary-Starkware Itay-Tsabary-Starkware force-pushed the 03-29-apollo_infra_add_request_max_size_tests branch from f071271 to fbb1c23 Compare April 12, 2026 11:52
@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 12, 2026

PR Summary

Medium Risk
Medium risk because it changes the server’s on-the-wire error variant for oversized request bodies (now ServerError::RequestBodyTooLarge with 413), which could affect clients that pattern-match on ServerError values. The rest is additive test coverage and small test refactoring.

Overview
Adds explicit handling for oversized HTTP request bodies in the remote component server: the Limited-body collection failure now returns 413 Payload Too Large with a new ServerError::RequestBodyTooLarge variant (and logs at warn), instead of reusing RequestDeserializationFailure.

Introduces max_request_size_test to assert server-side request rejection at max_request_body_bytes and client-side failure when a response exceeds max_response_body_bytes, and refactors test config by moving FAST_FAILING_CLIENT_CONFIG into shared test_utils.

Reviewed by Cursor Bugbot for commit fbb1c23. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown
Collaborator

@matanl-starkware matanl-starkware left a comment

Choose a reason for hiding this comment

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

@matanl-starkware reviewed 6 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on Itay-Tsabary-Starkware).

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware added this pull request to the merge queue Apr 12, 2026
Merged via the queue into main with commit e99a190 Apr 12, 2026
18 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants