You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by danbroudy <no...@github.com> on 2015/06/10 20:15:46 UTC

[jclouds-labs-google] Update ObjectApi and getBlob, fix testGetRangeOutOfRange (#151)

This uncovers a new test failure `BaseBlobIntegrationTest#testGetIfMatch`

testGetIfMatch was not actually testing the intended behavior. Neither request was attaching a If-Match header and the test was passing just fine. 

Now it is attaching an If-Match header but with quotes around the etag causing the request to be rejected. 


You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds-labs-google/pull/151

-- Commit Summary --

  * Update ObjectApi and getBlob, fix testGetRangeOutOfRange

-- File Changes --

    M google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/blobstore/GoogleCloudStorageBlobStore.java (9)
    M google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/features/ObjectApi.java (5)
    M google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/options/GetObjectOptions.java (4)
    M google-cloud-storage/src/test/java/org/jclouds/googlecloudstorage/features/ObjectApiMockTest.java (4)

-- Patch Links --

https://github.com/jclouds/jclouds-labs-google/pull/151.patch
https://github.com/jclouds/jclouds-labs-google/pull/151.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/151

Re: [jclouds-labs-google] Update ObjectApi and getBlob, fix testGetRangeOutOfRange (#151)

Posted by Andrew Gaul <no...@github.com>.
> @@ -123,7 +124,7 @@
>     @Fallback(NullOnNotFoundOr404.class)
>     @Nullable
>     GoogleCloudStorageObject getObject(@PathParam("bucket") String bucketName, @PathParam("object") String objectName,
> -            GetObjectOptions options);
> +         HttpRequestOptions options);

After this commit, we have no other uses of `GetObjectOptions`.  Are these generation and projection options not needed?  If so should we remove that class entirely?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/151/files#r32163063

Re: [jclouds-labs-google] Update ObjectApi and getBlob, fix testGetRangeOutOfRange (#151)

Posted by danbroudy <no...@github.com>.
> @@ -123,7 +124,7 @@
>     @Fallback(NullOnNotFoundOr404.class)
>     @Nullable
>     GoogleCloudStorageObject getObject(@PathParam("bucket") String bucketName, @PathParam("object") String objectName,
> -            GetObjectOptions options);
> +         HttpRequestOptions options);

I think GetObjectOptions is still useful because it provides GCE specific query params. Because it inherits from GetOptions which implements from HttpRequestOptions it can still be used for the getObject call here.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/151/files#r32355985

Re: [jclouds-labs-google] Update ObjectApi and getBlob, fix testGetRangeOutOfRange (#151)

Posted by Andrew Gaul <no...@github.com>.
Pushed to master as 194b3b3a2c5813403bcf6219ca060391bfcb1ab2 and 3ab75db85438fe99a4de53a427fb38d9eb92d3d5 and to 1.9.x as dbb59495c01a0faaf21c7eec8e3548baaade8f82 and 074d8fa4772ca2499f0ec73c76889d1fdcd50123.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/151#issuecomment-111639983

Re: [jclouds-labs-google] Update ObjectApi and getBlob, fix testGetRangeOutOfRange (#151)

Posted by Andrew Gaul <no...@github.com>.
Closed #151.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/151#event-330034364

Re: [jclouds-labs-google] Update ObjectApi and getBlob, fix testGetRangeOutOfRange (#151)

Posted by Andrew Gaul <no...@github.com>.
> @@ -123,7 +124,7 @@
>     @Fallback(NullOnNotFoundOr404.class)

Correct Javadoc above?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/151/files#r32162994

Re: [jclouds-labs-google] Update ObjectApi and getBlob, fix testGetRangeOutOfRange (#151)

Posted by Andrew Gaul <no...@github.com>.
> @@ -123,7 +124,7 @@
>     @Fallback(NullOnNotFoundOr404.class)
>     @Nullable
>     GoogleCloudStorageObject getObject(@PathParam("bucket") String bucketName, @PathParam("object") String objectName,
> -            GetObjectOptions options);
> +         HttpRequestOptions options);

Sorry I misunderstood this -- I looked at `org.jclouds.blobstore.options.GetOptions` and not `org.jclouds.http.options.GetOptions` which implements `HttpRequestOptions`.  We can pass `GetObjectOptions` as you suggest.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/151/files#r32362821