fix(objectstore): Fix proxy in siloed mode#106172
Merged
Conversation
lcian
commented
Jan 14, 2026
Comment on lines
+134
to
+137
| def tearDown(self) -> None: | ||
| for conn in connections.all(): | ||
| conn.close() | ||
| super().tearDown() |
Member
Author
There was a problem hiding this comment.
Adding this because I was getting
E psycopg2.errors.ObjectInUse: database "test_test_test_test_test_test_region" is being accessed by other users
E DETAIL: There are 2 other sessions using the database.
in a previous CI run.
It feels that this is just putting a bandaid and not addressing the actual issue, but I'm also not familiar enough with our testing setup to understand what would be the proper fix.
Member
There was a problem hiding this comment.
This is likely being caused by the the live_server that runs in a thread.
markstory
reviewed
Jan 14, 2026
Comment on lines
+134
to
+137
| def tearDown(self) -> None: | ||
| for conn in connections.all(): | ||
| conn.close() | ||
| super().tearDown() |
Member
There was a problem hiding this comment.
This is likely being caused by the the live_server that runs in a thread.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes an issue where PUT and POST requests to the Objectstore proxy endpoint would send requests with an empty request body to the actual Objectstore service.
The issue was due to the usage of
_body_with_lengthinsrc/sentry/hybridcloud/apigateway/proxy.py, which doesn't work for our endpoint.I would love to understand the full reason behind that, but admittedly I don't, this was more of a trial and error process, where this solution appears to work, at least locally.
With this PR, we add a special case to the hybrid cloud proxy to use the same logic to stream the request body as we use in the Objectstore endpoint itself when the request would hit that endpoint.
That logic has been refactored into a function and slightly adapted to handle all cases.
This PR also adds a test that verifies that the endpoint works in control + region mode.
In addition, I've also tested this locally running both silos with granian and it works.