Skip to content

Conversation

@ShreyasSinha
Copy link

  1. Adding model classes for Abort request and response.
  2. Implementing Abort for Multipart Upload.
    Refer: Support XML MPU in GCS Java SDK #3348

@product-auto-label product-auto-label bot added size: l Pull request size is large. api: storage Issues related to the googleapis/java-storage API. labels Oct 22, 2025
@ShreyasSinha ShreyasSinha marked this pull request as ready for review October 23, 2025 17:42
@ShreyasSinha ShreyasSinha requested a review from a team as a code owner October 23, 2025 17:42
*/
@BetaApi
public abstract AbortMultipartUploadResponse abortMultipartUpload(
AbortMultipartUploadRequest request) throws IOException, NoSuchAlgorithmException;
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should never throw a NoSuchAlgorithmException. What necessitates this being declared here?

}

/** A builder for creating {@link AbortMultipartUploadRequest} instances. */
public static class Builder {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
public static class Builder {
@BetaApi
public static final class Builder {

Map<String, String> extensionHeaders = getGenericExtensionHeader(options);

HttpRequest httpRequest = requestFactory.buildDeleteRequest(new GenericUrl(abortUri));
httpRequest.getHeaders().setContentType(contentType);
Copy link
Collaborator

Choose a reason for hiding this comment

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

DELETEs don't have bodies, do we need to set the content-type for GCS? If not, please remove.

throws IOException, NoSuchAlgorithmException {

return retrier.run(
Retrying.alwaysRetry(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as list, this should be options.getRetryAlgorithmManager().idempotent()

+ " <Part>\n"
+ " <PartNumber>1</PartNumber>\n"
+ " <ETag>\"etag\"</ETag>\n"
+ " <ETag>etag</ETag>\n"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can these two changes be moved back to the list PR since they're related to that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the googleapis/java-storage API. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants