GeezerVison is showing github.com — Inconsistent behavior between LocalStorageHelper and real google storage · Issue #4152 · googleapis/google-cloud-java
Inconsistent behavior between LocalStorageHelper and real google storage #4152Labels api: storageIssues related to the Cloud Storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. DescriptionThanks for stopping by to let us know something could be better!
Please include as much information as possible:
Environment details
- OS: Mac
- Java version: 8
- google-cloud-java version(s):
val googleStorageNew: ModuleID = "com.google.cloud" % "google-cloud-storage" % "1.53.0"
val googleStorageLocal: ModuleID = "com.google.cloud" % "google-cloud-nio" % "0.71.0-alpha" % "test"
Steps to reproduce
Code is in scala
val page = db.list(bucketName.value, BlobListOption.prefix(objectNamePrefix), BlobListOption.pageSize(1), BlobListOption.currentDirectory())
if db is LocalStorageHelper, page.iterateAll() only gives me one page of object; if db is com.google.cloud.storage.Storage, then page.iterateAll will indeed give me multiple pages as documented.
Stacktrace
Any relevant stacktrace here.
Code snippet
Any relevant code snippet to help reproduce the issue.
External references such as API reference guides used
Any additional information below
Following these steps will guarantee the quickest resolution possible.
Thanks! Activityadded type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2Moderately-important priority. Fix may not be included in next release. on Dec 4, 2018andrey-qlogic commented on Dec 11, 2018 @Qi77Qi Would you please add a code snippet with LocalStorageHelper class. Qi77Qi commented on Dec 13, 2018 Hi @andrewsg , I have a unit test looks like this
it should "retrieve multiple pages" in ioAssertion {
val bucketName = genGcsBucketName.sample.get
val prefix = Gen.uuid.sample.get.toString
val blobNameWithPrefix = Gen.listOfN(4, genGcsBlobName).sample.get.map(x => GcsBlobName(s"$prefix${x.value}"))
val objectBody = genGcsObjectBody.sample.get
for {
_ <- blobNameWithPrefix.parTraverse(obj => localStorage.storeObject(bucketName, obj, objectBody, objectType))
allObjectsWithPrefix <- localStorage.unsafeListObjectsWithPrefix(bucketName, prefix, 1)
} yield {
allObjectsWithPrefix.map(_.value) should contain theSameElementsAs (blobNameWithPrefix.map(_.value))
}
}
There might be too much scala details, but I hope conceptually this makes sense. here is link to github repo if it helps Qi77Qi commented on Jan 12, 2019 Hi @andrey-qlogic , thanks for fixing this. Do you know when the fix will be in a release?
MetadataMetadataapi: storageIssues related to the Cloud Storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. DevelopmentNo branches or pull requestsIssue actions
|