You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java.lang.IllegalArgumentException: Empty enum constants not allowed.
at com.google.cloud.StringEnumType.valueOf(StringEnumType.java:66)
at com.google.cloud.storage.StorageClass.valueOf(StorageClass.java:115)
at com.google.cloud.storage.Utils.ifNonNull(Utils.java:213)
at com.google.cloud.storage.JsonConversions.blobInfoDecode(JsonConversions.java:326)
at com.google.cloud.storage.Conversions$SimpleCodec.decode(Conversions.java:149)
at com.google.cloud.storage.StorageImpl.lambda$update$19(StorageImpl.java:591)
at com.google.cloud.storage.Retrying.run(Retrying.java:66)
at com.google.cloud.storage.StorageImpl.run(StorageImpl.java:1608)
at com.google.cloud.storage.StorageImpl.update(StorageImpl.java:587)
at com.google.cloud.storage.Blob.update(Blob.java:855)
. . .
The request used to generate the above error was around updating the metadata of an object.
Upon further inspection, it was observed that the new container was returning the following storage class attribute within the JSON response "storageClass": "",
I believe this change may be the cause.
Would anyone be able to check this out for me please?
If any more details are needed, please let me know.
Thank you.
Replication steps using curl
Run a new Docker container of the fake-gcs-server -> note down the port that the container is listening on: docker ps -a # Take 0.0.0.0:62237->4443/tcp
Export the port with: export GCS_PORT=62237
Create a file called bucket.json and add the following contents { "name": "test-bucket-env", "location": "US-EAST1" }
Create the bucket curl -v "localhost:$GCS_PORT/storage/v1/b?project=recreate&projection=full" -H "Content-Type: application/json" -X POST
Store an object curl -v "localhost:$GCS_PORT/upload/storage/v1/b/test-bucket-env/o?ifGenerationMatch=0&name=dev/repus/collection/entry-id/0/1&uploadType=resumable" -X POST
Note down the location header returned from above and run a PUT on it - example below curl -v localhost:$GCS_PORT/upload/storage/v1/b/test-bucket-env/o?uploadType=resumable&name=dev%2Frepus%2Fcollection%2Fentry-id%2F0%2F1&upload_id=7a9d76ad6c0219f6f8dcadbca889f9d4
Retrieve the object curl -v "localhost:$GCS_PORT/storage/v1/b/test-bucket-env/o/dev%2Frepus%2Fcollection%2Fentry-id%2F0%2F1?projection=full"
Note the generation in the response returned - example below 1736335690830320
Create a file called metadata.json and add the following { "metadata": { "tag-1": "true", "tag-2": "2024-01-29 11:53:04", "tag-3": "2024-01-17 11:53:12" } }
Update the metadata on the object - replace the ifGenerationMatch=1736335821147726 with the value noted down from above curl -v "localhost:62237/storage/v1/b/test-bucket-env/o/dev%2Frepus%2Fcollection%2Fentry-id%2F0%2F1?ifGenerationMatch=1736335821147726&projection=full" -X POST --data-binary @metadata.json
Note the response appears similar to the below where storageClass is set to empty string:
Hey there,
While testing out the latest released container: version 1.51 - sha256:600fad414f624942a7250d1917c48d6a63cb7212ff85d068cb470a1d274ae6ca, it was observed that when using the google-cloud-storage-2.46.0.jar to make requests to the container we started experiencing errors as seen below when parsing the response back from the container:
The request used to generate the above error was around updating the metadata of an object.
Upon further inspection, it was observed that the new container was returning the following storage class attribute within the JSON response
"storageClass": "",
I believe this change may be the cause.
Would anyone be able to check this out for me please?
If any more details are needed, please let me know.
Thank you.
Replication steps using curl
docker ps -a # Take 0.0.0.0:62237->4443/tcp
export GCS_PORT=62237
{ "name": "test-bucket-env", "location": "US-EAST1" }
curl -v "localhost:$GCS_PORT/storage/v1/b?project=recreate&projection=full" -H "Content-Type: application/json" -X POST
curl -v "localhost:$GCS_PORT/upload/storage/v1/b/test-bucket-env/o?ifGenerationMatch=0&name=dev/repus/collection/entry-id/0/1&uploadType=resumable" -X POST
curl -v localhost:$GCS_PORT/upload/storage/v1/b/test-bucket-env/o?uploadType=resumable&name=dev%2Frepus%2Fcollection%2Fentry-id%2F0%2F1&upload_id=7a9d76ad6c0219f6f8dcadbca889f9d4
curl -v "localhost:$GCS_PORT/storage/v1/b/test-bucket-env/o/dev%2Frepus%2Fcollection%2Fentry-id%2F0%2F1?projection=full"
1736335690830320
{ "metadata": { "tag-1": "true", "tag-2": "2024-01-29 11:53:04", "tag-3": "2024-01-17 11:53:12" } }
curl -v "localhost:62237/storage/v1/b/test-bucket-env/o/dev%2Frepus%2Fcollection%2Fentry-id%2F0%2F1?ifGenerationMatch=1736335821147726&projection=full" -X POST --data-binary @metadata.json
Diff between version 1.50 and 1.51
The text was updated successfully, but these errors were encountered: