Skip to content
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

fix: make Blob and Bucket update diff aware #1994

Merged
merged 3 commits into from
Apr 28, 2023
Merged

fix: make Blob and Bucket update diff aware #1994

merged 3 commits into from
Apr 28, 2023

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
Collaborator

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
19 checks passed
@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.

None yet

2 participants