amogh-jahagirdar commented on code in PR #8365:
URL: https://github.com/apache/iceberg/pull/8365#discussion_r1302127102
##########
aws/src/main/java/org/apache/iceberg/aws/s3/signer/S3V4RestSignerClient.java:
##########
@@ -328,6 +334,27 @@ public SdkHttpFullRequest sign(
return mutableRequest.build();
}
+ private String body(SdkHttpFullRequest request) {
+ if (shouldAddBody(request) && request.contentStreamProvider().isPresent())
{
+ try (InputStream is = request.contentStreamProvider().get().newStream())
{
+ return IoUtils.toUtf8String(is);
+ } catch (IOException e) {
+ throw new UncheckedIOException("Failed to set body for S3 sign
request", e);
Review Comment:
I think we do want to fail. The body is optional from an S3 signing spec
perspective, but it's required for DeleteObjectsRequest. This block will
currently be only reached for DeleteObjectsRequest, so we get the `IOException`
I think we want to fail fast to a user rather than get rejected on the server
side. Lmk your thoughts, cc: @danielcweeks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]