Skip to content

Conversation

@Dhriti07
Copy link
Contributor

@Dhriti07 Dhriti07 commented Nov 12, 2025

Adding model classes for ListMultipartUpload request and response.
Implementing ListMultipartUpload API.

@Dhriti07 Dhriti07 requested a review from a team as a code owner November 12, 2025 06:17
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. api: storage Issues related to the googleapis/java-storage API. labels Nov 12, 2025
@Dhriti07 Dhriti07 force-pushed the list-multipart-upload branch from 9de7d8a to f6b31d3 Compare November 12, 2025 06:23
@Dhriti07 Dhriti07 changed the title feat: List multipart upload feat: add preview MultipartUploadClient#listMultipartUploads Nov 12, 2025
*
* @param request The request object containing the details for listing the multipart uploads.
* @return A {@link ListMultipartUploadsResponse} object containing the list of multipart uploads.
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Update this to 2.61


private final String eTag;
private final String md5;
private final String crc32c;
Copy link
Contributor

Choose a reason for hiding this comment

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

merge main here so that these changes are removed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like they are part of this PR only, please move to a seprate PR with appropriate commit message and test cases.

import java.util.stream.Collectors;

/** A utility class to parse {@link HttpResponse} and create a {@link UploadPartResponse}. */
/** A utility class to parse checksums from an {@link HttpResponse}. */
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this needed for listing the in progress uploads? If not, can this fix be moved to it's own PR?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, Those changes are moved to another PR and reverted from this PR.

@Dhriti07 Dhriti07 force-pushed the list-multipart-upload branch from 94a7989 to bda8df6 Compare November 14, 2025 04:53
@Dhriti07 Dhriti07 force-pushed the list-multipart-upload branch from bda8df6 to 310754d Compare November 14, 2025 04:59
Comment on lines +113 to +115
public ListMultipartUploadsResponse listMultipartUploads(ListMultipartUploadsRequest request) {
throw new UnsupportedOperationException("This operation is not yet implemented.");
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

We are okay breaking this classes API, it's annotated @InternalExtensionOnly, and the constructor is package private preventing subclasses by anything outside our package.

To get clirr to not fail for this we should add an ignore rule to https://github.com/googleapis/java-storage/blob/main/google-cloud-storage/clirr-ignored-differences.xml

  <!-- MultipartUploadClient is @InternalExtensionOnly -->
  <difference>
    <!-- allow new method to be added at any time -->
    <differenceType>7013</differenceType>
    <className>com/google/cloud/storage/MultipartUploadClient</className>
    <method>* *(*)</method>
  </difference>

And keep this method abstract

Suggested change
public ListMultipartUploadsResponse listMultipartUploads(ListMultipartUploadsRequest request) {
throw new UnsupportedOperationException("This operation is not yet implemented.");
}
public abstract ListMultipartUploadsResponse listMultipartUploads(
ListMultipartUploadsRequest request);

private static String formatName(String name) {
// Only lowercase letters, digits, and "-" are allowed
return name.toLowerCase().replaceAll("[^\\w\\d\\-]", "-");
return name.toLowerCase().replaceAll("[^\\w-]", "-");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did we need to remove \d from this group?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, the comment wasn't updated when the regex was and is now inaccurate.

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: xl Pull request size is extra large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants