KEMBAR78
fix: make Blob and Bucket update diff aware by BenWhitehead · Pull Request #1994 · googleapis/java-storage · GitHub
Skip to content

Conversation

@BenWhitehead
Copy link
Collaborator

If a Blob or Bucket update does not actually contain a diff, instead of sending the empty update refresh the metadata.

Add integration tests to verify behavior of updating object or bucket with no modification

If a blob or bucket update does not actually contain a diff, instead of sending the empty update refresh the metadata.

Add integration tests to verify behavior of updating object or bucket with no modification
@BenWhitehead BenWhitehead added the owlbot:ignore instruct owl-bot to ignore a PR label Apr 24, 2023
@BenWhitehead BenWhitehead requested a review from a team as a code owner April 24, 2023 18:27
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: storage Issues related to the googleapis/java-storage API. labels Apr 24, 2023
@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Apr 26, 2023
Opts<ObjectTargetOpt> opts = Opts.unwrap(options).resolveFrom(blobInfo).prepend(defaultOpts);
Opts<ObjectTargetOpt> unwrap = Opts.unwrap(options);
if (blobInfo.getModifiedFields().isEmpty()) {
return internalBlobGet(blobInfo.getBlobId(), unwrap.constrainTo(ObjectSourceOpt.class));
Copy link
Contributor

Choose a reason for hiding this comment

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

so the behavior here is if the fields are not being modified we just perform a get and return the unmodified blob?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Correct, while attempting to use those provided options that also can apply to Get

@BenWhitehead BenWhitehead merged commit 0adeb14 into main Apr 28, 2023
@BenWhitehead BenWhitehead deleted the empty-update branch April 28, 2023 20:57
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. owlbot:ignore instruct owl-bot to ignore a PR size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants