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: update grpc single-shot uploads to validate ack'd object size #2567

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

BenWhitehead
Copy link
Collaborator

Follow up to #2527

This updated errors from grpc single-shot uploads to have messages that include useful debugging information.

When a response is received but doesn't validate with the expected state:

com.google.cloud.storage.StorageException: Finalized upload, but object size less than expected.
	|> [
	|> 	com.google.storage.v2.WriteObjectRequest{
	|> 		write_offset: 524288
	|> 		finish_write: true
	|> 	}
	|> ]
	|
	|< com.google.storage.v2.WriteObjectResponse{
	|< 	resource {
	|< 	  name: "obj"
	|< 	  size: 262144
	|< 	}
	|< }
	|

@BenWhitehead BenWhitehead added the owlbot:ignore instruct owl-bot to ignore a PR label May 28, 2024
@BenWhitehead BenWhitehead requested a review from a team as a code owner May 28, 2024 20:48
@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 May 28, 2024
@BenWhitehead BenWhitehead force-pushed the fix/grpc-single-shot-validation branch from bffb2ad to 35f3621 Compare May 28, 2024 21:46
Follow up to #2527

This updated errors from grpc single-shot uploads to have messages that include useful debugging information.

When a response is received but doesn't validate with the expected state:
```
com.google.cloud.storage.StorageException: Finalized upload, but object size less than expected.
	|> [
	|> 	com.google.storage.v2.WriteObjectRequest{
	|> 		write_offset: 524288
	|> 		finish_write: true
	|> 	}
	|> ]
	|
	|< com.google.storage.v2.WriteObjectResponse{
	|< 	resource {
	|< 	  name: "obj"
	|< 	  size: 262144
	|< 	}
	|< }
	|
```
@BenWhitehead BenWhitehead force-pushed the fix/grpc-single-shot-validation branch from 35f3621 to 0095f8b Compare May 28, 2024 22:09
@BenWhitehead BenWhitehead merged commit 65c8808 into main Jun 11, 2024
21 of 22 checks passed
@BenWhitehead BenWhitehead deleted the fix/grpc-single-shot-validation branch June 11, 2024 20:30
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