Storage: FakeStorageRpc states it supports generations, but generationMatch option unsupported on Blob creation. #775
Labels
api: storage
Issues related to the googleapis/java-storage-nio API.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Environment details
General, Core, and Other are also allowed as types
Steps to reproduce
Storage
usingLocalStorageHelper
.create
withBlobInfo
andBlobTargetOption.generationMatch
.Code example
Stack trace
External references such as API reference guides
https://github.com/googleapis/java-storage-nio/blob/main/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/testing/FakeStorageRpc.java
Any additional information below
FakeStorageRpc
appears to handle generations for some operations using thecheckGeneration
private method. For Blobcreate
however, it just callspotentiallyThrow
. It seems like it should be a relatively simple change to check the generation if the appropriate option is set, with two wrinkles:throwIfOption
? Should it still throw for any option, or just unsupported ones?checkGeneration
uses 404, but that's likely not correct forcreate
. Does the real Cloud Storage implementation return 412 - Precondition failed in this case?The text was updated successfully, but these errors were encountered: