Re: [jclouds/jclouds] Filesystem: Fix the MPU ETags to match S3. (#1252)

2018-11-01 Thread Timur Alperovich
timuralp commented on this pull request.



>   .append("-")
  .append(partsList.size())
  .append("\"")
  .toString();
   assertThat(blob.getMetadata().getETag()).isEqualTo(expectedETag);
}
 
+   @Test(groups = { "integration", "live" })
+   public void testMultipartUploadMultiplePartsKnownETag() throws Exception {
+  BlobStore blobStore = view.getBlobStore();
+  String container = getContainerName();
+  // Pre-computed ETag returned by AWS S3 for the MPU consisting of two 
5MB parts filled with 'b'
+  String expectedETag = "\"84462a16f6a60478d50148808aa609c1-2\"";
+  int partSize = 5 * (int) Math.pow(2, 20);

Done.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1252#discussion_r230231474

Re: [jclouds/jclouds] Filesystem: Fix the MPU ETags to match S3. (#1252)

2018-11-01 Thread Timur Alperovich
timuralp commented on this pull request.



> +   @Test(groups = { "integration", "live" })
+   public void testMultipartUploadMultiplePartsKnownETag() throws Exception {
+  BlobStore blobStore = view.getBlobStore();
+  String container = getContainerName();
+  // Pre-computed ETag returned by AWS S3 for the MPU consisting of two 
5MB parts filled with 'b'
+  String expectedETag = "\"84462a16f6a60478d50148808aa609c1-2\"";
+  int partSize = 5 * (int) Math.pow(2, 20);
+  try {
+ String name = "blob-name";
+ BlobBuilder blobBuilder = blobStore.blobBuilder(name);
+ Blob blob = blobBuilder.build();
+ MultipartUpload mpu = blobStore.initiateMultipartUpload(container, 
blob.getMetadata(), new PutOptions());
+
+ byte[] content = new byte[partSize];
+ Arrays.fill(content, (byte) 'b');
+ Payload payload = Payloads.newByteArrayPayload(content);

Most likely -- the challenging part is that I'd need to pre-compute the ETag 
for that output. I picked the easy content of "b"s so I can easily test what 
AWS S3 returns and used it as a test value (otherwise, like the original patch 
pointed out, we have a problem of the test itself being buggy in the same way).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1252#discussion_r230231453

Re: [jclouds/jclouds] Filesystem: Fix the MPU ETags to match S3. (#1252)

2018-11-01 Thread Timur Alperovich
timuralp commented on this pull request.



> @@ -838,10 +839,10 @@ public String completeMultipartUpload(MultipartUpload 
> mpu, List p
 throw propagate(ioe);
  }
  streams.add(is);
- partHashes.append(blobPart.getMetadata().getETag());
+ md5Hasher.putBytes(new BigInteger(blobPart.getMetadata().getETag(), 
16).toByteArray());

Done.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1252#discussion_r230231187

Re: [jclouds/jclouds] Removed check for prefix/delimiter in clearContainer (#1254)

2018-11-01 Thread Andrew Gaul
@timuralp you probably added this check; could you look at this pull request?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1254#issuecomment-435216716

[jclouds/jclouds] Removed check for prefix/delimiter in clearContainer (#1254)

2018-11-01 Thread reptillicus
as discussed in this mail thread: 
https://lists.apache.org/thread.html/e10af185b92545935223cd070a9eabbda2898ba7265a223512c07f3f@%3Cuser.jclouds.apache.org%3E

Also added some tests in BaseContainerIntegrationTest that test clearContainer 
with prefix etc. 
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1254

-- Commit Summary --

  * Removed check for prefix in clearContainer, as discussed in this mail 
thread: 
https://lists.apache.org/thread.html/e10af185b92545935223cd070a9eabbda2898ba7265a223512c07f3f@%3Cuser.jclouds.apache.org%3E

-- File Changes --

M 
blobstore/src/main/java/org/jclouds/blobstore/strategy/internal/DeleteAllKeysInList.java
 (3)
M 
blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java
 (16)
M 
blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseContainerIntegrationTest.java
 (59)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1254.patch
https://github.com/jclouds/jclouds/pull/1254.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1254


Re: [jclouds/jclouds] Improve Jetty installation for live tests (#1230)

2018-11-01 Thread Andrea Turli
@andreaturli pushed 1 commit.

bec0de5  - remove SslSelectChannelConnector import


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds/pull/1230/files/2b2688e2080f5443d88915c83f840178871d546e..bec0de59ff8e539608778b44432e6db291cc06ba


Re: [jclouds/jclouds] Improve Jetty installation for live tests (#1230)

2018-11-01 Thread Andrea Turli
thanks @nacx I've bumped the jetty version to the latest `9.4.12.v20180830`


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1230#issuecomment-435129000

Re: [jclouds/jclouds] Improve Jetty installation for live tests (#1230)

2018-11-01 Thread Andrea Turli
@andreaturli pushed 1 commit.

2b2688e  -bump jetty version to fix security vulnerability


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds/pull/1230/files/86630f4dd6dcf2466615ca456b892d4bf1ad9097..2b2688e2080f5443d88915c83f840178871d546e


Re: [jclouds/jclouds] Improve Jetty installation for live tests (#1230)

2018-11-01 Thread Ignasi Barrera
@andreaturli Any chance you can use this branch to upgrade Jetty to fix the 
vulnerability?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1230#issuecomment-435021317