-
-
Notifications
You must be signed in to change notification settings - Fork 4
feat(server): Implement batch endpoint #250
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: lcian/feat/batching-server
Are you sure you want to change the base?
Conversation
| } | ||
|
|
||
| #[cfg(test)] | ||
| mod tests { |
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.
Sloppy test generated by Claude.
We will replace this with e2e tests using the clients after we have client implementations of batching.
| let mut headers = metadata.to_headers("", false).unwrap(); | ||
| headers.insert( | ||
| HEADER_BATCH_OPERATION_STATUS, | ||
| HeaderValue::from_static("200"), |
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.
This is not implemented properly.
We should proceed with https://linear.app/getsentry/issue/FS-220/improve-error-handling.
Afterwards, we can implement this and IntoResponse properly based on the error.
| @@ -0,0 +1,134 @@ | |||
| //! Utilities to represent and serialize multipart parts. | |||
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.
The serialization has been adapted from https://crates.io/crates/multipart-stream
We might be able to get away with axum's MultipartForm instead.
Provides a simple implementation for the batch endpoint that simply loops through the requests in batch and executes them sequentially.
This is already an improvement over having to issue multiple single-object requests, and prepares us to work on the client-side implementation of batching.
The endpoint can be changed later to issue requests in batches to the underling
StorageServiceto make this even more efficient.