(jclouds) branch master updated: Remove redundant cast
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new f4e986f8fb Remove redundant cast f4e986f8fb is described below commit f4e986f8fb8b48bb3b14ce2b9ed075462f2b552f Author: Andrew Gaul AuthorDate: Sun May 12 23:01:30 2024 +0900 Remove redundant cast --- .../blobstore/GoogleCloudStorageBlobRequestSigner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/blobstore/GoogleCloudStorageBlobRequestSigner.java b/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/blobstore/GoogleCloudStorageBlobRequestSigner.java index f91bb83bd8..2e092e6897 100644 --- a/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/blobstore/GoogleCloudStorageBlobRequestSigner.java +++ b/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/blobstore/GoogleCloudStorageBlobRequestSigner.java @@ -131,7 +131,7 @@ public final class GoogleCloudStorageBlobRequestSigner implements BlobRequestSig request.addHeader(entry.getKey(), entry.getValue()); } - return (HttpRequest) request + return request .addQueryParam("Expires", String.valueOf(expires)) .addQueryParam("GoogleAccessId", creds.get().identity) .addQueryParam("Signature", signature)
(jclouds) branch master updated: Upgrade to Google Auto 1.5.4
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 705a1cb591 Upgrade to Google Auto 1.5.4 705a1cb591 is described below commit 705a1cb59135d813ac025af2446738b5f0cac51c Author: Andrew Gaul AuthorDate: Sun May 12 15:06:55 2024 +0900 Upgrade to Google Auto 1.5.4 This resolves warnings about extensions. --- project/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/pom.xml b/project/pom.xml index 0da4197514..afc02212f6 100644 --- a/project/pom.xml +++ b/project/pom.xml @@ -228,7 +228,7 @@ 3.14.9 1.0.1 1.0-rc3 -1.4.1 +1.5.4 9.4.46.v20220331
(jclouds) branch master updated: Consolidate duplicate apache rat stanza
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new cb434d5bac Consolidate duplicate apache rat stanza cb434d5bac is described below commit cb434d5baca40a02a0f8fbce52f79b1c5a60 Author: Andrew Gaul AuthorDate: Sun May 12 14:53:56 2024 +0900 Consolidate duplicate apache rat stanza This resolves a build warning. --- project/pom.xml | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/project/pom.xml b/project/pom.xml index 1db28237aa..0da4197514 100644 --- a/project/pom.xml +++ b/project/pom.xml @@ -684,11 +684,6 @@ maven-install-plugin 2.4 - - org.apache.rat - apache-rat-plugin - 0.12 - com.github.spotbugs spotbugs-maven-plugin @@ -718,6 +713,7 @@ org.apache.rat apache-rat-plugin + 0.12
(jclouds) branch master updated: Suppress Modernizer violation
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 4928a1e3bc Suppress Modernizer violation 4928a1e3bc is described below commit 4928a1e3bc7f4e43c51f973bc9e20dd5fe5775ce Author: Andrew Gaul AuthorDate: Sun May 12 13:56:45 2024 +0900 Suppress Modernizer violation --- apis/s3/pom.xml | 5 + .../src/main/java/org/jclouds/s3/filters/ChunkedUploadPayload.java | 2 ++ 2 files changed, 7 insertions(+) diff --git a/apis/s3/pom.xml b/apis/s3/pom.xml index 2ff562f062..a0bbc124e7 100644 --- a/apis/s3/pom.xml +++ b/apis/s3/pom.xml @@ -98,6 +98,11 @@ auto-value provided + + org.gaul + modernizer-maven-annotations + true + diff --git a/apis/s3/src/main/java/org/jclouds/s3/filters/ChunkedUploadPayload.java b/apis/s3/src/main/java/org/jclouds/s3/filters/ChunkedUploadPayload.java index 28e8ac646a..54c806d0a0 100644 --- a/apis/s3/src/main/java/org/jclouds/s3/filters/ChunkedUploadPayload.java +++ b/apis/s3/src/main/java/org/jclouds/s3/filters/ChunkedUploadPayload.java @@ -18,6 +18,7 @@ package org.jclouds.s3.filters; import com.google.common.io.ByteProcessor; import com.google.common.io.ByteStreams; +import org.gaul.modernizer_maven_annotations.SuppressModernizer; import org.jclouds.http.HttpException; import org.jclouds.io.MutableContentMetadata; import org.jclouds.io.Payload; @@ -171,6 +172,7 @@ public class ChunkedUploadPayload extends BasePayload { return new SequenceInputStream(new ChunkedInputStreamEnumeration(this.payload.openStream(), chunkedBlockSize)); } + @SuppressModernizer // for Enumeration private class ChunkedInputStreamEnumeration implements Enumeration { private final InputStream inputStream; private boolean lastChunked;
(jclouds) branch master updated: Downgrade to maven-modernizer-plugin 2.7.0
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 8813747e57 Downgrade to maven-modernizer-plugin 2.7.0 8813747e57 is described below commit 8813747e57e23798a210b9afaca5697bfeac05b3 Author: Andrew Gaul AuthorDate: Sun May 12 13:00:57 2024 +0900 Downgrade to maven-modernizer-plugin 2.7.0 This works around gaul/modernizer-maven-plugin#241. --- project/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/pom.xml b/project/pom.xml index f36fb5d952..1db28237aa 100644 --- a/project/pom.xml +++ b/project/pom.xml @@ -232,7 +232,7 @@ 9.4.46.v20220331 - 2.8.0 + 2.7.0 2.17.2 @@ -610,7 +610,7 @@ org.gaul modernizer-maven-plugin -2.8.0 +2.7.0
(jclouds) branch master updated: Upgrade to modernizer-maven-plugin 2.8.0
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 2836f5a0ac Upgrade to modernizer-maven-plugin 2.8.0 2836f5a0ac is described below commit 2836f5a0acdab8603a962a34ba45604b4d38d0f2 Author: Andrew Gaul AuthorDate: Sun May 12 08:43:35 2024 +0900 Upgrade to modernizer-maven-plugin 2.8.0 --- project/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/pom.xml b/project/pom.xml index 62a2846581..f36fb5d952 100644 --- a/project/pom.xml +++ b/project/pom.xml @@ -610,7 +610,7 @@ org.gaul modernizer-maven-plugin -1.8.0 +2.8.0
(jclouds) branch master updated: Upgrade to modernizer-maven-plugin 2.8.0
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new eae5a43350 Upgrade to modernizer-maven-plugin 2.8.0 eae5a43350 is described below commit eae5a43350d6d993a457e4b244396cbc615bc4c5 Author: Andrew Gaul AuthorDate: Sun May 12 08:43:35 2024 +0900 Upgrade to modernizer-maven-plugin 2.8.0 --- project/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/pom.xml b/project/pom.xml index e229494e6d..62a2846581 100644 --- a/project/pom.xml +++ b/project/pom.xml @@ -232,7 +232,7 @@ 9.4.46.v20220331 - 1.8.0 + 2.8.0 2.17.2
(jclouds) branch master updated: setup-java v3 -> v4
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 44db24ee7c setup-java v3 -> v4 44db24ee7c is described below commit 44db24ee7c9925ba3268d16816257320521a138c Author: sullis AuthorDate: Tue May 7 11:10:04 2024 -0700 setup-java v3 -> v4 --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e417ba6dc0..7fbc4cc9a1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: java-version: "11" distribution: temurin
(jclouds) branch master updated: jclouds requires Java 11
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new bc20012f49 jclouds requires Java 11 bc20012f49 is described below commit bc20012f499b66305c126d774f063c2ee860ee69 Author: Andrew Gaul AuthorDate: Sun May 12 08:30:47 2024 +0900 jclouds requires Java 11 This should resolve CI failures. --- project/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/pom.xml b/project/pom.xml index 51b2fc0854..e229494e6d 100644 --- a/project/pom.xml +++ b/project/pom.xml @@ -210,7 +210,7 @@ -1.8 +11 ${jdk.version} ${jdk.version} true
(jclouds) branch master updated: jclouds requires Java 11
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 8df4935136 jclouds requires Java 11 8df4935136 is described below commit 8df4935136efe588c5e04fdd58e405dc872dfd3b Author: Andrew Gaul AuthorDate: Sun May 12 08:29:08 2024 +0900 jclouds requires Java 11 --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0655d08588..e417ba6dc0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,7 +30,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: - java-version: "8" + java-version: "11" distribution: temurin cache: maven - name: Build
(jclouds) 01/03: more validation for containerName and blobKey to avoid access escape
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git commit b0819e0ef5e08c792a4d1724b938714ce9503aa3 Author: jixinchi AuthorDate: Wed Apr 3 16:57:40 2024 +0800 more validation for containerName and blobKey to avoid access escape --- .../validators/internal/FilesystemBlobKeyValidatorImpl.java | 2 ++ .../internal/FilesystemContainerNameValidatorImpl.java | 2 ++ .../strategy/internal/FilesystemStorageStrategyImpl.java | 9 + 3 files changed, 13 insertions(+) diff --git a/apis/filesystem/src/main/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorImpl.java b/apis/filesystem/src/main/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorImpl.java index 25e4fdaa0e..60a5721113 100644 --- a/apis/filesystem/src/main/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorImpl.java +++ b/apis/filesystem/src/main/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorImpl.java @@ -38,6 +38,8 @@ public class FilesystemBlobKeyValidatorImpl extends FilesystemBlobKeyValidator { //blobkey cannot start with / (or \ in Windows) character if (name.startsWith("\\") || name.startsWith("/")) throw new IllegalArgumentException("Blob key '" + name + "' cannot start with \\ or /"); +if (name.contains("../")) +throw new IllegalArgumentException("Blob key '" + name + "' cannot contains ../"); } } diff --git a/apis/filesystem/src/main/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemContainerNameValidatorImpl.java b/apis/filesystem/src/main/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemContainerNameValidatorImpl.java index c18835a30f..21e5cf5e29 100644 --- a/apis/filesystem/src/main/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemContainerNameValidatorImpl.java +++ b/apis/filesystem/src/main/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemContainerNameValidatorImpl.java @@ -38,6 +38,8 @@ public class FilesystemContainerNameValidatorImpl extends FilesystemContainerNam //container name cannot contains / (or \ in Windows) character if (name.contains("\\") || name.contains("/")) throw new IllegalArgumentException("Container name '" + name + "' cannot contain \\ or /"); +if (name.equals(".") || name.equals("..")) +throw new IllegalArgumentException("Container name cannot be . or .."); } } diff --git a/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java b/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java index 660d89cb1d..4d4b69b838 100644 --- a/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java +++ b/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java @@ -187,6 +187,7 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy { @Override public ContainerAccess getContainerAccess(String container) { + filesystemContainerNameValidator.validate(container); File file = new File(buildPathStartingFromBaseDir(container)); if (!file.exists()) { throw new ContainerNotFoundException(container, "in getContainerAccess"); @@ -217,6 +218,7 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy { @Override public void setContainerAccess(String container, ContainerAccess access) { + filesystemContainerNameValidator.validate(container); Path path = new File(buildPathStartingFromBaseDir(container)).toPath(); if ( isWindows() ) { @@ -310,6 +312,7 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy { @Override public StorageMetadata getContainerMetadata(String container) { + filesystemContainerNameValidator.validate(container); MutableStorageMetadata metadata = new MutableStorageMetadataImpl(); metadata.setName(container); metadata.setType(StorageType.CONTAINER); @@ -378,6 +381,8 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy { @Override public Blob getBlob(final String container, final String key) { + filesystemContainerNameValidator.validate(container); + filesystemBlobKeyValidator.validate(key); BlobBuilder builder = blobBuilders.get(); builder.name(key); File file = getFileForBlobKey(container, key); @@ -658,6 +663,8 @@ public class File
(jclouds) 03/03: add unit test for Filesystem BlobKey and ContainerName validator
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git commit 6670c556d7637d2d3301ca3cbe8ba60fdd08d67c Author: jixinchi AuthorDate: Mon Apr 15 11:27:51 2024 +0800 add unit test for Filesystem BlobKey and ContainerName validator --- .../validators/internal/FilesystemBlobKeyValidatorImpl.java| 5 - .../validators/internal/FilesystemBlobKeyValidatorTest.java| 6 ++ .../internal/FilesystemContainerNameValidatorTest.java | 10 ++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/apis/filesystem/src/main/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorImpl.java b/apis/filesystem/src/main/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorImpl.java index 563968edcc..f53cb11021 100644 --- a/apis/filesystem/src/main/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorImpl.java +++ b/apis/filesystem/src/main/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorImpl.java @@ -20,6 +20,9 @@ import org.jclouds.filesystem.predicates.validators.FilesystemBlobKeyValidator; import com.google.inject.Singleton; +import java.io.File; +import java.util.Arrays; + /** * Validates name for filesystem container blob keys implementation * @@ -38,7 +41,7 @@ public class FilesystemBlobKeyValidatorImpl extends FilesystemBlobKeyValidator { //blobkey cannot start with / (or \ in Windows) character if (name.startsWith("\\") || name.startsWith("/")) throw new IllegalArgumentException("Blob key '" + name + "' cannot start with \\ or /"); -if (name.contains("../")) +if (Arrays.asList(name.split(File.separator.equals("\\") ? "" : File.separator)).contains("..")) throw new IllegalArgumentException("Blob key '" + name + "' cannot contain ../"); } diff --git a/apis/filesystem/src/test/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorTest.java b/apis/filesystem/src/test/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorTest.java index b06254f542..e3e1436edb 100644 --- a/apis/filesystem/src/test/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorTest.java +++ b/apis/filesystem/src/test/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorTest.java @@ -36,6 +36,7 @@ public class FilesystemBlobKeyValidatorTest { validator.validate("all.img"); validator.validate("all" + File.separator + "is" + File.separator + "" + "ok"); +validator.validate("all" + File.separator + "is" + File.separator + ".." + "ok"); } @Test @@ -51,6 +52,11 @@ public class FilesystemBlobKeyValidatorTest { validator.validate(File.separator + "is" + File.separator + "" + "ok"); fail("Blob key value incorrect, but was not recognized"); } catch (IllegalArgumentException e) {} + +try { +validator.validate("all" + File.separator + ".." + File.separator + "ok"); +fail("Blob key value incorrect, but was not recognized"); +} catch (IllegalArgumentException e) {} } diff --git a/apis/filesystem/src/test/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemContainerNameValidatorTest.java b/apis/filesystem/src/test/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemContainerNameValidatorTest.java index c8bdd61de6..668dc6870c 100644 --- a/apis/filesystem/src/test/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemContainerNameValidatorTest.java +++ b/apis/filesystem/src/test/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemContainerNameValidatorTest.java @@ -60,6 +60,16 @@ public class FilesystemContainerNameValidatorTest { validator.validate("all" + File.separator + "is" + File.separator); fail("Container name value incorrect, but was not recognized"); } catch (IllegalArgumentException e) {} + +try { +validator.validate("."); +fail("Container name value incorrect, but was not recognized"); +} catch (IllegalArgumentException e) {} + +try { +validator.validate(".."); +fail("Container name value incorrect, but was not recognized"); +} catch (IllegalArgumentException e) {} }
(jclouds) branch master updated (c73660dac8 -> 6670c556d7)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git from c73660dac8 JCLOUDS-1637: Use glassfish jaxb implementation new b0819e0ef5 more validation for containerName and blobKey to avoid access escape new 03aeccffdf fix grammar error in sentence from contains to contain new 6670c556d7 add unit test for Filesystem BlobKey and ContainerName validator The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../validators/internal/FilesystemBlobKeyValidatorImpl.java| 5 + .../internal/FilesystemContainerNameValidatorImpl.java | 2 ++ .../strategy/internal/FilesystemStorageStrategyImpl.java | 9 + .../validators/internal/FilesystemBlobKeyValidatorTest.java| 6 ++ .../internal/FilesystemContainerNameValidatorTest.java | 10 ++ 5 files changed, 32 insertions(+)
(jclouds) 02/03: fix grammar error in sentence from contains to contain
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git commit 03aeccffdf89c247996c9c0fe90efe52af97c037 Author: jixinchi AuthorDate: Mon Apr 8 10:10:57 2024 +0800 fix grammar error in sentence from contains to contain --- .../predicates/validators/internal/FilesystemBlobKeyValidatorImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/filesystem/src/main/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorImpl.java b/apis/filesystem/src/main/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorImpl.java index 60a5721113..563968edcc 100644 --- a/apis/filesystem/src/main/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorImpl.java +++ b/apis/filesystem/src/main/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorImpl.java @@ -39,7 +39,7 @@ public class FilesystemBlobKeyValidatorImpl extends FilesystemBlobKeyValidator { if (name.startsWith("\\") || name.startsWith("/")) throw new IllegalArgumentException("Blob key '" + name + "' cannot start with \\ or /"); if (name.contains("../")) -throw new IllegalArgumentException("Blob key '" + name + "' cannot contains ../"); +throw new IllegalArgumentException("Blob key '" + name + "' cannot contain ../"); } }
(jclouds) branch master updated: JCLOUDS-1637: Use glassfish jaxb implementation
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new c73660dac8 JCLOUDS-1637: Use glassfish jaxb implementation c73660dac8 is described below commit c73660dac8303266d875a4fabe63cc731ebdd437 Author: Andrew Gaul AuthorDate: Wed Apr 24 20:38:19 2024 +0900 JCLOUDS-1637: Use glassfish jaxb implementation Required by jakarta.xml.bind-api. --- core/pom.xml| 4 ++-- project/pom.xml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index 1adc389040..d1075b2c42 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -70,8 +70,8 @@ jakarta.xml.bind-api - com.sun.xml.bind - jaxb-impl + org.glassfish.jaxb + jaxb-runtime org.osgi diff --git a/project/pom.xml b/project/pom.xml index 6dec440992..51b2fc0854 100644 --- a/project/pom.xml +++ b/project/pom.xml @@ -332,9 +332,9 @@ -com.sun.xml.bind -jaxb-impl -2.3.3 +org.glassfish.jaxb +jaxb-runtime +4.0.5
(jclouds) branch master updated: Set version to 2.6.1-SNAPSHOT
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new d733401ce7 Set version to 2.6.1-SNAPSHOT d733401ce7 is described below commit d733401ce7d8817228f7b5a8ed3cdfe38745b207 Author: Andrew Gaul AuthorDate: Wed Apr 24 20:29:39 2024 +0900 Set version to 2.6.1-SNAPSHOT --- all/pom.xml | 2 +- allblobstore/pom.xml | 2 +- allcompute/pom.xml| 2 +- allloadbalancer/pom.xml | 2 +- apis/atmos/pom.xml| 2 +- apis/byon/pom.xml | 2 +- apis/chef/pom.xml | 2 +- apis/cloudstack/pom.xml | 2 +- apis/cloudwatch/pom.xml | 2 +- apis/docker/pom.xml | 2 +- apis/ec2/pom.xml | 2 +- apis/elasticstack/pom.xml | 2 +- apis/filesystem/pom.xml | 2 +- apis/glacier/pom.xml | 2 +- apis/oauth/pom.xml| 2 +- apis/openstack-cinder/pom.xml | 2 +- apis/openstack-keystone/pom.xml | 2 +- apis/openstack-neutron/pom.xml| 2 +- apis/openstack-nova-ec2/pom.xml | 2 +- apis/openstack-nova/pom.xml | 2 +- apis/openstack-swift/pom.xml | 2 +- apis/openstack-trove/pom.xml | 2 +- apis/pom.xml | 2 +- apis/rackspace-clouddns/pom.xml | 2 +- apis/rackspace-cloudfiles/pom.xml | 4 ++-- apis/rackspace-cloudidentity/pom.xml | 2 +- apis/rackspace-cloudloadbalancers/pom.xml | 2 +- apis/route53/pom.xml | 2 +- apis/s3/pom.xml | 2 +- apis/sqs/pom.xml | 2 +- apis/sts/pom.xml | 2 +- blobstore/pom.xml | 2 +- common/googlecloud/pom.xml| 2 +- common/openstack/pom.xml | 2 +- common/pom.xml| 2 +- compute/pom.xml | 2 +- core/pom.xml | 2 +- drivers/apachehc/pom.xml | 2 +- drivers/bouncycastle/pom.xml | 2 +- drivers/enterprise/pom.xml| 2 +- drivers/joda/pom.xml | 2 +- drivers/jsch/pom.xml | 2 +- drivers/log4j/pom.xml | 2 +- drivers/okhttp/pom.xml| 2 +- drivers/pom.xml | 2 +- drivers/slf4j/pom.xml | 2 +- drivers/sshj/pom.xml | 2 +- loadbalancer/pom.xml | 2 +- pom.xml | 2 +- project/pom.xml | 2 +- providers/aws-cloudwatch/pom.xml | 2 +- providers/aws-ec2/pom.xml | 2 +- providers/aws-route53/pom.xml | 2 +- providers/aws-s3/pom.xml | 2 +- providers/aws-sqs/pom.xml | 2 +- providers/aws-sts/pom.xml | 2 +- providers/azureblob/pom.xml | 2 +- providers/azurecompute-arm/pom.xml| 2 +- providers/b2/pom.xml | 2 +- providers/digitalocean2/pom.xml | 2 +- providers/dynect/pom.xml | 2 +- providers/elastichosts-ams-e/pom.xml | 2 +- providers/elastichosts-dal-a/pom.xml | 2 +- providers/elastichosts-hkg-e/pom.xml | 2 +- providers/elastichosts-lax-p/pom.xml | 2 +- providers/elastichosts-lon-b/pom.xml | 2 +- providers/elastichosts-lon-p/pom.xml | 2 +- providers/elastichosts-mmi-a/pom.xml | 2 +- providers/elastichosts-sat-p/pom.xml | 2 +- providers/elastichosts-sjc-c/pom.xml | 2 +- providers/elastichosts-syd-v/pom.xml | 2 +- providers/elastichosts-tor-p/pom.xml | 2 +- providers/glesys/pom.xml | 2 +- providers/go2cloud-jhb1/pom.xml | 2 +- providers/gogrid/pom.xml | 2 +- providers/google-cloud-storage/pom.xml| 2 +- providers/google-compute-engine/pom.xml | 2 +- providers/openhosting-east1/pom.xml | 2
(jclouds) branch master updated: JCLOUDS-1637: Replace java.xml.bind uses
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 7a438ceebd JCLOUDS-1637: Replace java.xml.bind uses 7a438ceebd is described below commit 7a438ceebdc298a707d4ce8e1ec22bea2834bf3d Author: Andrew Gaul AuthorDate: Wed Apr 24 20:17:19 2024 +0900 JCLOUDS-1637: Replace java.xml.bind uses --- core/pom.xml | 4 core/src/main/java/org/jclouds/xml/internal/JAXBParser.java | 8 .../annotationparsing/JAXBResponseParserAnnotationExpectTest.java | 2 +- .../test/java/org/jclouds/rest/binders/BindToXMLPayloadTest.java | 2 +- project/pom.xml | 6 ++ 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index be3189c3de..858c35a26a 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -65,6 +65,10 @@ jakarta.inject jakarta.inject-api + + jakarta.xml.bind + jakarta.xml.bind-api + com.sun.xml.bind jaxb-impl diff --git a/core/src/main/java/org/jclouds/xml/internal/JAXBParser.java b/core/src/main/java/org/jclouds/xml/internal/JAXBParser.java index f8cbde20ff..bec027c7c7 100644 --- a/core/src/main/java/org/jclouds/xml/internal/JAXBParser.java +++ b/core/src/main/java/org/jclouds/xml/internal/JAXBParser.java @@ -22,10 +22,10 @@ import java.io.StringWriter; import jakarta.inject.Inject; import jakarta.inject.Singleton; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.bind.Unmarshaller; +import jakarta.xml.bind.JAXBContext; +import jakarta.xml.bind.JAXBException; +import jakarta.xml.bind.Marshaller; +import jakarta.xml.bind.Unmarshaller; import org.jclouds.Constants; import org.jclouds.xml.XMLParser; diff --git a/core/src/test/java/org/jclouds/rest/annotationparsing/JAXBResponseParserAnnotationExpectTest.java b/core/src/test/java/org/jclouds/rest/annotationparsing/JAXBResponseParserAnnotationExpectTest.java index 086680ced4..353d45d40c 100644 --- a/core/src/test/java/org/jclouds/rest/annotationparsing/JAXBResponseParserAnnotationExpectTest.java +++ b/core/src/test/java/org/jclouds/rest/annotationparsing/JAXBResponseParserAnnotationExpectTest.java @@ -26,7 +26,7 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.Path; import jakarta.ws.rs.core.MediaType; -import javax.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlRootElement; import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpResponse; diff --git a/core/src/test/java/org/jclouds/rest/binders/BindToXMLPayloadTest.java b/core/src/test/java/org/jclouds/rest/binders/BindToXMLPayloadTest.java index b7d45e2b50..e81937b944 100644 --- a/core/src/test/java/org/jclouds/rest/binders/BindToXMLPayloadTest.java +++ b/core/src/test/java/org/jclouds/rest/binders/BindToXMLPayloadTest.java @@ -19,7 +19,7 @@ package org.jclouds.rest.binders; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertEquals; -import javax.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlRootElement; import org.jclouds.http.HttpRequest; import org.jclouds.xml.XMLParser; diff --git a/project/pom.xml b/project/pom.xml index 22cbde1631..437048608c 100644 --- a/project/pom.xml +++ b/project/pom.xml @@ -325,6 +325,12 @@ 2.0.1 + +jakarta.xml.bind +jakarta.xml.bind-api +4.0.2 + + com.sun.xml.bind jaxb-impl
(jclouds) branch master updated: JCLOUDS-1635: Add COOL and COLD to Tier
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new da1bc06f9e JCLOUDS-1635: Add COOL and COLD to Tier da1bc06f9e is described below commit da1bc06f9efb626c03eb3119e9c77adf5b12f179 Author: Andrew Gaul AuthorDate: Sun Apr 14 18:17:06 2024 +0900 JCLOUDS-1635: Add COOL and COLD to Tier The former replaces INFREQUENT. References gaul/s3proxy#625. --- apis/s3/src/main/java/org/jclouds/s3/domain/ObjectMetadata.java | 8 +--- blobstore/src/main/java/org/jclouds/blobstore/domain/Tier.java| 8 ++-- .../src/main/java/org/jclouds/azureblob/domain/AccessTier.java| 6 -- .../googlecloudstorage/domain/DomainResourceReferences.java | 6 -- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/apis/s3/src/main/java/org/jclouds/s3/domain/ObjectMetadata.java b/apis/s3/src/main/java/org/jclouds/s3/domain/ObjectMetadata.java index 1fa49d76ec..f43399ca1d 100644 --- a/apis/s3/src/main/java/org/jclouds/s3/domain/ObjectMetadata.java +++ b/apis/s3/src/main/java/org/jclouds/s3/domain/ObjectMetadata.java @@ -35,12 +35,12 @@ public interface ObjectMetadata extends Comparable { public enum StorageClass { STANDARD(Tier.STANDARD), - STANDARD_IA(Tier.INFREQUENT), - ONEZONE_IA(Tier.INFREQUENT), + STANDARD_IA(Tier.COOL), + ONEZONE_IA(Tier.COOL), INTELLIGENT_TIERING(Tier.STANDARD), REDUCED_REDUNDANCY(Tier.STANDARD), GLACIER(Tier.ARCHIVE), - GLACIER_IR(Tier.ARCHIVE), + GLACIER_IR(Tier.COLD), DEEP_ARCHIVE(Tier.ARCHIVE); private final Tier tier; @@ -53,6 +53,8 @@ public interface ObjectMetadata extends Comparable { switch (tier) { case STANDARD: return StorageClass.STANDARD; case INFREQUENT: return StorageClass.STANDARD_IA; + case COOL: return StorageClass.STANDARD_IA; + case COLD: return StorageClass.GLACIER_IR; case ARCHIVE: return StorageClass.DEEP_ARCHIVE; } throw new IllegalArgumentException("invalid tier: " + tier); diff --git a/blobstore/src/main/java/org/jclouds/blobstore/domain/Tier.java b/blobstore/src/main/java/org/jclouds/blobstore/domain/Tier.java index 827374457f..13cf035294 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/domain/Tier.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/domain/Tier.java @@ -24,8 +24,12 @@ package org.jclouds.blobstore.domain; public enum Tier { /** Optimize for access speed. */ STANDARD, - /** Balance access speed against storage cost. */ - INFREQUENT, + /** @deprecated see COOL. */ + @Deprecated INFREQUENT, + /** Slower access speed and reduced storage costs. */ + COOL, + /** Even slower access speed and further reduced storage costs. */ + COLD, /** * Optimize for storage cost. Some providers may require a separate call to * set the blob to STANDARD tier before access. diff --git a/providers/azureblob/src/main/java/org/jclouds/azureblob/domain/AccessTier.java b/providers/azureblob/src/main/java/org/jclouds/azureblob/domain/AccessTier.java index ee8cea8298..199280ef49 100644 --- a/providers/azureblob/src/main/java/org/jclouds/azureblob/domain/AccessTier.java +++ b/providers/azureblob/src/main/java/org/jclouds/azureblob/domain/AccessTier.java @@ -24,8 +24,8 @@ import com.google.common.base.CaseFormat; public enum AccessTier { HOT(Tier.STANDARD), - COOL(Tier.INFREQUENT), - COLD(Tier.INFREQUENT), + COOL(Tier.COOL), + COLD(Tier.COLD), ARCHIVE(Tier.ARCHIVE); private final Tier tier; @@ -52,6 +52,8 @@ public enum AccessTier { switch (tier) { case STANDARD: return AccessTier.HOT; case INFREQUENT: return AccessTier.COOL; + case COOL: return AccessTier.COOL; + case COLD: return AccessTier.COLD; case ARCHIVE: return AccessTier.ARCHIVE; } throw new IllegalArgumentException("invalid tier: " + tier); diff --git a/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/domain/DomainResourceReferences.java b/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/domain/DomainResourceReferences.java index b375175708..fe473da187 100644 --- a/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/domain/DomainResourceReferences.java +++ b/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/domain/DomainResourceReferences.java @@ -105,11 +105,11 @@ public final class DomainResourceReferences { public enum StorageClass { ARCHIVE(Tier.ARCHIVE), - COLDLINE(Tier.ARCHIVE), + COLDLINE(Tier.COLD), DURABLE_REDUCED_AVAILABILITY(Tier.STANDARD), MULTI_REGIONAL(Tier.STANDARD), REGIONAL(Tier.STANDARD), - NEARLINE(Tier.INFREQUE
(jclouds) branch master updated: JCLOUDS-1634: Add AzureBlob COLD access tier
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new e1f34bbfa7 JCLOUDS-1634: Add AzureBlob COLD access tier e1f34bbfa7 is described below commit e1f34bbfa77619871fdf1af9b3090c8ff695869d Author: Andrew Gaul AuthorDate: Sun Apr 14 17:49:59 2024 +0900 JCLOUDS-1634: Add AzureBlob COLD access tier References gaul/s3proxy#625. --- .../azureblob/src/main/java/org/jclouds/azureblob/domain/AccessTier.java | 1 + 1 file changed, 1 insertion(+) diff --git a/providers/azureblob/src/main/java/org/jclouds/azureblob/domain/AccessTier.java b/providers/azureblob/src/main/java/org/jclouds/azureblob/domain/AccessTier.java index 3c99ef6b9e..ee8cea8298 100644 --- a/providers/azureblob/src/main/java/org/jclouds/azureblob/domain/AccessTier.java +++ b/providers/azureblob/src/main/java/org/jclouds/azureblob/domain/AccessTier.java @@ -25,6 +25,7 @@ import com.google.common.base.CaseFormat; public enum AccessTier { HOT(Tier.STANDARD), COOL(Tier.INFREQUENT), + COLD(Tier.INFREQUENT), ARCHIVE(Tier.ARCHIVE); private final Tier tier;
(jclouds) branch master updated (bc43572d65 -> 4435765f55)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git from bc43572d65 JCLOUDS-1630: Handle URI template properly with opened curve bracket (#199) new 0688553087 JCLOUDS-1631: fix AWSRequestAuthorizeSignatureV4 when prefix contains special chars new 4435765f55 add license header The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../filters/RequestAuthorizeSignatureV4Test.java | 6 +- .../s3/filters/AWSRequestAuthorizeSignatureV4.java | 3 +- .../filter/AwsRequestAuthorizeSignatureV4Test.java | 69 ++ 3 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 providers/aws-s3/src/test/java/org/jclouds/aws/s3/filter/AwsRequestAuthorizeSignatureV4Test.java
(jclouds) 02/02: add license header
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git commit 4435765f550bbbae034a27ab5c5deee958fbc55f Author: Maksim_Hadalau AuthorDate: Wed Mar 20 17:09:14 2024 +0100 add license header --- .../s3/filter/AwsRequestAuthorizeSignatureV4Test.java| 16 1 file changed, 16 insertions(+) diff --git a/providers/aws-s3/src/test/java/org/jclouds/aws/s3/filter/AwsRequestAuthorizeSignatureV4Test.java b/providers/aws-s3/src/test/java/org/jclouds/aws/s3/filter/AwsRequestAuthorizeSignatureV4Test.java index 3afb640586..d4dd12f9ea 100644 --- a/providers/aws-s3/src/test/java/org/jclouds/aws/s3/filter/AwsRequestAuthorizeSignatureV4Test.java +++ b/providers/aws-s3/src/test/java/org/jclouds/aws/s3/filter/AwsRequestAuthorizeSignatureV4Test.java @@ -1,3 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.jclouds.aws.s3.filter; import com.google.common.collect.ImmutableList;
(jclouds) 01/02: JCLOUDS-1631: fix AWSRequestAuthorizeSignatureV4 when prefix contains special chars
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git commit 0688553087aabdaa7f503265bbc4a4cb60adef55 Author: Maksim_Hadalau AuthorDate: Mon Mar 18 19:54:28 2024 +0100 JCLOUDS-1631: fix AWSRequestAuthorizeSignatureV4 when prefix contains special chars --- .../filters/RequestAuthorizeSignatureV4Test.java | 6 +-- .../s3/filters/AWSRequestAuthorizeSignatureV4.java | 3 +- .../filter/AwsRequestAuthorizeSignatureV4Test.java | 53 ++ 3 files changed, 58 insertions(+), 4 deletions(-) diff --git a/apis/s3/src/test/java/org/jclouds/s3/filters/RequestAuthorizeSignatureV4Test.java b/apis/s3/src/test/java/org/jclouds/s3/filters/RequestAuthorizeSignatureV4Test.java index bbe019c8cd..8057888945 100644 --- a/apis/s3/src/test/java/org/jclouds/s3/filters/RequestAuthorizeSignatureV4Test.java +++ b/apis/s3/src/test/java/org/jclouds/s3/filters/RequestAuthorizeSignatureV4Test.java @@ -89,7 +89,7 @@ public class RequestAuthorizeSignatureV4Test { + "SignedHeaders=host;x-amz-content-sha256;x-amz-date, " + "Signature=6cc5d0758e2599be7cb172fd57cefab2828201a2b4d372972a83dc304de93958"; - private static final String BUCKET_NAME = "test-bucket"; + protected static final String BUCKET_NAME = "test-bucket"; private static final String OBJECT_NAME = "ExampleObject.txt"; @ConfiguresHttpApi @@ -116,11 +116,11 @@ public class RequestAuthorizeSignatureV4Test { .buildInjector(); } - public static RequestAuthorizeSignatureV4 filter(Credentials creds) { + public RequestAuthorizeSignatureV4 filter(Credentials creds) { return injector(creds).getInstance(RequestAuthorizeSignatureV4.class); } - Credentials temporaryCredentials = new Credentials.Builder() + protected Credentials temporaryCredentials = new Credentials.Builder() .identity(IDENTITY) .credential(CREDENTIAL) .build(); diff --git a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/filters/AWSRequestAuthorizeSignatureV4.java b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/filters/AWSRequestAuthorizeSignatureV4.java index 1afa832348..2491152b8c 100644 --- a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/filters/AWSRequestAuthorizeSignatureV4.java +++ b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/filters/AWSRequestAuthorizeSignatureV4.java @@ -53,7 +53,8 @@ public class AWSRequestAuthorizeSignatureV4 extends RequestAuthorizeSignatureV4 * with expiration. */ - Multimap queryMap = queryParser().apply(request.getEndpoint().getQuery()); + // Do not replace URI.getRawQuery() with URI.getQuery() see: JCLOUDS-1631 + Multimap queryMap = queryParser().apply(request.getEndpoint().getRawQuery()); if (queryMap.containsKey(AMZ_SIGNATURE_PARAM) || queryMap.containsKey(TEMPORARY_SIGNATURE_PARAM)) { return request; } diff --git a/providers/aws-s3/src/test/java/org/jclouds/aws/s3/filter/AwsRequestAuthorizeSignatureV4Test.java b/providers/aws-s3/src/test/java/org/jclouds/aws/s3/filter/AwsRequestAuthorizeSignatureV4Test.java new file mode 100644 index 00..3afb640586 --- /dev/null +++ b/providers/aws-s3/src/test/java/org/jclouds/aws/s3/filter/AwsRequestAuthorizeSignatureV4Test.java @@ -0,0 +1,53 @@ +package org.jclouds.aws.s3.filter; + +import com.google.common.collect.ImmutableList; +import com.google.common.net.HttpHeaders; +import org.jclouds.aws.s3.filters.AWSRequestAuthorizeSignatureV4; +import org.jclouds.domain.Credentials; +import org.jclouds.http.HttpRequest; +import org.jclouds.reflect.Invocation; +import org.jclouds.rest.internal.GeneratedHttpRequest; +import org.jclouds.s3.S3Client; +import org.jclouds.s3.filters.RequestAuthorizeSignatureV4; +import org.jclouds.s3.filters.RequestAuthorizeSignatureV4Test; +import org.jclouds.s3.options.ListBucketOptions; +import org.testng.annotations.Test; + +import static org.jclouds.reflect.Reflection2.method; +import static org.testng.Assert.assertEquals; + +/** + * Tests behavior of {@code AWSRequestAuthorizeSignatureV4} + */ +// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire +@Test(groups = "unit", testName = "AwsRequestAuthorizeSignatureV4Test") +public class AwsRequestAuthorizeSignatureV4Test extends RequestAuthorizeSignatureV4Test { + +private static final String LIST_BUCKET_AUTHORIZATION_HEADER_RESULT = "AWS4-HMAC-SHA256 Credential=AKIAPAEBI3QI4EXAMPLE/20150203/cn-north-1/s3/aws4_request," + +" SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=ec72ac5f67bf86e3b95d122f690a2898224f28328d39131c48221a5dcf0c2cee"; + +@Override +public RequestAuthorizeSignatureV4 filter(Credentials creds) { +return injector(creds).getInstance(A
(jclouds) branch master updated: JCLOUDS-1632: GCP BlobStore fails to put a blob if blob name contains non ASCII characters
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new b379c17156 JCLOUDS-1632: GCP BlobStore fails to put a blob if blob name contains non ASCII characters b379c17156 is described below commit b379c17156237de96cedbb19d82bc86168fe83af Author: Aliaksandr Stsiapanay AuthorDate: Wed Mar 20 11:37:11 2024 +0300 JCLOUDS-1632: GCP BlobStore fails to put a blob if blob name contains non ASCII characters --- .../org/jclouds/io/payloads/MultipartForm.java | 2 +- .../org/jclouds/io/payloads/MultipartFormTest.java | 32 -- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/core/src/main/java/org/jclouds/io/payloads/MultipartForm.java b/core/src/main/java/org/jclouds/io/payloads/MultipartForm.java index 94d4112cf4..c148de402b 100644 --- a/core/src/main/java/org/jclouds/io/payloads/MultipartForm.java +++ b/core/src/main/java/org/jclouds/io/payloads/MultipartForm.java @@ -50,7 +50,7 @@ public class MultipartForm extends BasePayload> { if (!part.isRepeatable()) isRepeatable = false; contentLength += part.getContentMetadata().getContentLength() -+ createHeaders(boundaryrn, part).length() ++ createHeaders(boundaryrn, part).getBytes().length + createRn().length(); } contentLength += createFooter(boundary).length(); diff --git a/core/src/test/java/org/jclouds/io/payloads/MultipartFormTest.java b/core/src/test/java/org/jclouds/io/payloads/MultipartFormTest.java index 3a673e4712..9f90d06a41 100644 --- a/core/src/test/java/org/jclouds/io/payloads/MultipartFormTest.java +++ b/core/src/test/java/org/jclouds/io/payloads/MultipartFormTest.java @@ -41,17 +41,31 @@ public class MultipartFormTest { public void testSinglePart() throws IOException { StringBuilder builder = new StringBuilder(); - addData(boundary, "hello", builder); + addData(boundary, "file", "hello", builder); builder.append("--").append(boundary).append("--").append("\r\n"); String expects = builder.toString(); assertEquals(expects.length(), 199); - MultipartForm multipartForm = new MultipartForm(boundary, newPart("hello")); + MultipartForm multipartForm = new MultipartForm(boundary, newPart("file", "hello")); assertEquals(Strings2.toStringAndClose(multipartForm.openStream()), expects); assertEquals(multipartForm.getContentMetadata().getContentLength(), Long.valueOf(199)); } + public void testLengthIsCorrectPerUTF8() throws IOException { + + StringBuilder builder = new StringBuilder(); + addData(boundary, "unicâ‚Şde", "hello", builder); + builder.append("--").append(boundary).append("--").append("\r\n"); + String expects = builder.toString(); + assertEquals(expects.getBytes().length, 204); + + MultipartForm multipartForm = new MultipartForm(boundary, newPart("unicâ‚Şde", "hello")); + + assertEquals(Strings2.toStringAndClose(multipartForm.openStream()), expects); + assertEquals(multipartForm.getContentMetadata().getContentLength(), Long.valueOf(204)); + } + public static class MockFilePayload extends FilePayload { private final StringPayload realPayload; @@ -81,14 +95,14 @@ public class MultipartFormTest { } } - private Part newPart(String data) { - return Part.create("file", new MockFilePayload(data), + private Part newPart(String name, String data) { + return Part.create(name, new MockFilePayload(data), new PartOptions().contentType(PLAIN_TEXT_UTF_8.withoutParameters().toString())); } - private void addData(String boundary, String data, StringBuilder builder) { + private void addData(String boundary, String name, String data, StringBuilder builder) { builder.append("--").append(boundary).append("\r\n"); - builder.append("Content-Disposition").append(": ").append("form-data; name=\"file\"; filename=\"testfile.txt\"") + builder.append("Content-Disposition").append(": ").append("form-data; name=\"").append(name).append("\"; filename=\"testfile.txt\"") .append("\r\n"); builder.append("Content-Type").append(": ").append("text/plain").append("\r\n"); builder.append("\r\n"); @@ -98,15 +112,15 @@ public class MultipartFormTest { public void testMultipleParts() throws IOException { StringBuilder builder = new StringBuilder(); - addData(bounda
(jclouds-site) branch master updated: Add release notes for 2.6.0
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds-site.git The following commit(s) were added to refs/heads/master by this push: new 2073684 Add release notes for 2.6.0 2073684 is described below commit 207368468e94f81601e69784ff1b837888f5c98f Author: Andrew Gaul AuthorDate: Sun Mar 10 14:17:17 2024 +0900 Add release notes for 2.6.0 --- doap_jclouds.rdf | 7 releasenotes/2.6.0.md | 91 +++ 2 files changed, 98 insertions(+) diff --git a/doap_jclouds.rdf b/doap_jclouds.rdf index 0ebdb5f..a2be187 100644 --- a/doap_jclouds.rdf +++ b/doap_jclouds.rdf @@ -35,6 +35,13 @@ Java http://projects.apache.org/category/cloud; /> http://projects.apache.org/category/library; /> + + +Apache jclouds 2.6.0 +2024-03-10 +2.6.0 + + Apache jclouds 2.5.0 diff --git a/releasenotes/2.6.0.md b/releasenotes/2.6.0.md new file mode 100644 index 000..bd67d62 --- /dev/null +++ b/releasenotes/2.6.0.md @@ -0,0 +1,91 @@ +--- +layout: releasenotes +title: Release Notes for Version 2.6.0 +date: 2024-03-10 20:00:00 +release_notes: true +permalink: /releasenotes/2.6.0/ +--- + +1. [Introduction](#intro) +1. [Release Highlights](#highlights) +1. [Known Issues](#knownissues) +1. [Credits](#credits) +1. [Test Results](#test) + +## Introduction + +Apache jclouds 2.6.0 is a regular release which includes compatibility and bug fixes. +You can [read the official announcement here](https://s.apache.org/jclouds260). To get started with jclouds, please see the [jclouds installation guide](/start/install/). + +## Release Highlights + +New features in Apache jclouds 2.6.0 include: + +* Updated dependencies, particularly those that enable Java 21 and Guice 7 support. + +### Bugs and patches + + +[JCLOUDS-1519] - Support for Backblaze application keys + +[JCLOUDS-1601] - upgrade log4j due to security issue + +[JCLOUDS-1606] - Cannot upload more than 32 parts to GCS + +[JCLOUDS-1608] - Slicing of large files can lead to exceed the 32 parts limit of GCS + +[JCLOUDS-1615] - Using Azure SAS Token unable to upload some parts of the file (blockid is Not a valid base64 string) + +[JCLOUDS-1616] - Proxy credentials validation is missing in OkHttpCommandExecutorService API request + +[JCLOUDS-1618] - Jclouds 2.3.0 and above is incompatible with SpringBoot 2.7.* + + + +### New Feature + + +[JCLOUDS-1596] - Support Activity Log Alert Operations + +[JCLOUDS-1597] - Support Alerts operations + + + +### Improvement + + +[JCLOUDS-1604] - use non-beta/rc versions of auto-factory + +[JCLOUDS-1609] - upgrade bouncycastle due to cve + +[JCLOUDS-1620] - jclouds is not compatible with gson 2.9.0 + +[JCLOUDS-1621] - Upgrade to Guice 5.1.0 + +[JCLOUDS-1627] - Java Jakarta Support + +[JCLOUDS-1628] - Netty 3.10.* has multiple security vulnerabilities + +[JCLOUDS-1629] - Upgrade to Guice 7 + + + +The complete list of fixed issues and improvements can be found [here](https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12350598=Html=12314430). + +## Known Issues + +* This release does not include labs providers. Users can depend on the SNAPSHOTs instead. + +## Credits + +jclouds would like to thank everyone who contributed time and effort in order to make this release happen: + +* Apache jclouds [PMC](http://people.apache.org/committers-by-project.html#jclouds-pmc) and community for verifying the release. +* Check out who has been busy on [Open Hub](https://www.openhub.net/p/jclouds/contributors?query==latest_commit). + +## Test Results + +Please see the discussion and the vote threads for live test results for 2.6.0: + +* RC1 [vote](https://s.apache.org/jclouds260rc1vote) and [discussion](https://s.apache.org/jclouds260rc1discuss) threads. +
svn commit: r67824 - in /release/jclouds: 2.4.0/ 2.6.0/ 2.6.0/jclouds-2.6.0-source-release.tar.gz 2.6.0/jclouds-2.6.0-source-release.tar.gz.asc 2.6.0/jclouds-2.6.0-source-release.tar.gz.sha512 stable
Author: gaul Date: Sun Mar 10 05:08:08 2024 New Revision: 67824 Log: 2.6.0 release Added: release/jclouds/2.6.0/ release/jclouds/2.6.0/jclouds-2.6.0-source-release.tar.gz (with props) release/jclouds/2.6.0/jclouds-2.6.0-source-release.tar.gz.asc (with props) release/jclouds/2.6.0/jclouds-2.6.0-source-release.tar.gz.sha512 Removed: release/jclouds/2.4.0/ Modified: release/jclouds/stable Added: release/jclouds/2.6.0/jclouds-2.6.0-source-release.tar.gz == Binary file - no diff available. Propchange: release/jclouds/2.6.0/jclouds-2.6.0-source-release.tar.gz -- svn:mime-type = application/gzip Added: release/jclouds/2.6.0/jclouds-2.6.0-source-release.tar.gz.asc == Binary file - no diff available. Propchange: release/jclouds/2.6.0/jclouds-2.6.0-source-release.tar.gz.asc -- svn:mime-type = application/pgp-signature Added: release/jclouds/2.6.0/jclouds-2.6.0-source-release.tar.gz.sha512 == --- release/jclouds/2.6.0/jclouds-2.6.0-source-release.tar.gz.sha512 (added) +++ release/jclouds/2.6.0/jclouds-2.6.0-source-release.tar.gz.sha512 Sun Mar 10 05:08:08 2024 @@ -0,0 +1 @@ +f37771ff8950bc0419397a2c7373f81de5e61e2c1f4a6dfa2f42d205adb95ae42bb8d196814779282c2df5a6aafac597d30056f372d8d0413a378da85d448d4d Modified: release/jclouds/stable == --- release/jclouds/stable (original) +++ release/jclouds/stable Sun Mar 10 05:08:08 2024 @@ -1 +1 @@ -link 2.5.0 \ No newline at end of file +link 2.6.0 \ No newline at end of file
(jclouds) annotated tag rel/jclouds-2.6.0 created (now c324d3c5a0)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to annotated tag rel/jclouds-2.6.0 in repository https://gitbox.apache.org/repos/asf/jclouds.git at c324d3c5a0 (tag) tagging 173e3a4a49d910ad46d77a508a2ba7b67abf31fa (commit) replaces rel/jclouds-2.1.0-rc3 by Andrew Gaul on Sun Mar 3 16:14:14 2024 +0900 - Log - Apache jclouds 2.6.0-rc1 release --- No new revisions were added by this update.
svn commit: r67674 - in /dev/jclouds: 2.4.0-rc1/ 2.6.0-rc1/ 2.6.0-rc1/jclouds-2.6.0-source-release.tar.gz 2.6.0-rc1/jclouds-2.6.0-source-release.tar.gz.asc 2.6.0-rc1/jclouds-2.6.0-source-release.tar.g
Author: gaul Date: Sun Mar 3 08:05:17 2024 New Revision: 67674 Log: Add 2.6.0-rc1 and remove 2.4.0-rc1 Added: dev/jclouds/2.6.0-rc1/ dev/jclouds/2.6.0-rc1/jclouds-2.6.0-source-release.tar.gz (with props) dev/jclouds/2.6.0-rc1/jclouds-2.6.0-source-release.tar.gz.asc (with props) dev/jclouds/2.6.0-rc1/jclouds-2.6.0-source-release.tar.gz.sha512 Removed: dev/jclouds/2.4.0-rc1/ Added: dev/jclouds/2.6.0-rc1/jclouds-2.6.0-source-release.tar.gz == Binary file - no diff available. Propchange: dev/jclouds/2.6.0-rc1/jclouds-2.6.0-source-release.tar.gz -- svn:mime-type = application/gzip Added: dev/jclouds/2.6.0-rc1/jclouds-2.6.0-source-release.tar.gz.asc == Binary file - no diff available. Propchange: dev/jclouds/2.6.0-rc1/jclouds-2.6.0-source-release.tar.gz.asc -- svn:mime-type = application/pgp-signature Added: dev/jclouds/2.6.0-rc1/jclouds-2.6.0-source-release.tar.gz.sha512 == --- dev/jclouds/2.6.0-rc1/jclouds-2.6.0-source-release.tar.gz.sha512 (added) +++ dev/jclouds/2.6.0-rc1/jclouds-2.6.0-source-release.tar.gz.sha512 Sun Mar 3 08:05:17 2024 @@ -0,0 +1 @@ +f37771ff8950bc0419397a2c7373f81de5e61e2c1f4a6dfa2f42d205adb95ae42bb8d196814779282c2df5a6aafac597d30056f372d8d0413a378da85d448d4d
(jclouds) 01/01: Apache jclouds 2.6.0-rc1 release
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to annotated tag rel/jclouds-2.6.0-rc1 in repository https://gitbox.apache.org/repos/asf/jclouds.git commit 173e3a4a49d910ad46d77a508a2ba7b67abf31fa Author: Andrew Gaul AuthorDate: Sun Mar 3 16:14:14 2024 +0900 Apache jclouds 2.6.0-rc1 release --- all/pom.xml | 2 +- allblobstore/pom.xml | 2 +- allcompute/pom.xml| 2 +- allloadbalancer/pom.xml | 2 +- apis/atmos/pom.xml| 2 +- apis/byon/pom.xml | 2 +- apis/chef/pom.xml | 2 +- apis/cloudstack/pom.xml | 2 +- apis/cloudwatch/pom.xml | 2 +- apis/docker/pom.xml | 2 +- apis/ec2/pom.xml | 2 +- apis/elasticstack/pom.xml | 2 +- apis/filesystem/pom.xml | 2 +- apis/glacier/pom.xml | 2 +- apis/oauth/pom.xml| 2 +- apis/openstack-cinder/pom.xml | 2 +- apis/openstack-keystone/pom.xml | 2 +- apis/openstack-neutron/pom.xml| 2 +- apis/openstack-nova-ec2/pom.xml | 2 +- apis/openstack-nova/pom.xml | 2 +- apis/openstack-swift/pom.xml | 2 +- apis/openstack-trove/pom.xml | 2 +- apis/pom.xml | 2 +- apis/rackspace-clouddns/pom.xml | 2 +- apis/rackspace-cloudfiles/pom.xml | 4 ++-- apis/rackspace-cloudidentity/pom.xml | 2 +- apis/rackspace-cloudloadbalancers/pom.xml | 2 +- apis/route53/pom.xml | 2 +- apis/s3/pom.xml | 2 +- apis/sqs/pom.xml | 2 +- apis/sts/pom.xml | 2 +- blobstore/pom.xml | 4 ++-- common/googlecloud/pom.xml| 2 +- common/openstack/pom.xml | 2 +- common/pom.xml| 2 +- compute/pom.xml | 2 +- core/pom.xml | 4 ++-- drivers/apachehc/pom.xml | 2 +- drivers/bouncycastle/pom.xml | 2 +- drivers/enterprise/pom.xml| 2 +- drivers/joda/pom.xml | 2 +- drivers/jsch/pom.xml | 2 +- drivers/log4j/pom.xml | 2 +- drivers/okhttp/pom.xml| 2 +- drivers/pom.xml | 2 +- drivers/slf4j/pom.xml | 2 +- drivers/sshj/pom.xml | 2 +- loadbalancer/pom.xml | 2 +- pom.xml | 2 +- project/pom.xml | 4 ++-- providers/aws-cloudwatch/pom.xml | 2 +- providers/aws-ec2/pom.xml | 2 +- providers/aws-route53/pom.xml | 2 +- providers/aws-s3/pom.xml | 2 +- providers/aws-sqs/pom.xml | 2 +- providers/aws-sts/pom.xml | 2 +- providers/azureblob/pom.xml | 2 +- providers/azurecompute-arm/pom.xml| 2 +- providers/b2/pom.xml | 2 +- providers/digitalocean2/pom.xml | 2 +- providers/dynect/pom.xml | 2 +- providers/elastichosts-ams-e/pom.xml | 2 +- providers/elastichosts-dal-a/pom.xml | 2 +- providers/elastichosts-hkg-e/pom.xml | 2 +- providers/elastichosts-lax-p/pom.xml | 2 +- providers/elastichosts-lon-b/pom.xml | 2 +- providers/elastichosts-lon-p/pom.xml | 2 +- providers/elastichosts-mmi-a/pom.xml | 2 +- providers/elastichosts-sat-p/pom.xml | 2 +- providers/elastichosts-sjc-c/pom.xml | 2 +- providers/elastichosts-syd-v/pom.xml | 2 +- providers/elastichosts-tor-p/pom.xml | 2 +- providers/glesys/pom.xml | 2 +- providers/go2cloud-jhb1/pom.xml | 2 +- providers/gogrid/pom.xml | 2 +- providers/google-cloud-storage/pom.xml| 2 +- providers/google-compute-engine/pom.xml | 2 +- providers/openhosting-east1/pom.xml | 2 +- providers/packet/pom.xml | 2 +- providers/pom.xml | 2
(jclouds) annotated tag rel/jclouds-2.6.0-rc1 created (now c324d3c5a0)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to annotated tag rel/jclouds-2.6.0-rc1 in repository https://gitbox.apache.org/repos/asf/jclouds.git at c324d3c5a0 (tag) tagging 173e3a4a49d910ad46d77a508a2ba7b67abf31fa (commit) replaces rel/jclouds-2.1.0-rc3 by Andrew Gaul on Sun Mar 3 16:14:14 2024 +0900 - Log - Apache jclouds 2.6.0-rc1 release --- This annotated tag includes the following new commits: new 173e3a4a49 Apache jclouds 2.6.0-rc1 release The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(jclouds) branch master updated: JCLOUDS-1626: Close stream in MultiBlobInputStream
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 4c7fb2c8b9 JCLOUDS-1626: Close stream in MultiBlobInputStream 4c7fb2c8b9 is described below commit 4c7fb2c8b9f36207cd0b04f6266521412e6678f3 Author: Andrew Gaul AuthorDate: Sun Mar 3 12:42:06 2024 +0900 JCLOUDS-1626: Close stream in MultiBlobInputStream Otherwise the inner FileInputStream will leak if the caller only reads part of the stream before closing the outer MultiBlobInputStream. --- .../main/java/org/jclouds/blobstore/config/LocalBlobStore.java| 8 1 file changed, 8 insertions(+) diff --git a/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java b/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java index 96a9b81f4c..c5ed0effbd 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java @@ -1036,5 +1036,13 @@ public final class LocalBlobStore implements BlobStore { return result; } } + + @Override + public void close() throws IOException { + if (current != null) { + current.close(); + current = null; + } + } } }
(jclouds) branch master updated: JCLOUDS-1628: Remove Netty driver
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 4f3955799b JCLOUDS-1628: Remove Netty driver 4f3955799b is described below commit 4f3955799bb8e419556c9590dd60faed5d3122dd Author: Andrew Gaul AuthorDate: Sun Feb 25 08:43:48 2024 +0900 JCLOUDS-1628: Remove Netty driver 3.x has multiple security vulnerabilities but upgrading to 4.x is API incompatible. Remove due to lack of known users. --- drivers/enterprise/pom.xml | 5 - .../config/EnterpriseConfigurationModule.java | 2 - drivers/netty/bnd.bnd | 2 - drivers/netty/pom.xml | 55 -- .../jclouds/netty/config/NettyPayloadModule.java | 31 -- .../jclouds/netty/io/ChunkedFileInputStream.java | 115 - .../org/jclouds/netty/io/NettyPayloadSlicer.java | 35 --- drivers/pom.xml| 1 - 8 files changed, 246 deletions(-) diff --git a/drivers/enterprise/pom.xml b/drivers/enterprise/pom.xml index a50a86ad64..894b632621 100644 --- a/drivers/enterprise/pom.xml +++ b/drivers/enterprise/pom.xml @@ -48,11 +48,6 @@ jclouds-joda ${project.version} - - ${project.groupId} - jclouds-netty - ${project.version} - ${project.groupId} jclouds-bouncycastle diff --git a/drivers/enterprise/src/main/java/org/jclouds/enterprise/config/EnterpriseConfigurationModule.java b/drivers/enterprise/src/main/java/org/jclouds/enterprise/config/EnterpriseConfigurationModule.java index abdfd135ce..a49c46f93b 100644 --- a/drivers/enterprise/src/main/java/org/jclouds/enterprise/config/EnterpriseConfigurationModule.java +++ b/drivers/enterprise/src/main/java/org/jclouds/enterprise/config/EnterpriseConfigurationModule.java @@ -20,7 +20,6 @@ import org.jclouds.concurrent.config.ConfiguresExecutorService; import org.jclouds.concurrent.config.ExecutorServiceModule; import org.jclouds.date.joda.config.JodaDateServiceModule; import org.jclouds.encryption.bouncycastle.config.BouncyCastleCryptoModule; -import org.jclouds.netty.config.NettyPayloadModule; import com.google.common.util.concurrent.ListeningExecutorService; @@ -52,7 +51,6 @@ public class EnterpriseConfigurationModule extends ExecutorServiceModule { protected void configure() { install(new BouncyCastleCryptoModule()); install(new JodaDateServiceModule()); - install(new NettyPayloadModule()); } } diff --git a/drivers/netty/bnd.bnd b/drivers/netty/bnd.bnd deleted file mode 100644 index 70bc93dd86..00 --- a/drivers/netty/bnd.bnd +++ /dev/null @@ -1,2 +0,0 @@ -Export-Package: \ -org.jclouds.netty.*;version="${project.version}";-noimport:=true \ No newline at end of file diff --git a/drivers/netty/pom.xml b/drivers/netty/pom.xml deleted file mode 100644 index 1abb5c7ed3..00 --- a/drivers/netty/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - -http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd;> - 4.0.0 - -org.apache.jclouds -jclouds-project -2.6.0-SNAPSHOT -../../project/pom.xml - - org.apache.jclouds.driver - jclouds-netty - jclouds netty payload module - jclouds netty payload module - - - - org.apache.jclouds - jclouds-core - ${project.version} - - - org.apache.jclouds - jclouds-core - ${project.version} - test-jar - test - - - io.netty - netty - 3.10.6.Final - compile - - - - - diff --git a/drivers/netty/src/main/java/org/jclouds/netty/config/NettyPayloadModule.java b/drivers/netty/src/main/java/org/jclouds/netty/config/NettyPayloadModule.java deleted file mode 100644 index 10ec0ee3ba..00 --- a/drivers/netty/src/main/java/org/jclouds/netty/config/NettyPayloadModule.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language gove
(jclouds) branch fix-windows-path-test deleted (was 245ec19a9b)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch fix-windows-path-test in repository https://gitbox.apache.org/repos/asf/jclouds.git was 245ec19a9b Fix an unexpected test failure in Windows path handling This change permanently discards the following revisions: discard 245ec19a9b Fix an unexpected test failure in Windows path handling
(jclouds) branch add-jenkinsfile deleted (was b47ea437d8)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch add-jenkinsfile in repository https://gitbox.apache.org/repos/asf/jclouds.git was b47ea437d8 An initial Jenkinsfile for jclouds. The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(jclouds) branch master updated (47f34770c9 -> 6bb738195f)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git from 47f34770c9 JCLOUDS-1606: JCLOUDS-1608: Fix MPU off-by-one new ed160d30c5 Copy Swift logging configuration to GCS new 6bb738195f Add a test for uploading large objects The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../internal/BaseBlobIntegrationTest.java | 33 ++ .../src/test/resources/logback.xml | 32 +++-- 2 files changed, 37 insertions(+), 28 deletions(-)
(jclouds) 02/02: Add a test for uploading large objects
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git commit 6bb738195fdfd8d3fcd4003721c1ffe3f6a920a0 Author: Andrew Gaul AuthorDate: Wed Feb 21 21:57:51 2024 +0900 Add a test for uploading large objects This is disabled by default. Also rework upload helper to avoid using an unbounded amount of memory. --- .../internal/BaseBlobIntegrationTest.java | 33 ++ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java index d885f4530e..b681f0d08d 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java @@ -699,6 +699,22 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { testPut(payload, hashCode, payload, length, new PutOptions().multipart(true)); } + @Test(groups = { "integration", "live" }, enabled = false) + public void testPutMultipartByteSourceBig() throws Exception { + long length = 5L * 1024 * 1024 * 1024 + 1; + BlobStore blobStore = view.getBlobStore(); + MultipartUploadSlicingAlgorithm algorithm = new MultipartUploadSlicingAlgorithm( + blobStore.getMinimumMultipartPartSize(), blobStore.getMaximumMultipartPartSize(), + blobStore.getMaximumNumberOfParts()); + // make sure that we are creating multiple parts + assertThat(algorithm.calculateChunkSize(length)).isLessThan(length); + // TODO: this is inefficient due to skip recomputing entire stream + ByteSource byteSource = TestUtils.randomByteSource().slice(0, length); + Payload payload = new ByteSourcePayload(byteSource); + HashCode hashCode = byteSource.hash(Hashing.md5()); + testPut(payload, hashCode, payload, length, new PutOptions().multipart(true)); + } + @Test(groups = { "integration", "live" }) public void testPutMultipartInputStream() throws Exception { long length = Math.max(getMinimumMultipartBlobSize(), MultipartUploadSlicingAlgorithm.DEFAULT_PART_SIZE + 1); @@ -858,12 +874,17 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { Blob blob = blobStore.getBlob(container, blobName); assertThat(blob.getMetadata().getContentMetadata().getContentLength()).isEqualTo(length); - InputStream is = null; - try { -is = blob.getPayload().openStream(); -assertThat(is).hasContentEqualTo(expectedPayload.openStream()); - } finally { -Closeables2.closeQuietly(is); + try (InputStream actual = blob.getPayload().openStream(); + InputStream expected = expectedPayload.openStream()) { +while (length > 0) { + int bufferLength = (int) Math.min(1 << 20, length); + byte[] actualBuffer = new byte[bufferLength]; + ByteStreams.readFully(actual, actualBuffer); + byte[] expectedBuffer = new byte[bufferLength]; + ByteStreams.readFully(expected, expectedBuffer); + assertThat(actualBuffer).isEqualTo(expectedBuffer); + length -= bufferLength; +} } validateMetadata(blob.getMetadata(), container, blob.getMetadata().getName()); checkContentMetadata(blob);
(jclouds) 01/02: Copy Swift logging configuration to GCS
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git commit ed160d30c588b3edba2bbfb6fade2223d33546f7 Author: Andrew Gaul AuthorDate: Wed Feb 21 21:56:29 2024 +0900 Copy Swift logging configuration to GCS This avoids logging everything at trace level. --- .../src/test/resources/logback.xml | 32 +++--- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/providers/google-cloud-storage/src/test/resources/logback.xml b/providers/google-cloud-storage/src/test/resources/logback.xml index c83c449005..73ad6c7a8b 100644 --- a/providers/google-cloud-storage/src/test/resources/logback.xml +++ b/providers/google-cloud-storage/src/test/resources/logback.xml @@ -34,16 +34,8 @@ - -target/test-data/jclouds-compute.log - - -%d %-5p [%c] [%thread] %m%n - - - - -target/test-data/jclouds-ssh.log + +target/test-data/jclouds-blobstore.log %d %-5p [%c] [%thread] %m%n @@ -55,29 +47,25 @@ - + + - + - - - - - - - - + + + -
(jclouds) branch master updated: JCLOUDS-1606: JCLOUDS-1608: Fix MPU off-by-one
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 47f34770c9 JCLOUDS-1606: JCLOUDS-1608: Fix MPU off-by-one 47f34770c9 is described below commit 47f34770c9daaa5fe0224ce5bc1adbb7332d9aea Author: Jan Vermeulen AuthorDate: Tue Feb 20 21:41:47 2024 +0900 JCLOUDS-1606: JCLOUDS-1608: Fix MPU off-by-one Previously GCS could not upload large objects due to its 32 part limit. --- .../strategy/internal/MultipartUploadSlicingAlgorithm.java | 5 + .../blobstore/strategy/internal/MpuPartitioningAlgorithmTest.java | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/blobstore/src/main/java/org/jclouds/blobstore/strategy/internal/MultipartUploadSlicingAlgorithm.java b/blobstore/src/main/java/org/jclouds/blobstore/strategy/internal/MultipartUploadSlicingAlgorithm.java index f8cc9f3f0b..92ee96cacb 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/strategy/internal/MultipartUploadSlicingAlgorithm.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/strategy/internal/MultipartUploadSlicingAlgorithm.java @@ -72,6 +72,7 @@ public final class MultipartUploadSlicingAlgorithm { this.maximumNumberOfParts = maximumNumberOfParts; } + // TODO: This algorithm is needlessly complicated. public long calculateChunkSize(long length) { long unitPartSize = defaultPartSize; // first try with default part size int parts = (int)(length / unitPartSize); @@ -112,6 +113,10 @@ public final class MultipartUploadSlicingAlgorithm { if (remainder == 0 && parts > 0) { parts -= 1; } + if (remainder > 0 && parts == maximumNumberOfParts) { + parts -= 1; + partSize = length / parts; + } this.chunkSize = partSize; this.parts = parts; this.remaining = length - partSize * parts; diff --git a/blobstore/src/test/java/org/jclouds/blobstore/strategy/internal/MpuPartitioningAlgorithmTest.java b/blobstore/src/test/java/org/jclouds/blobstore/strategy/internal/MpuPartitioningAlgorithmTest.java index 423e91a064..fab35981da 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/strategy/internal/MpuPartitioningAlgorithmTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/strategy/internal/MpuPartitioningAlgorithmTest.java @@ -137,9 +137,9 @@ public final class MpuPartitioningAlgorithmTest { // then the number of parts is increasing length += 1; chunkSize = strategy.calculateChunkSize(length); - assertEquals(chunkSize, MAX_PART_SIZE); - assertEquals(strategy.getParts(), MAX_NUMBER_OF_PARTS); - assertEquals(strategy.getRemaining(), 1); + assertEquals(chunkSize, 5369246044L); + assertEquals(strategy.getParts(), MAX_NUMBER_OF_PARTS - 1); + assertEquals(strategy.getRemaining(), 6045); assertEquals(chunkSize * strategy.getParts() + strategy.getRemaining(), length); } }
(jclouds) branch master updated: Bump testng from 7.5 to 7.5.1 in /project
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new a983eaced9 Bump testng from 7.5 to 7.5.1 in /project a983eaced9 is described below commit a983eaced90287d428beb81501f128f6d5113d86 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Tue Feb 20 11:21:01 2024 + Bump testng from 7.5 to 7.5.1 in /project Bumps [testng](https://github.com/cbeust/testng) from 7.5 to 7.5.1. - [Release notes](https://github.com/cbeust/testng/releases) - [Changelog](https://github.com/testng-team/testng/blob/master/CHANGES.txt) - [Commits](https://github.com/cbeust/testng/compare/7.5...7.5.1) --- updated-dependencies: - dependency-name: org.testng:testng dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- project/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/pom.xml b/project/pom.xml index 6aac8da37d..556afc771d 100644 --- a/project/pom.xml +++ b/project/pom.xml @@ -243,7 +243,7 @@ 6.0.0 -7.5 +7.5.1 1.3 3.23.1 1.3.0
(jclouds) branch master updated: Correct testName
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 62abf39575 Correct testName 62abf39575 is described below commit 62abf3957574df533e5562074984c3bd9eda136c Author: Andrew Gaul AuthorDate: Tue Feb 20 20:14:32 2024 +0900 Correct testName testng 7.5.1 previously failed with this. References #171. --- .../java/org/jclouds/aws/ec2/parse/DescribeInstancesResponseTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/parse/DescribeInstancesResponseTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/parse/DescribeInstancesResponseTest.java index 540b352f0a..c65d4e30f6 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/parse/DescribeInstancesResponseTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/parse/DescribeInstancesResponseTest.java @@ -43,7 +43,7 @@ import com.google.common.collect.ImmutableSet; */ // NOTE:without testName, this will not call @Before* and fail w/NPE during // surefire -@Test(groups = "unit", testName = "AWSDescribeInstancesResponseHandlerTest") +@Test(groups = "unit", testName = "DescribeInstancesResponseHandlerTest") public class DescribeInstancesResponseTest extends BaseEC2HandlerTest { private DateService dateService;
(jclouds) branch master updated: JCLOUDS-1519: Fix the authorization error with b2 application keys
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 41d842d449 JCLOUDS-1519: Fix the authorization error with b2 application keys 41d842d449 is described below commit 41d842d449e125411709613e27ca01c8fc5c4a4f Author: davidsenk AuthorDate: Sun Feb 18 21:05:35 2024 -0500 JCLOUDS-1519: Fix the authorization error with b2 application keys --- .../b2/src/main/java/org/jclouds/b2/filters/RequestAuthorization.java | 2 ++ providers/b2/src/test/java/org/jclouds/b2/features/B2TestUtils.java | 2 +- providers/b2/src/test/resources/create_bucket_request.json | 2 +- providers/b2/src/test/resources/delete_bucket_request.json | 2 +- providers/b2/src/test/resources/list_buckets_request.json | 2 +- providers/b2/src/test/resources/update_bucket_request.json | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/providers/b2/src/main/java/org/jclouds/b2/filters/RequestAuthorization.java b/providers/b2/src/main/java/org/jclouds/b2/filters/RequestAuthorization.java index b403a59322..d79f3daf5d 100644 --- a/providers/b2/src/main/java/org/jclouds/b2/filters/RequestAuthorization.java +++ b/providers/b2/src/main/java/org/jclouds/b2/filters/RequestAuthorization.java @@ -50,9 +50,11 @@ public final class RequestAuthorization implements HttpRequestFilter { endpoint.getPath() + (endpoint.getQuery() == null ? "" : "?" + endpoint.getQuery())); + String updatedRequestBody = request.getPayload().getRawContent().toString().replaceAll("\"accountId\":.?\".*\"", "\"accountId\":\"" + auth.accountId() + "\""); request = request.toBuilder() .endpoint(endpoint) .replaceHeader(HttpHeaders.AUTHORIZATION, auth.authorizationToken()) +.payload(updatedRequestBody) .build(); return request; } diff --git a/providers/b2/src/test/java/org/jclouds/b2/features/B2TestUtils.java b/providers/b2/src/test/java/org/jclouds/b2/features/B2TestUtils.java index 391a82e9d9..b1cbe0a9ae 100644 --- a/providers/b2/src/test/java/org/jclouds/b2/features/B2TestUtils.java +++ b/providers/b2/src/test/java/org/jclouds/b2/features/B2TestUtils.java @@ -120,7 +120,7 @@ final class B2TestUtils { * @see RecordedRequest */ private static void assertContentTypeIsJson(RecordedRequest request) { - assertThat(request.getHeaders().values("Content-Type")).contains("application/json"); + assertThat(request.getHeaders().values("Content-Type")).contains("application/unknown"); } /** diff --git a/providers/b2/src/test/resources/create_bucket_request.json b/providers/b2/src/test/resources/create_bucket_request.json index 8b72ad5b8f..589d345981 100644 --- a/providers/b2/src/test/resources/create_bucket_request.json +++ b/providers/b2/src/test/resources/create_bucket_request.json @@ -1,5 +1,5 @@ { -"accountId": "ACCOUNT_ID", +"accountId": "YOUR_ACCOUNT_ID", "bucketName": "any_name_you_pick", "bucketType": "allPrivate" } diff --git a/providers/b2/src/test/resources/delete_bucket_request.json b/providers/b2/src/test/resources/delete_bucket_request.json index 8719353756..9848643b62 100644 --- a/providers/b2/src/test/resources/delete_bucket_request.json +++ b/providers/b2/src/test/resources/delete_bucket_request.json @@ -1,4 +1,4 @@ { -"accountId": "ACCOUNT_ID", +"accountId": "YOUR_ACCOUNT_ID", "bucketId": "4a48fe8875c6214145260818" } diff --git a/providers/b2/src/test/resources/list_buckets_request.json b/providers/b2/src/test/resources/list_buckets_request.json index e2854f515e..62ec3999c4 100644 --- a/providers/b2/src/test/resources/list_buckets_request.json +++ b/providers/b2/src/test/resources/list_buckets_request.json @@ -1,3 +1,3 @@ { -"accountId": "ACCOUNT_ID" +"accountId": "YOUR_ACCOUNT_ID" } diff --git a/providers/b2/src/test/resources/update_bucket_request.json b/providers/b2/src/test/resources/update_bucket_request.json index 64cc4753ef..ecc0849dca 100644 --- a/providers/b2/src/test/resources/update_bucket_request.json +++ b/providers/b2/src/test/resources/update_bucket_request.json @@ -1,5 +1,5 @@ { -"accountId": "ACCOUNT_ID", +"accountId": "YOUR_ACCOUNT_ID", "bucketId": "4a48fe8875c6214145260818", "bucketType": "allPrivate" }
(jclouds) branch dependabot/maven/project/org.testng-testng-7.5.1 created (now 9f4bb709e9)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch dependabot/maven/project/org.testng-testng-7.5.1 in repository https://gitbox.apache.org/repos/asf/jclouds.git at 9f4bb709e9 Bump testng from 7.5 to 7.5.1 in /project No new revisions were added by this update.
(jclouds) branch master updated: Upgrade netty to 3.10.6.Final
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 2a773c2a72 Upgrade netty to 3.10.6.Final 2a773c2a72 is described below commit 2a773c2a7206401ba780f230256fc0c38b22956a Author: Andrew Gaul AuthorDate: Sun Feb 18 21:16:38 2024 +0900 Upgrade netty to 3.10.6.Final --- drivers/netty/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/netty/pom.xml b/drivers/netty/pom.xml index ca1da0b3f9..1abb5c7ed3 100644 --- a/drivers/netty/pom.xml +++ b/drivers/netty/pom.xml @@ -46,7 +46,7 @@ io.netty netty - 3.5.9.Final + 3.10.6.Final compile
(jclouds) branch master updated (20bbb21a51 -> 8af11edaff)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git from 20bbb21a51 Bump bcprov-ext-jdk18on from 1.71 to 1.74 in /drivers/bouncycastle add 8af11edaff Bump ch.qos.logback:logback-core from 1.2.9 to 1.2.13 in /project No new revisions were added by this update. Summary of changes: project/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(jclouds) branch master updated: Bump bcprov-ext-jdk18on from 1.71 to 1.74 in /drivers/bouncycastle
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 20bbb21a51 Bump bcprov-ext-jdk18on from 1.71 to 1.74 in /drivers/bouncycastle 20bbb21a51 is described below commit 20bbb21a519c3aeed00c00b6e1029f5d668a116e Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Thu Jul 6 15:40:54 2023 + Bump bcprov-ext-jdk18on from 1.71 to 1.74 in /drivers/bouncycastle Bumps [bcprov-ext-jdk18on](https://github.com/bcgit/bc-java) from 1.71 to 1.74. - [Changelog](https://github.com/bcgit/bc-java/blob/main/docs/releasenotes.html) - [Commits](https://github.com/bcgit/bc-java/commits) --- updated-dependencies: - dependency-name: org.bouncycastle:bcprov-ext-jdk18on dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- drivers/bouncycastle/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bouncycastle/pom.xml b/drivers/bouncycastle/pom.xml index 086f1849b0..39f4df73d9 100644 --- a/drivers/bouncycastle/pom.xml +++ b/drivers/bouncycastle/pom.xml @@ -46,7 +46,7 @@ org.bouncycastle bcprov-ext-jdk18on - 1.71 + 1.74
(jclouds) branch master updated: Parse out of order ListBucket response elements
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 6455fd8518 Parse out of order ListBucket response elements 6455fd8518 is described below commit 6455fd8518f3158c7bb1693f7489896a24bd88fa Author: Mickael LANOE AuthorDate: Wed Nov 22 18:12:39 2023 +0100 Parse out of order ListBucket response elements Currently, jclouds assumes that the must occur before the tag. If the XML body does not adhere to this order, the parser throws a NullPointerException. Scaleway is a cloud provider that does not adhere to this order and returns the tag before the tag. The patch changes the parser to not depend on the order of the tags. See commit 04feb8f8482e48b6c26166edb3d6fd5a607d858b for a similar fix --- .../main/java/org/jclouds/s3/xml/ListBucketHandler.java | 5 +++-- .../java/org/jclouds/s3/xml/ListBucketHandlerTest.java| 15 +++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/apis/s3/src/main/java/org/jclouds/s3/xml/ListBucketHandler.java b/apis/s3/src/main/java/org/jclouds/s3/xml/ListBucketHandler.java index a548241fd3..27e21555d9 100644 --- a/apis/s3/src/main/java/org/jclouds/s3/xml/ListBucketHandler.java +++ b/apis/s3/src/main/java/org/jclouds/s3/xml/ListBucketHandler.java @@ -66,6 +66,7 @@ public class ListBucketHandler extends ParseSax.HandlerWithResulthttp://s3.amazonaws.com/doc/2006-03-01/\;>adriancole.org.jclouds.s3.amazons3testdelimiterapps/1000falseapps/02009-05-07T18:27:08.000Zc82e6a0025c31c5de5947fda62ac51ab8e1a5f66a480ca99a4fdfe8e318c3020446c9989d7004e [...] public static final String listBucketWithSecondsDate = "http://s3.amazonaws.com/doc/2006-03-01/\;>adriancole.org.jclouds.s3.amazons3testdelimiterapps/1000falseapps/92014-07-23T20:53:17+cd8a19b26fea8a827276df0ad11c580d8e1a5f66a480ca99a4fdfe8e318c3020446c9989d7004e7778 [...] public static final String listBucketWithSlashDelimiterAndCommonPrefixApps = "http://s3.amazonaws.com/doc/2006-03-01/\;> / apps/"; + public static final String listBucketWithDisplayNameFirst = "http://s3.amazonaws.com/doc/2006-03-01/\;>adriancole.org.jclouds.s3.amazons3testdelimiterapps/1000falseapps/92014-07-23T20:53:17+cd8a19b26fea8a827276df0ad11c580d8ferncame1a5f66a48 [...] private DateService dateService = new SimpleDateFormatDateService(); public void testApplyInputStream() { @@ -151,4 +152,18 @@ public class ListBucketHandlerTest extends BaseHandlerTest { ObjectMetadata metadata = bucket.iterator().next(); assertEquals(metadata.getLastModified(), expected.getLastModified()); } + + @Test + public void testListMyBucketsWithDisplayNameFirst() { + ListBucketResponse bucket = createParser().parse( +Strings2.toInputStream(listBucketWithDisplayNameFirst)); + ObjectMetadata expected = new CopyObjectResult( +new SimpleDateFormatDateService() + .iso8601SecondsDateParse("2014-07-23T20:53:17+"), +"\"92836a3ea45a6984d1b4d23a747d46bb\""); + + // Verify that the date was parsed successfully. + ObjectMetadata metadata = bucket.iterator().next(); + assertEquals(metadata.getLastModified(), expected.getLastModified()); + } }
(jclouds) branch master updated (47e3022519 -> 9b01dbc983)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git from 47e3022519 FilesystemStorageStrategyImpl.getBlob() for a folder return blob as type Blob (#187) new ef09dbb6ad do not remove md in DelimeterFilter then add it by commonPrefixes; just keep it new 311a4102da fix typo and add unit test new 9b01dbc983 no need to check contents contains md because it is a set The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../org/jclouds/blobstore/config/LocalBlobStore.java | 6 +++--- .../blobstore/strategy/internal/ListContainerTest.java | 16 2 files changed, 19 insertions(+), 3 deletions(-)
(jclouds) 02/03: fix typo and add unit test
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git commit 311a4102dad7b44d74c0a99b1cbaade8506e2096 Author: jixinchi AuthorDate: Tue Nov 14 17:29:16 2023 +0800 fix typo and add unit test --- .../org/jclouds/blobstore/config/LocalBlobStore.java | 1 - .../blobstore/strategy/internal/ListContainerTest.java | 16 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java b/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java index 9b1ef849bd..d44f93d748 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java @@ -367,7 +367,6 @@ public final class LocalBlobStore implements BlobStore { if (!contents.contains(md)) { contents.add(md); } - contents.add(md); } return contents; } diff --git a/blobstore/src/test/java/org/jclouds/blobstore/strategy/internal/ListContainerTest.java b/blobstore/src/test/java/org/jclouds/blobstore/strategy/internal/ListContainerTest.java index cb9f79e0a1..78af809efe 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/strategy/internal/ListContainerTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/strategy/internal/ListContainerTest.java @@ -193,6 +193,22 @@ public class ListContainerTest { assertThat(Iterables.get(results, 0).getType()).isNotEqualTo(StorageType.RELATIVE_PATH); } + public void testListBlobEndsWithDelimiterAndDelimiterFilter() { + String containerName = "testListBlobEndsWithDelimiterAndDelimiterFilter"; + blobStore.createContainerInLocation(null, containerName); + blobStore.putBlob(containerName, blobStore.blobBuilder("foo/").type(StorageType.FOLDER) + .payload(ByteSource.empty()).build()); + blobStore.putBlob(containerName, blobStore.blobBuilder("bar/text").type(StorageType.BLOB) + .payload(ByteSource.empty()).build()); + PageSet results = blobStore.list(containerName, + ListContainerOptions.Builder.delimiter("/")); + assertThat(results.size()).isEqualTo(2); + assertThat(Iterables.get(results, 0).getName()).isEqualTo("bar/"); + assertThat(Iterables.get(results, 0).getType()).isEqualTo(StorageType.RELATIVE_PATH); + assertThat(Iterables.get(results, 1).getName()).isEqualTo("foo/"); + assertThat(Iterables.get(results, 1).getType()).isEqualTo(StorageType.FOLDER); + } + public void testDirectoryListing() { String containerName = "testDirectoryListing"; blobStore.createContainerInLocation(null, containerName);
(jclouds) 01/03: do not remove md in DelimeterFilter then add it by commonPrefixes; just keep it
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git commit ef09dbb6ade426c2f0fadae7094ab6f2bc46fad8 Author: jixinchi AuthorDate: Mon Nov 13 15:40:31 2023 +0800 do not remove md in DelimeterFilter then add it by commonPrefixes; just keep it --- .../main/java/org/jclouds/blobstore/config/LocalBlobStore.java | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java b/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java index abb7bd0d43..9b1ef849bd 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java @@ -364,6 +364,9 @@ public final class LocalBlobStore implements BlobStore { o = prefix + o; } md.setName(o + delimiter); + if (!contents.contains(md)) { +contents.add(md); + } contents.add(md); } return contents; @@ -471,7 +474,7 @@ public final class LocalBlobStore implements BlobStore { public boolean apply(StorageMetadata metadata) { String name = metadata.getName(); if (prefix == null || prefix.isEmpty()) { -return name.indexOf(delimiter) == -1; +return name.indexOf(delimiter) == -1 || name.indexOf(delimiter) == name.length() - delimiter.length(); } if (name.startsWith(prefix)) { String unprefixedName = name.substring(prefix.length()); @@ -479,7 +482,7 @@ public final class LocalBlobStore implements BlobStore { // a blob that matches the prefix should also be returned return true; } -return unprefixedName.indexOf(delimiter) == -1; +return unprefixedName.indexOf(delimiter) == -1 || unprefixedName.indexOf(delimiter) == unprefixedName.length() - delimiter.length(); } return false; } @@ -505,7 +508,7 @@ public final class LocalBlobStore implements BlobStore { } } if (working.indexOf(delimiter) >= 0) { -// include the delimiter in the result +// not include the delimiter in the result return working.substring(0, working.indexOf(delimiter)); } else { return NO_PREFIX;
(jclouds) 03/03: no need to check contents contains md because it is a set
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git commit 9b01dbc9838a44b5b5fc5aafe3176955ef55b0fe Author: jixinchi AuthorDate: Tue Nov 14 20:19:51 2023 +0800 no need to check contents contains md because it is a set --- .../src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java| 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java b/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java index d44f93d748..5691a3143c 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java @@ -364,9 +364,7 @@ public final class LocalBlobStore implements BlobStore { o = prefix + o; } md.setName(o + delimiter); - if (!contents.contains(md)) { -contents.add(md); - } + contents.add(md); } return contents; }
[jclouds] branch master updated (ef580d4aa7 -> 1252f1951f)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git from ef580d4aa7 Bump okio from 1.17.2 to 3.4.0 in /drivers/okhttp new 20ebc67fc8 Update google-cloud-storage regions new 1252f1951f Replace US_CENTRAL2 with US_CENTRAL1 in tests The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../domain/DomainResourceReferences.java | 28 +++--- .../features/BucketApiLiveTest.java| 10 .../parse/ParseRegionListTest.java | 8 +++ .../src/test/resources/region_list.json| 10 4 files changed, 34 insertions(+), 22 deletions(-)
[jclouds] 01/02: Update google-cloud-storage regions
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git commit 20ebc67fc8c1d9fd55605cc9e5e419adf97b4006 Author: Andrew Gaul AuthorDate: Sat Jul 29 15:36:35 2023 +0900 Update google-cloud-storage regions --- .../domain/DomainResourceReferences.java | 28 +++--- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/domain/DomainResourceReferences.java b/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/domain/DomainResourceReferences.java index 00a89bf420..f87e48520f 100644 --- a/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/domain/DomainResourceReferences.java +++ b/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/domain/DomainResourceReferences.java @@ -37,7 +37,10 @@ public final class DomainResourceReferences { /* * Multi-Regional */ - ASIA, EU, US, + ASIA, + EU, + IN, + US, /* * Regional @@ -47,36 +50,45 @@ public final class DomainResourceReferences { ASIA_NORTHEAST1, ASIA_NORTHEAST2, ASIA_NORTHEAST3, - ASIA_SOUTH1, ASIA_SOUTHEAST1, + + ASIA_SOUTH1, + ASIA_SOUTH2, + ASIA_SOUTHEAST2, + ME_CENTRAL1, + ME_WEST1, + NORTHAMERICA_NORTHEAST1, + NORTHAMERICA_NORTHEAST2, US_CENTRAL1, US_EAST1, US_EAST4, + US_EAST5, + US_SOUTH1, US_WEST1, US_WEST2, US_WEST3, US_WEST4, SOUTHAMERICA_EAST1, + SOUTHAMERICA_WEST1, EUROPE_CENTRAL2, EUROPE_NORTH1, + EUROPE_SOUTHWEST1, EUROPE_WEST1, EUROPE_WEST2, EUROPE_WEST3, EUROPE_WEST4, EUROPE_WEST6, + EUROPE_WEST8, + EUROPE_WEST9, + EUROPE_WEST12, AUSTRALIA_SOUTHEAST1, - - /* - * Alpha locations - */ - @Beta - US_CENTRAL2; + AUSTRALIA_SOUTHEAST2; public String value() { return name().replace('_', '-');
[jclouds] 02/02: Replace US_CENTRAL2 with US_CENTRAL1 in tests
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git commit 1252f1951f10c3bc479231849d4aadc1b3fc Author: Andrew Gaul AuthorDate: Sat Jul 29 15:59:14 2023 +0900 Replace US_CENTRAL2 with US_CENTRAL1 in tests US_CENTRAL2 has been removed. --- .../jclouds/googlecloudstorage/features/BucketApiLiveTest.java | 10 +- .../jclouds/googlecomputeengine/parse/ParseRegionListTest.java | 8 .../google-compute-engine/src/test/resources/region_list.json | 10 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/providers/google-cloud-storage/src/test/java/org/jclouds/googlecloudstorage/features/BucketApiLiveTest.java b/providers/google-cloud-storage/src/test/java/org/jclouds/googlecloudstorage/features/BucketApiLiveTest.java index 2639f215ef..ec45915e42 100644 --- a/providers/google-cloud-storage/src/test/java/org/jclouds/googlecloudstorage/features/BucketApiLiveTest.java +++ b/providers/google-cloud-storage/src/test/java/org/jclouds/googlecloudstorage/features/BucketApiLiveTest.java @@ -95,7 +95,7 @@ public class BucketApiLiveTest extends BaseGoogleCloudStorageApiLiveTest { Logging log = Logging.create(LOG_BUCKET_NAME, BUCKET_NAME); BucketTemplate template = new BucketTemplate().name(BUCKET_NAME).addAcl(acl).addDefaultObjectAccessControls(oac) - .versioning(version).location(Location.US_CENTRAL2).logging(log) + .versioning(version).location(Location.US_CENTRAL1).logging(log) .storageClass(StorageClass.DURABLE_REDUCED_AVAILABILITY).addCORS(cors); Bucket response = api().createBucket(PROJECT_NUMBER, template); @@ -104,7 +104,7 @@ public class BucketApiLiveTest extends BaseGoogleCloudStorageApiLiveTest { assertNotNull(response.cors()); assertTrue(response.cors().size() == 1); assertEquals(response.name(), BUCKET_NAME); - assertEquals(response.location(), Location.US_CENTRAL2); + assertEquals(response.location(), Location.US_CENTRAL1); assertThat(response.storageClass()).isEqualTo(StorageClass.DURABLE_REDUCED_AVAILABILITY); assertTrue(response.versioning().enabled()); } @@ -197,7 +197,7 @@ public class BucketApiLiveTest extends BaseGoogleCloudStorageApiLiveTest { @Test(groups = "live", dependsOnMethods = { "testCreateBucket" }) public void testCreateAlreadyExistBucket() { - BucketTemplate template = new BucketTemplate().name(BUCKET_NAME).location(Location.US_CENTRAL2) + BucketTemplate template = new BucketTemplate().name(BUCKET_NAME).location(Location.US_CENTRAL1) .storageClass(StorageClass.DURABLE_REDUCED_AVAILABILITY); assertNull(api().createBucket(PROJECT_NUMBER, template)); @@ -212,7 +212,7 @@ public class BucketApiLiveTest extends BaseGoogleCloudStorageApiLiveTest { Versioning version = Versioning.create(true); BucketTemplate template = new BucketTemplate().name(BUCKET_NAME_WITHOPTIONS).addDefaultObjectAccessControls(oac) - .versioning(version).location(Location.US_CENTRAL2) + .versioning(version).location(Location.US_CENTRAL1) .storageClass(StorageClass.DURABLE_REDUCED_AVAILABILITY).addCORS(cors); InsertBucketOptions options = new InsertBucketOptions().projection(Projection.FULL); @@ -222,7 +222,7 @@ public class BucketApiLiveTest extends BaseGoogleCloudStorageApiLiveTest { assertNotNull(response); assertNotNull(response.cors()); assertEquals(response.name(), BUCKET_NAME_WITHOPTIONS); - assertEquals(response.location(), Location.US_CENTRAL2); + assertEquals(response.location(), Location.US_CENTRAL1); assertTrue(response.versioning().enabled()); } diff --git a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRegionListTest.java b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRegionListTest.java index 61f96b3096..e24bf4c65c 100644 --- a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRegionListTest.java +++ b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRegionListTest.java @@ -50,11 +50,11 @@ public class ParseRegionListTest extends BaseGoogleComputeEngineParseTesthttps://www.googleapis.com/compute/v1/projects/party/regions/us-central2;, +"selfLink": "https://www.googleapis.com/compute/v1/projects/party/regions/us-central1;, "id": "6396763663251190992", "creationTimestamp": "2013-07-08T14:40:37.939-07:00", -"name": "us-central2", -"description": "us-central2", +"name": "us-c
[jclouds] branch master updated (132604d71a -> ef580d4aa7)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git from 132604d71a Add missing jclouds.blobstore.httpstream.url add ef580d4aa7 Bump okio from 1.17.2 to 3.4.0 in /drivers/okhttp No new revisions were added by this update. Summary of changes: drivers/okhttp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[jclouds] branch master updated: Add missing jclouds.blobstore.httpstream.url
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 132604d71a Add missing jclouds.blobstore.httpstream.url 132604d71a is described below commit 132604d71add700b229ae78130d28935e6f52350 Author: Andrew Gaul AuthorDate: Sat Jul 29 15:30:28 2023 +0900 Add missing jclouds.blobstore.httpstream.url Lacking this caused integration test failures with newer testng. --- providers/google-cloud-storage/pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/providers/google-cloud-storage/pom.xml b/providers/google-cloud-storage/pom.xml index 3cd4e2a970..f35c3aab8d 100644 --- a/providers/google-cloud-storage/pom.xml +++ b/providers/google-cloud-storage/pom.xml @@ -145,6 +145,8 @@ 1 + ${jclouds.blobstore.httpstream.url} + ${jclouds.blobstore.httpstream.md5} ${test.google-cloud-storage.identity} ${test.google-cloud-storage.credential} ${test.jclouds.googlecloud.project-name}
[jclouds] branch master updated (2275637fb8 -> 8075bbe50a)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git from 2275637fb8 Remove bnd add 8075bbe50a JCLOUDS-1618: Upgrade to gson 2.10.1 No new revisions were added by this update. Summary of changes: core/src/main/java/org/jclouds/json/config/GsonModule.java | 4 +++- .../DeserializationConstructorAndReflectiveTypeAdapterFactory.java | 4 +++- ...eserializationConstructorAndReflectiveTypeAdapterFactoryTest.java | 5 - project/pom.xml | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-)
[jclouds] branch master updated (a00454bdd1 -> 2275637fb8)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git from a00454bdd1 Bump guava from 31.1-jre to 32.0.0-jre in /project add 2275637fb8 Remove bnd No new revisions were added by this update. Summary of changes: project/pom.xml | 27 --- 1 file changed, 27 deletions(-)
[jclouds] branch master updated (e7894e5a77 -> a00454bdd1)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git from e7894e5a77 Use a class with a File member add a00454bdd1 Bump guava from 31.1-jre to 32.0.0-jre in /project No new revisions were added by this update. Summary of changes: project/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[jclouds] branch master updated: Use a class with a File member
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new e7894e5a77 Use a class with a File member e7894e5a77 is described below commit e7894e5a775c44aca860840a6a57c3c80beee51d Author: Andrew Gaul AuthorDate: Sun Jun 11 23:04:38 2023 -0700 Use a class with a File member Using gson on a File directly breaks Java strong encapsulation. --- .../org/jclouds/rest/binders/BindToJsonPayloadTest.java | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/core/src/test/java/org/jclouds/rest/binders/BindToJsonPayloadTest.java b/core/src/test/java/org/jclouds/rest/binders/BindToJsonPayloadTest.java index 6954c361d7..6eefc2b3d0 100644 --- a/core/src/test/java/org/jclouds/rest/binders/BindToJsonPayloadTest.java +++ b/core/src/test/java/org/jclouds/rest/binders/BindToJsonPayloadTest.java @@ -23,7 +23,6 @@ import java.io.File; import org.jclouds.http.HttpRequest; import org.jclouds.json.Json; import org.jclouds.json.config.GsonModule; -import org.testng.annotations.Ignore; import org.testng.annotations.Test; import com.google.common.collect.ImmutableMap; @@ -48,15 +47,19 @@ public class BindToJsonPayloadTest { } - // TODO: fails with Failed making field 'java.io.File#path' accessible; either increase its visibility or write a custom TypeAdapter for its declaring type. - // This is serializing a File which we don't actually care about. Just pick a different type instead? - @Ignore + private static class MyFile { + private MyFile(File path) { + this.path = path; + } + private final File path; + } + @Test public void testSomethingNotAMap() throws SecurityException, NoSuchMethodException { BindToJsonPayload binder = new BindToJsonPayload(json); HttpRequest request = HttpRequest.builder().method("GET").endpoint("http://momma;).build(); - request = binder.bindToRequest(request, new File("foo")); + request = binder.bindToRequest(request, new MyFile(new File("foo"))); assertEquals(request.getPayload().getRawContent(), "{\"path\":\"foo\"}"); assertEquals(request.getPayload().getContentMetadata().getContentType(), "application/json");
[jclouds] branch master updated (39050e8fad -> db69360b5f)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git from 39050e8fad Java 9/16 strong encapsulation fixes add db69360b5f Revert "Revert "Upgrade to snakeyaml 2.0"" No new revisions were added by this update. Summary of changes: apis/byon/pom.xml | 2 +- apis/byon/src/main/java/org/jclouds/byon/domain/YamlNode.java | 3 ++- .../src/main/java/org/jclouds/byon/functions/NodesFromYamlStream.java | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-)
[jclouds] branch master updated: Java 9/16 strong encapsulation fixes
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 39050e8fad Java 9/16 strong encapsulation fixes 39050e8fad is described below commit 39050e8fadb1f9ae5373a935474f69f42ed7935a Author: Andrew Gaul AuthorDate: Sun Jun 4 17:45:43 2023 -0700 Java 9/16 strong encapsulation fixes * Remove Reflection access modification * Make some fields public so reflection can access them with strong encapsulation * Ignore test which fails due to differences in File serialization --- .../java/org/jclouds/json/config/GsonModule.java | 25 ++ .../main/java/org/jclouds/reflect/Reflection2.java | 4 core/src/test/java/org/jclouds/json/JsonTest.java | 2 +- .../lifecycle/config/LifeCycleModuleTest.java | 4 ++-- .../rest/binders/BindToJsonPayloadTest.java| 10 ++--- .../login/AdminAccessBuilderSpecTest.java | 10 ++--- 6 files changed, 42 insertions(+), 13 deletions(-) diff --git a/core/src/main/java/org/jclouds/json/config/GsonModule.java b/core/src/main/java/org/jclouds/json/config/GsonModule.java index 531f4ea0f4..0b0bde0364 100644 --- a/core/src/main/java/org/jclouds/json/config/GsonModule.java +++ b/core/src/main/java/org/jclouds/json/config/GsonModule.java @@ -19,6 +19,7 @@ package org.jclouds.json.config; import static com.google.common.io.BaseEncoding.base16; import java.beans.ConstructorProperties; +import java.io.File; import java.io.IOException; import java.lang.reflect.Type; import java.util.Date; @@ -76,6 +77,7 @@ import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonToken; import com.google.gson.stream.JsonWriter; import com.google.inject.AbstractModule; import com.google.inject.ImplementedBy; @@ -107,6 +109,8 @@ public class GsonModule extends AbstractModule { builder.registerTypeAdapter(Date.class, adapter.nullSafe()); builder.registerTypeAdapter(byte[].class, byteArrayAdapter.nullSafe()); builder.registerTypeAdapter(JsonBall.class, jsonAdapter.nullSafe()); + builder.registerTypeAdapter(File.class, new FileTypeAdapter()); + builder.registerTypeAdapterFactory(credentialsAdapterFactory); builder.registerTypeAdapterFactory(optional); builder.registerTypeAdapterFactory(iterable); @@ -313,6 +317,27 @@ public class GsonModule extends AbstractModule { } } + private static class FileTypeAdapter extends TypeAdapter { + @Override + public void write(JsonWriter out, File file) throws IOException { + if (file == null) { +out.nullValue(); + } else { +out.value(file.getPath()); + } + } + + @Override + public File read(JsonReader in) throws IOException { + if (in.peek() == JsonToken.NULL) { +in.nextNull(); +return null; + } else { +return new File(in.nextString()); + } + } + } + /** Special cases serialization for {@linkplain LoginCredentials} and normalizes all others. */ public static class CredentialsAdapterFactory extends TypeAdapter implements TypeAdapterFactory { diff --git a/core/src/main/java/org/jclouds/reflect/Reflection2.java b/core/src/main/java/org/jclouds/reflect/Reflection2.java index 8787434f6c..b5dc9e69f7 100644 --- a/core/src/main/java/org/jclouds/reflect/Reflection2.java +++ b/core/src/main/java/org/jclouds/reflect/Reflection2.java @@ -327,10 +327,6 @@ public class Reflection2 { if (raw == Object.class) continue; for (Method method : raw.getDeclaredMethods()) { - // TODO replace isAccessible() with canAccess() when using Java >= 9 - if (!method.isAccessible() && !coreJavaClass(raw)) { -method.setAccessible(true); - } builder.add(key.method(method)); } } diff --git a/core/src/test/java/org/jclouds/json/JsonTest.java b/core/src/test/java/org/jclouds/json/JsonTest.java index ed278173eb..6145f8cddd 100644 --- a/core/src/test/java/org/jclouds/json/JsonTest.java +++ b/core/src/test/java/org/jclouds/json/JsonTest.java @@ -199,7 +199,7 @@ public class JsonTest { } private static class EnumInsideWithParser { - private static enum Test { + public static enum Test { FOO, BAR, UNRECOGNIZED; @SuppressWarnings("unused") diff --git a/core/src/test/java/org/jclouds/lifecycle/config/LifeCycleModuleTest.java b/core/src/test/java/org/jclouds/lifecycle/config/LifeCycleModuleTest.java index fc4bae1e31..3753edc955
[jclouds] branch master updated (318138e6b0 -> c8ca330857)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git from 318138e6b0 Upgrade to surefire 3.1.0 add c8ca330857 Remove unneeded -XX:MaxPermSize=256m No new revisions were added by this update. Summary of changes: project/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[jclouds] branch master updated (8a3c5ae992 -> 318138e6b0)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git from 8a3c5ae992 Upgrade to EasyMock 5.1.0 add 318138e6b0 Upgrade to surefire 3.1.0 No new revisions were added by this update. Summary of changes: project/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[jclouds] branch master updated (cf4a926afe -> 8a3c5ae992)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git from cf4a926afe Revert "Upgrade to snakeyaml 2.0" add 8a3c5ae992 Upgrade to EasyMock 5.1.0 No new revisions were added by this update. Summary of changes: project/pom.xml | 5 + 1 file changed, 1 insertion(+), 4 deletions(-)
[jclouds] branch master updated: Revert "Upgrade to snakeyaml 2.0"
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new cf4a926afe Revert "Upgrade to snakeyaml 2.0" cf4a926afe is described below commit cf4a926afef2887d818c41d65a91a4a9c95a1c27 Author: Andrew Gaul AuthorDate: Wed May 10 21:30:27 2023 +0900 Revert "Upgrade to snakeyaml 2.0" This reverts commit f82e94c3374d7ced6d5a6a7d0238fe85a954ac3d. This break CI due to an unexpected Java version mismatch. --- apis/byon/pom.xml | 2 +- apis/byon/src/main/java/org/jclouds/byon/domain/YamlNode.java | 3 +-- .../src/main/java/org/jclouds/byon/functions/NodesFromYamlStream.java | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/apis/byon/pom.xml b/apis/byon/pom.xml index 17b2183310..2f8a372e12 100644 --- a/apis/byon/pom.xml +++ b/apis/byon/pom.xml @@ -70,7 +70,7 @@ org.yaml snakeyaml - 2.0 + 1.32 com.google.auto.service diff --git a/apis/byon/src/main/java/org/jclouds/byon/domain/YamlNode.java b/apis/byon/src/main/java/org/jclouds/byon/domain/YamlNode.java index 5914dd63b1..8cbbdc09da 100644 --- a/apis/byon/src/main/java/org/jclouds/byon/domain/YamlNode.java +++ b/apis/byon/src/main/java/org/jclouds/byon/domain/YamlNode.java @@ -25,7 +25,6 @@ import java.util.Map; import org.jclouds.byon.Node; import org.jclouds.util.Closeables2; import org.yaml.snakeyaml.DumperOptions; -import org.yaml.snakeyaml.LoaderOptions; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constructor.Constructor; @@ -112,7 +111,7 @@ public class YamlNode { InputStream in = null; try { in = byteSource.openStream(); -return (YamlNode) new Yaml(new Constructor(YamlNode.class, new LoaderOptions())).load(in); +return (YamlNode) new Yaml(new Constructor(YamlNode.class)).load(in); } catch (IOException ioe) { throw Throwables.propagate(ioe); } finally { diff --git a/apis/byon/src/main/java/org/jclouds/byon/functions/NodesFromYamlStream.java b/apis/byon/src/main/java/org/jclouds/byon/functions/NodesFromYamlStream.java index 4176b87a3a..18454e12f5 100644 --- a/apis/byon/src/main/java/org/jclouds/byon/functions/NodesFromYamlStream.java +++ b/apis/byon/src/main/java/org/jclouds/byon/functions/NodesFromYamlStream.java @@ -29,7 +29,6 @@ import javax.inject.Singleton; import org.jclouds.byon.Node; import org.jclouds.byon.domain.YamlNode; -import org.yaml.snakeyaml.LoaderOptions; import org.yaml.snakeyaml.TypeDescription; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constructor.Constructor; @@ -81,7 +80,7 @@ public class NodesFromYamlStream implements Function apply(ByteSource source) { - Constructor constructor = new Constructor(Config.class, new LoaderOptions()); + Constructor constructor = new Constructor(Config.class); TypeDescription nodeDesc = new TypeDescription(YamlNode.class); nodeDesc.putListPropertyType("tags", String.class);
[jclouds] branch master updated (788f75f937 -> f82e94c337)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git from 788f75f937 Replace TravisCI with GitHUb Actions add f82e94c337 Upgrade to snakeyaml 2.0 No new revisions were added by this update. Summary of changes: apis/byon/pom.xml | 2 +- apis/byon/src/main/java/org/jclouds/byon/domain/YamlNode.java | 3 ++- .../src/main/java/org/jclouds/byon/functions/NodesFromYamlStream.java | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-)
[jclouds] branch master updated: Replace TravisCI with GitHUb Actions
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 788f75f937 Replace TravisCI with GitHUb Actions 788f75f937 is described below commit 788f75f9379287e70a2e2197297cb0efd45f96f7 Author: Ignasi Barrera AuthorDate: Tue Feb 7 18:05:36 2023 +0100 Replace TravisCI with GitHUb Actions --- .travis.yml => .asf.yaml | 38 ++-- .travis.yml => .github/workflows/ci.yaml | 35 - 2 files changed, 42 insertions(+), 31 deletions(-) diff --git a/.travis.yml b/.asf.yaml similarity index 58% copy from .travis.yml copy to .asf.yaml index fc3e35b7b4..f872b6aa2f 100644 --- a/.travis.yml +++ b/.asf.yaml @@ -13,20 +13,26 @@ # See the License for the specific language governing permissions and # limitations under the License. -language: java - -env: - - LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 - -jdk: - - openjdk8 - -sudo: false -install: skip - -cache: - directories: -- $HOME/.m2 - -script: mvn clean verify checkstyle:checkstyle -B -q -Dorg.slf4j.simpleLogger.defaultLogLevel=ERROR -Pdoc,src +github: + description: The Java Multi-Cloud Toolkit + homepage: https://jclouds.apache.org/ + labels: +- java +- library +- cloud +- jclouds + # Uncomment the following lines if at some point we feel like + # we want to control merges and pull request builds. + # + # enabled_merge_buttons: + # squash: true + # merge: false + # rebase: false + # protected_branches: + # master: + # required_status_checks: + # contexts: + # - build + # required_pull_request_reviews: + # required_approving_review_count: 1 diff --git a/.travis.yml b/.github/workflows/ci.yaml similarity index 63% rename from .travis.yml rename to .github/workflows/ci.yaml index fc3e35b7b4..0655d08588 100644 --- a/.travis.yml +++ b/.github/workflows/ci.yaml @@ -13,20 +13,25 @@ # See the License for the specific language governing permissions and # limitations under the License. -language: java +name: CI -env: - - LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 - -jdk: - - openjdk8 - -sudo: false -install: skip - -cache: - directories: -- $HOME/.m2 - -script: mvn clean verify checkstyle:checkstyle -B -q -Dorg.slf4j.simpleLogger.defaultLogLevel=ERROR -Pdoc,src +on: + push: +branches: + - master + pull_request: +branches: + - master +jobs: + build: +runs-on: ubuntu-latest +steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 +with: + java-version: "8" + distribution: temurin + cache: maven + - name: Build +run: mvn clean verify checkstyle:checkstyle -B -q -Dorg.slf4j.simpleLogger.defaultLogLevel=ERROR -Pdoc,src
[jclouds] branch master updated: Lazily open parts during LocalBlobStore complete MPU
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new b7f28f1e6a Lazily open parts during LocalBlobStore complete MPU b7f28f1e6a is described below commit b7f28f1e6a2632fce579360c7900b6dc548ff25f Author: Andrew Gaul AuthorDate: Sun Jan 22 13:20:59 2023 +0900 Lazily open parts during LocalBlobStore complete MPU This removes a previous workaround for opening too many FileInputStream and exhausting rlimits. --- .../jclouds/blobstore/config/LocalBlobStore.java | 43 ++ 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java b/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java index c50a405817..abb7bd0d43 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java @@ -28,7 +28,6 @@ import static com.google.common.collect.Sets.newTreeSet; import static org.jclouds.blobstore.options.ListContainerOptions.Builder.recursive; import java.io.File; -import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; @@ -731,14 +730,8 @@ public final class LocalBlobStore implements BlobStore { Payload payload; try { InputStream is = blob.getPayload().openStream(); - if (is instanceof FileInputStream) { -// except for FileInputStream since large MPU can open too many fds -is.close(); -payload = blob.getPayload(); - } else { -blob.resetPayload(/*release=*/ false); -payload = new InputStreamPayload(is); - } + blob.resetPayload(/*release=*/ false); + payload = new InputStreamPayload(is); } catch (IOException ioe) { throw new RuntimeException(ioe); } @@ -825,16 +818,16 @@ public final class LocalBlobStore implements BlobStore { @Override public String completeMultipartUpload(MultipartUpload mpu, List parts) { - ImmutableList.Builder blobs = ImmutableList.builder(); + ImmutableList.Builder metas = ImmutableList.builder(); long contentLength = 0; Hasher md5Hasher = Hashing.md5().newHasher(); for (MultipartPart part : parts) { - Blob blobPart = getBlob(mpu.containerName(), MULTIPART_PREFIX + mpu.id() + "-" + mpu.blobName() + "-" + part.partNumber()); - contentLength += blobPart.getMetadata().getContentMetadata().getContentLength(); - blobs.add(blobPart); - if (blobPart.getMetadata().getETag() != null) { - md5Hasher.putBytes(BaseEncoding.base16().lowerCase().decode(blobPart.getMetadata().getETag())); + BlobMetadata meta = blobMetadata(mpu.containerName(), MULTIPART_PREFIX + mpu.id() + "-" + mpu.blobName() + "-" + part.partNumber()); + contentLength += meta.getContentMetadata().getContentLength(); + metas.add(meta); + if (meta.getETag() != null) { + md5Hasher.putBytes(BaseEncoding.base16().lowerCase().decode(meta.getETag())); } } String mpuETag = new StringBuilder("\"") @@ -845,7 +838,7 @@ public final class LocalBlobStore implements BlobStore { .toString(); PayloadBlobBuilder blobBuilder = blobBuilder(mpu.blobName()) .userMetadata(mpu.blobMetadata().getUserMetadata()) -.payload(new MultiBlobInputStream(blobs.build())) +.payload(new MultiBlobInputStream(this, metas.build())) .contentLength(contentLength) .eTag(mpuETag); String cacheControl = mpu.blobMetadata().getContentMetadata().getCacheControl(); @@ -995,21 +988,24 @@ public final class LocalBlobStore implements BlobStore { } private static final class MultiBlobInputStream extends InputStream { - private final Iterator blobs; + private final BlobStore blobStore; + private final Iterator metas; private InputStream current; - MultiBlobInputStream(List blobs) { - this.blobs = blobs.iterator(); + MultiBlobInputStream(BlobStore blobStore, List metas) { + this.blobStore = blobStore; + this.metas = metas.iterator(); } @Override public int read() throws IOException { while (true) { if (current == null) { - if (!blobs.hasNext()) { + if (!metas.hasNext()) { return -1; } - current = blobs.next().getPayload().openStream(); + BlobMetadata meta = metas.next(); + current = blobStore.getBlob(meta.getContainer(), meta.getName()).getPayload
[jclouds] branch master updated: Atomically replace objects in filesystem putBlob
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 12de6ef74d Atomically replace objects in filesystem putBlob 12de6ef74d is described below commit 12de6ef74db4faf93f4a4326760e183e3a82433a Author: Andrew Gaul AuthorDate: Sat Jan 21 22:49:28 2023 +0900 Atomically replace objects in filesystem putBlob Fixes gaul/s3proxy#490. This fixes a regression from 41ce90ec360a46cb7b03f7cb8b66e01a113aa5b6. Continue to support Windows logic although it is unclear if this is necessary. --- .../strategy/internal/FilesystemStorageStrategyImpl.java | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java b/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java index 8b9ada1e4a..1a58fb59d1 100644 --- a/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java +++ b/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java @@ -24,6 +24,7 @@ import static com.google.common.io.BaseEncoding.base16; import static java.nio.file.Files.createDirectories; import static java.nio.file.Files.getFileAttributeView; import static java.nio.file.Files.getPosixFilePermissions; +import static java.nio.file.Files.move; import static java.nio.file.Files.probeContentType; import static java.nio.file.Files.readAttributes; import static java.nio.file.Files.setPosixFilePermissions; @@ -44,6 +45,7 @@ import java.nio.charset.StandardCharsets; import java.nio.file.AccessDeniedException; import java.nio.file.DirectoryStream; import java.nio.file.NoSuchFileException; +import java.nio.file.StandardCopyOption; import java.nio.file.Path; import java.nio.file.attribute.BasicFileAttributes; import java.nio.file.attribute.PosixFilePermission; @@ -583,7 +585,8 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy { eTag = actualHashCode.asBytes(); } - if (outputFile.exists()) { + // TODO: is this necessary? + if (isWindows() && outputFile.exists()) { delete(outputFile); } @@ -599,9 +602,7 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy { setBlobAccess(containerName, tmpBlobName, access); - if (!tmpFile.renameTo(outputFile)) { -throw new IOException("Could not rename file " + tmpFile + " to " + outputFile); - } + move(tmpPath, outputFile.toPath(), StandardCopyOption.ATOMIC_MOVE, StandardCopyOption.REPLACE_EXISTING); tmpFile = null; return base16().lowerCase().encode(eTag);
[jclouds] branch master updated: JCLOUDS-1371: Optimize filesystem delimiter
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 62632c9db6 JCLOUDS-1371: Optimize filesystem delimiter 62632c9db6 is described below commit 62632c9db658808c14a729aa58b4364c4323e35c Author: Andrew Gaul AuthorDate: Sun Jan 22 16:44:09 2023 +0900 JCLOUDS-1371: Optimize filesystem delimiter populateBlobKeysInContainer will no longer recurse when the delimiter matches "/". This makes listing deep hierarchies with a delimiter faster. Note that the general LocalBlobStore handling is still required for the general cases. This requires removing a bogus test case. References gaul/s3proxy#473. --- .../strategy/internal/FilesystemStorageStrategyImpl.java | 15 ++- .../org/jclouds/filesystem/FilesystemBlobStoreTest.java | 15 --- .../internal/FilesystemStorageStrategyImplTest.java | 8 .../java/org/jclouds/blobstore/LocalStorageStrategy.java | 2 +- .../org/jclouds/blobstore/TransientStorageStrategy.java | 2 +- .../java/org/jclouds/blobstore/config/LocalBlobStore.java | 12 ++-- 6 files changed, 18 insertions(+), 36 deletions(-) diff --git a/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java b/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java index 92216f1b10..8b9ada1e4a 100644 --- a/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java +++ b/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java @@ -342,7 +342,7 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy { * @throws IOException */ @Override - public Iterable getBlobKeysInsideContainer(String container, String prefix) throws IOException { + public Iterable getBlobKeysInsideContainer(String container, String prefix, String delimiter) throws IOException { filesystemContainerNameValidator.validate(container); // check if container exists // TODO maybe an error is more appropriate @@ -361,7 +361,7 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy { } } - populateBlobKeysInContainer(containerFile, blobNames, prefix, new Function() { + populateBlobKeysInContainer(containerFile, blobNames, prefix, delimiter, new Function() { @Override public String apply(String string) { return denormalize(string.substring(containerPathLength)); @@ -464,6 +464,7 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy { .contentType(contentType) .expires(expires) .tier(tier) + .type(isDirectory ? StorageType.FOLDER : StorageType.BLOB) .userMetadata(userMetadata.build()); } else { builder.payload(byteSource) @@ -770,7 +771,7 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy { public long countBlobs(String container, ListContainerOptions options) { // TODO: honor options try { - return Iterables.size(getBlobKeysInsideContainer(container, null)); + return Iterables.size(getBlobKeysInsideContainer(container, null, null)); } catch (IOException ioe) { throw Throwables.propagate(ioe); } @@ -981,7 +982,7 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy { } private static void populateBlobKeysInContainer(File directory, Set blobNames, - String prefix, Function function) { + String prefix, String delimiter, Function function) { File[] children = directory.listFiles(); if (children == null) { return; @@ -1001,7 +1002,11 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy { continue; } blobNames.add(fullPath + File.separator); // TODO: undo if failures -populateBlobKeysInContainer(child, blobNames, prefix, function); +// Skip recursion if the delimiter tells us not to return children. +if (delimiter != null && delimiter.equals("/")) { + continue; +} +populateBlobKeysInContainer(child, blobNames, prefix, delimiter, function); } } } diff --git a/apis/filesystem/src/test/java/org/jclouds/filesystem/FilesystemBlobStoreTest.java b/apis/filesystem/src/test/java/org/jclouds/filesystem/FilesystemBlobStoreTest.java index 71dd4e7bfa..46550eb0ad 100644 --- a/apis/filesystem/src/test/java/org/jclouds/filesystem/FilesystemBlobStoreTest.java +++ b/apis/filesyst
[jclouds] branch master updated: JCLOUDS-1371: JCLOUDS-1488: optimize fs prefix
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new e478dd5452 JCLOUDS-1371: JCLOUDS-1488: optimize fs prefix e478dd5452 is described below commit e478dd5452d70a5ea2082337b05ad91f331f0eb6 Author: Andrew Gaul AuthorDate: Mon Dec 26 15:39:27 2022 +0900 JCLOUDS-1371: JCLOUDS-1488: optimize fs prefix This reduces the number of stat calls required when prefix is deep in the filesystem hierarchy. Further optimizations to delimiter are possible. References gaul/s3proxy#473. --- .../strategy/internal/FilesystemStorageStrategyImpl.java | 8 1 file changed, 8 insertions(+) diff --git a/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java b/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java index f34b3aaf7c..92216f1b10 100644 --- a/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java +++ b/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java @@ -353,6 +353,14 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy { File containerFile = openFolder(container); final int containerPathLength = containerFile.getAbsolutePath().length() + 1; + if (prefix != null) { + // prefix may end with a partial directory so only list the complete parent + int index = prefix.lastIndexOf('/'); + if (index != -1) { +containerFile = new File(containerFile, prefix.substring(0, index + 1)); + } + } + populateBlobKeysInContainer(containerFile, blobNames, prefix, new Function() { @Override public String apply(String string) {
[jclouds-site] branch master updated: Use $(CURDIR) instead of ${PWD}
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds-site.git The following commit(s) were added to refs/heads/master by this push: new 37efc93 Use $(CURDIR) instead of ${PWD} 37efc93 is described below commit 37efc93be68074fae399e0a63b2bfe8c184997a7 Author: Andrew Gaul AuthorDate: Sun Dec 25 13:45:13 2022 +0900 Use $(CURDIR) instead of ${PWD} The latter may may not be set. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e8ba9c5..44fc73e 100644 --- a/Makefile +++ b/Makefile @@ -5,11 +5,11 @@ image: ## Build the Docker image with all requirements to build and publish the docker build -t $(IMAGE) . build: ## Build and run the site locally - docker run --rm -v "${PWD}:$(MOUNTPOINT)" -p 4000:4000 $(IMAGE) jekyll serve --safe --port 4000 + docker run --rm -v "$(CURDIR):$(MOUNTPOINT)" -p 4000:4000 $(IMAGE) jekyll serve --safe --port 4000 publish: ## Publish the site to https://jclouds.apache.org rm -rf site-content - docker run --rm -ti -v "${PWD}:$(MOUNTPOINT)" $(IMAGE) bash deploy-site.sh + docker run --rm -ti -v "$(CURDIR):$(MOUNTPOINT)" $(IMAGE) bash deploy-site.sh help: ## Display this help @awk 'BEGIN {FS = ":.*##"; printf "Usage:\nmake \033[36m\033[0m\n\nAvailable targets:\n"} \
svn commit: r1906202 [6/7] - in /jclouds/site-content: ./ blog/ blog/2009/05/11/jclouds-s3-beta-released/ blog/2009/05/13/catching-exceptions-with-less-keystrokes/ blog/2011/10/18/jclouds-1-2-released
Modified: jclouds/site-content/releasenotes/atom.xml URL: http://svn.apache.org/viewvc/jclouds/site-content/releasenotes/atom.xml?rev=1906202=1906201=1906202=diff == --- jclouds/site-content/releasenotes/atom.xml (original) +++ jclouds/site-content/releasenotes/atom.xml Sun Dec 25 04:48:57 2022 @@ -321,31 +321,25 @@ You can https://s.apache.org/jc https://jclouds.apache.org/releasenotes/2.2.1/"/> 2020-05-14T00:00:00Z - @@ -410,33 +394,27 @@ make sure they will have continuity. https://jclouds.apache.org/releasenotes/2.2.0/"/> 2019-10-21T00:00:00Z - @@ -625,32 +591,26 @@ make sure they will have continuity. https://jclouds.apache.org/releasenotes/2.1.3/"/> 2019-10-21T00:00:00Z - @@ -734,96 +682,79 @@ make sure they will have continuity. https://jclouds.apache.org/releasenotes/2.1.2/"/> 2019-02-06T00:00:00Z - @@ -832,92 +763,74 @@ You can https://s.apache.org/jc https://jclouds.apache.org/releasenotes/2.1.1/"/> 2018-08-16T00:00:00Z - @@ -926,93 +839,76 @@ You can https://s.apache.org/jc https://jclouds.apache.org/releasenotes/2.1.0/"/> 2018-02-21T00:00:00Z - @@ -1022,79 +918,64 @@ You can https://s.apache.org/jc https://jclouds.apache.org/releasenotes/2.0.3/"/> 2017-11-30T00:00:00Z - @@ -1103,90 +984,75 @@ You can https://s.apache.org/jc https://jclouds.apache.org/releasenotes/2.0.2/"/> 2017-07-06T00:00:00Z - @@ -1195,83 +1061,65 @@ You can https://s.apache.org/jc https://jclouds.apache.org/releasenotes/2.0.1/"/> 2017-02-27T00:00:00Z - @@ -1280,109 +1128,82 @@ You can https://s.apache.org/jc https://jclouds.apache.org/releasenotes/2.0.0/"/> 2016-11-15T00:00:00Z -
svn commit: r1906202 [4/7] - in /jclouds/site-content: ./ blog/ blog/2009/05/11/jclouds-s3-beta-released/ blog/2009/05/13/catching-exceptions-with-less-keystrokes/ blog/2011/10/18/jclouds-1-2-released
Modified: jclouds/site-content/reference/javadoc/index.html URL: http://svn.apache.org/viewvc/jclouds/site-content/reference/javadoc/index.html?rev=1906202=1906201=1906202=diff == --- jclouds/site-content/reference/javadoc/index.html (original) +++ jclouds/site-content/reference/javadoc/index.html Sun Dec 25 04:48:57 2022 @@ -63,7 +63,7 @@ Core Concepts ComputeService BlobStore -http://github.com/apache/jclouds-examples;>Examples +https://github.com/apache/jclouds-examples;>Examples @@ -96,12 +96,12 @@ About Apache -http://www.apache.org;>The Apache Software Foundation -http://www.apache.org/licenses/;>License -http://www.apache.org/foundation/contributing.html;>Donations -http://www.apache.org/foundation/sponsorship.html;>Sponsorship -http://www.apache.org/security/;>Security -http://www.apache.org/foundation/thanks.html;>Thanks +https://www.apache.org;>The Apache Software Foundation +https://www.apache.org/licenses/;>License +https://www.apache.org/foundation/contributing.html;>Donations +https://www.apache.org/foundation/sponsorship.html;>Sponsorship +https://www.apache.org/security/;>Security +https://www.apache.org/foundation/thanks.html;>Thanks Apache Events https://www.apache.org/events/current-event.html;>https://www.apache.org/events/current-event-234x60.png"/> @@ -200,7 +200,7 @@ - Copyright 2011-2014 http://www.apache.org;>The Apache Software Foundation. All Rights Reserved. + Copyright 2011-2014 https://www.apache.org;>The Apache Software Foundation. All Rights Reserved. https://privacy.apache.org/policies/privacy-policy-public.html;>Privacy policy. Modified: jclouds/site-content/reference/logging/index.html URL: http://svn.apache.org/viewvc/jclouds/site-content/reference/logging/index.html?rev=1906202=1906201=1906202=diff == --- jclouds/site-content/reference/logging/index.html (original) +++ jclouds/site-content/reference/logging/index.html Sun Dec 25 04:48:57 2022 @@ -63,7 +63,7 @@ Core Concepts ComputeService BlobStore -http://github.com/apache/jclouds-examples;>Examples +https://github.com/apache/jclouds-examples;>Examples @@ -96,12 +96,12 @@ About Apache -http://www.apache.org;>The Apache Software Foundation -http://www.apache.org/licenses/;>License -http://www.apache.org/foundation/contributing.html;>Donations -http://www.apache.org/foundation/sponsorship.html;>Sponsorship -http://www.apache.org/security/;>Security -http://www.apache.org/foundation/thanks.html;>Thanks +https://www.apache.org;>The Apache Software Foundation +https://www.apache.org/licenses/;>License +https://www.apache.org/foundation/contributing.html;>Donations +https://www.apache.org/foundation/sponsorship.html;>Sponsorship +https://www.apache.org/security/;>Security +https://www.apache.org/foundation/thanks.html;>Thanks Apache Events https://www.apache.org/events/current-event.html;>https://www.apache.org/events/current-event-234x60.png"/> @@ -163,7 +163,7 @@ Install Logging -http://www.slf4j.org/;>SLF4J is the logging facade for jclouds. To use SLF4J you need the jclouds-slf4j-X.X.X.jar and the implementation logback-*.jar (http://logback.qos.ch/download.html;>download) files on your classpath. To get them via Maven add the following dependencies to your pom.xml file. +https://www.slf4j.org/;>SLF4J is the logging facade for jclouds. To use SLF4J you need the jclouds-slf4j-X.X.X.jar and the implementation logback-*.jar (https://logback.qos.ch/download.html;>download) files on your classpath. To get them via Maven add the following dependencies to your pom.xml
svn commit: r1906202 [1/7] - in /jclouds/site-content: ./ blog/ blog/2009/05/11/jclouds-s3-beta-released/ blog/2009/05/13/catching-exceptions-with-less-keystrokes/ blog/2011/10/18/jclouds-1-2-released
Author: gaul Date: Sun Dec 25 04:48:57 2022 New Revision: 1906202 URL: http://svn.apache.org/viewvc?rev=1906202=rev Log: deploy jclouds site content Modified: jclouds/site-content/Dockerfile jclouds/site-content/Makefile jclouds/site-content/README.md jclouds/site-content/blog/2009/05/11/jclouds-s3-beta-released/index.html jclouds/site-content/blog/2009/05/13/catching-exceptions-with-less-keystrokes/index.html jclouds/site-content/blog/2011/10/18/jclouds-1-2-released/index.html jclouds/site-content/blog/2012/01/17/jclouds-training-and-jfokus-stockholm/index.html jclouds/site-content/blog/2012/01/21/jclouds-1-3-released/index.html jclouds/site-content/blog/2012/03/09/ec2-gets-rid-of-that-if-instancetype-is32bit/index.html jclouds/site-content/blog/2012/03/23/take-a-peek-at-vcloud-director-1-5-openstack-and/index.html jclouds/site-content/blog/2012/05/02/new-toys-in-1-5-0-alpha-6/index.html jclouds/site-content/blog/2012/07/16/fluency-for-paginated-api-lists/index.html jclouds/site-content/blog/2012/09/28/jclouds-1-5-is-out/index.html jclouds/site-content/blog/2012/11/09/500-jclouds-builds-on-buildhive-and-counting/index.html jclouds/site-content/blog/2012/11/17/jclouds-1-5-3-out-the-door/index.html jclouds/site-content/blog/2012/12/12/jclouds-1-5-4-mistletoe-released/index.html jclouds/site-content/blog/2013/04/28/jclouds-1-6-0-released/index.html jclouds/site-content/blog/2013/05/13/jclouds-at-gluecon-2013/index.html jclouds/site-content/blog/2014/03/03/joining-the-asf-new-site-and-jclouds-1-7/index.html jclouds/site-content/blog/2014/03/04/jclouds-meetup/index.html jclouds/site-content/blog/2014/04/23/gsoc/index.html jclouds/site-content/blog/2014/06/25/walk-n-doc/index.html jclouds/site-content/blog/2014/07/30/walk-n-doc-ignite/index.html jclouds/site-content/blog/2014/08/04/1-release-2-committers/index.html jclouds/site-content/blog/2014/09/03/better-builders/index.html jclouds/site-content/blog/2014/09/23/google-summer-of-code-2014-results/index.html jclouds/site-content/blog/2014/10/19/apachecon-eu/index.html jclouds/site-content/blog/2014/10/25/poodle-and-jclouds/index.html jclouds/site-content/blog/2016/08/22/arbitrary-cpu-ram/index.html jclouds/site-content/blog/2018/01/16/keystone-v3/index.html jclouds/site-content/blog/2018/02/06/nova-neutron/index.html jclouds/site-content/blog/atom.xml jclouds/site-content/blog/index.html jclouds/site-content/blog/page2/index.html jclouds/site-content/blog/page3/index.html jclouds/site-content/blog/page4/index.html jclouds/site-content/blog/page5/index.html jclouds/site-content/blog/page6/index.html jclouds/site-content/community/index.html jclouds/site-content/community/users/index.html jclouds/site-content/guides/aws-ebs/index.html jclouds/site-content/guides/aws-ec2/index.html jclouds/site-content/guides/aws-s3/index.html jclouds/site-content/guides/aws-sqs/index.html jclouds/site-content/guides/aws/index.html jclouds/site-content/guides/azure-storage/index.html jclouds/site-content/guides/chef/index.html jclouds/site-content/guides/cloudsigma/index.html jclouds/site-content/guides/dimensiondata/index.html jclouds/site-content/guides/docker/index.html jclouds/site-content/guides/filesystem/index.html jclouds/site-content/guides/glacier/index.html jclouds/site-content/guides/go-grid/index.html jclouds/site-content/guides/google/index.html jclouds/site-content/guides/index.html jclouds/site-content/guides/jdbc/index.html jclouds/site-content/guides/karaf/index.html jclouds/site-content/guides/openstack/index.html jclouds/site-content/guides/profitbricks/index.html jclouds/site-content/guides/rackspace/index.html jclouds/site-content/guides/softlayer/index.html jclouds/site-content/index.html jclouds/site-content/news/gsoc2014/index.html jclouds/site-content/reference/configuration/index.html jclouds/site-content/reference/javadoc/index.html jclouds/site-content/reference/logging/index.html jclouds/site-content/reference/providers/index.html jclouds/site-content/reference/report-a-bug/index.html jclouds/site-content/reference/troubleshooting/index.html jclouds/site-content/releasenotes/1.1.0/index.html jclouds/site-content/releasenotes/1.1.1/index.html jclouds/site-content/releasenotes/1.2.2/index.html jclouds/site-content/releasenotes/1.2/index.html jclouds/site-content/releasenotes/1.3.1/index.html jclouds/site-content/releasenotes/1.4.1/index.html jclouds/site-content/releasenotes/1.5-tests/index.html jclouds/site-content/releasenotes/1.5/index.html jclouds/site-content/releasenotes/1.6-tests/index.html jclouds/site-content/releasenotes/1.6.1/index.html jclouds/site-content/releasenotes/1.6.2-tests/index.html jclouds/site
svn commit: r1906202 [3/7] - in /jclouds/site-content: ./ blog/ blog/2009/05/11/jclouds-s3-beta-released/ blog/2009/05/13/catching-exceptions-with-less-keystrokes/ blog/2011/10/18/jclouds-1-2-released
Modified: jclouds/site-content/guides/azure-storage/index.html URL: http://svn.apache.org/viewvc/jclouds/site-content/guides/azure-storage/index.html?rev=1906202=1906201=1906202=diff == --- jclouds/site-content/guides/azure-storage/index.html (original) +++ jclouds/site-content/guides/azure-storage/index.html Sun Dec 25 04:48:57 2022 @@ -63,7 +63,7 @@ Core Concepts ComputeService BlobStore -http://github.com/apache/jclouds-examples;>Examples +https://github.com/apache/jclouds-examples;>Examples @@ -96,12 +96,12 @@ About Apache -http://www.apache.org;>The Apache Software Foundation -http://www.apache.org/licenses/;>License -http://www.apache.org/foundation/contributing.html;>Donations -http://www.apache.org/foundation/sponsorship.html;>Sponsorship -http://www.apache.org/security/;>Security -http://www.apache.org/foundation/thanks.html;>Thanks +https://www.apache.org;>The Apache Software Foundation +https://www.apache.org/licenses/;>License +https://www.apache.org/foundation/contributing.html;>Donations +https://www.apache.org/foundation/sponsorship.html;>Sponsorship +https://www.apache.org/security/;>Security +https://www.apache.org/foundation/thanks.html;>Thanks Apache Events https://www.apache.org/events/current-event.html;>https://www.apache.org/events/current-event-234x60.png"/> @@ -150,7 +150,7 @@ Azure Storage Service: Getting Started Guide -Sign up for an http://www.microsoft.com/windowsazure/offers/;>Azure Account +Sign up for an https://www.microsoft.com/windowsazure/offers/;>Azure Account Get your account and key @@ -296,7 +296,7 @@ In step 3, note the service principal ID - Copyright 2011-2014 http://www.apache.org;>The Apache Software Foundation. All Rights Reserved. + Copyright 2011-2014 https://www.apache.org;>The Apache Software Foundation. All Rights Reserved. https://privacy.apache.org/policies/privacy-policy-public.html;>Privacy policy. Modified: jclouds/site-content/guides/chef/index.html URL: http://svn.apache.org/viewvc/jclouds/site-content/guides/chef/index.html?rev=1906202=1906201=1906202=diff == --- jclouds/site-content/guides/chef/index.html (original) +++ jclouds/site-content/guides/chef/index.html Sun Dec 25 04:48:57 2022 @@ -63,7 +63,7 @@ Core Concepts ComputeService BlobStore -http://github.com/apache/jclouds-examples;>Examples +https://github.com/apache/jclouds-examples;>Examples @@ -96,12 +96,12 @@ About Apache -http://www.apache.org;>The Apache Software Foundation -http://www.apache.org/licenses/;>License -http://www.apache.org/foundation/contributing.html;>Donations -http://www.apache.org/foundation/sponsorship.html;>Sponsorship -http://www.apache.org/security/;>Security -http://www.apache.org/foundation/thanks.html;>Thanks +https://www.apache.org;>The Apache Software Foundation +https://www.apache.org/licenses/;>License +https://www.apache.org/foundation/contributing.html;>Donations +https://www.apache.org/foundation/sponsorship.html;>Sponsorship +https://www.apache.org/security/;>Security +https://www.apache.org/foundation/thanks.html;>Thanks Apache Events https://www.apache.org/events/current-event.html;>https://www.apache.org/events/current-event-234x60.png"/> @@ -281,7 +281,7 @@ Here is the overall process: Write a single shell script that does the following: -Installs Ruby and Chef Gems using the same process as http://docs.opscode.com/knife_bootstrap.html;>Knife Bootstrap +Installs Ruby and Chef Gems using the same process as
svn commit: r1906202 [2/7] - in /jclouds/site-content: ./ blog/ blog/2009/05/11/jclouds-s3-beta-released/ blog/2009/05/13/catching-exceptions-with-less-keystrokes/ blog/2011/10/18/jclouds-1-2-released
Modified: jclouds/site-content/blog/2014/07/30/walk-n-doc-ignite/index.html URL: http://svn.apache.org/viewvc/jclouds/site-content/blog/2014/07/30/walk-n-doc-ignite/index.html?rev=1906202=1906201=1906202=diff == --- jclouds/site-content/blog/2014/07/30/walk-n-doc-ignite/index.html (original) +++ jclouds/site-content/blog/2014/07/30/walk-n-doc-ignite/index.html Sun Dec 25 04:48:57 2022 @@ -63,7 +63,7 @@ Core Concepts ComputeService BlobStore -http://github.com/apache/jclouds-examples;>Examples +https://github.com/apache/jclouds-examples;>Examples @@ -96,12 +96,12 @@ About Apache -http://www.apache.org;>The Apache Software Foundation -http://www.apache.org/licenses/;>License -http://www.apache.org/foundation/contributing.html;>Donations -http://www.apache.org/foundation/sponsorship.html;>Sponsorship -http://www.apache.org/security/;>Security -http://www.apache.org/foundation/thanks.html;>Thanks +https://www.apache.org;>The Apache Software Foundation +https://www.apache.org/licenses/;>License +https://www.apache.org/foundation/contributing.html;>Donations +https://www.apache.org/foundation/sponsorship.html;>Sponsorship +https://www.apache.org/security/;>Security +https://www.apache.org/foundation/thanks.html;>Thanks Apache Events https://www.apache.org/events/current-event.html;>https://www.apache.org/events/current-event-234x60.png"/> @@ -173,8 +173,8 @@ var disqus_shortname = 'jclouds'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); -Please enable JavaScript to view the http://disqus.com/?ref_noscript;>Comments powered by Disqus. -http://disqus.com; class="dsq-brlink">Comments powered by Disqus +Please enable JavaScript to view the https://disqus.com/?ref_noscript;>Comments powered by Disqus. +https://disqus.com; class="dsq-brlink">Comments powered by Disqus @@ -218,7 +218,7 @@ var disqus_shortname = 'jclouds'; - Copyright 2011-2014 http://www.apache.org;>The Apache Software Foundation. All Rights Reserved. + Copyright 2011-2014 https://www.apache.org;>The Apache Software Foundation. All Rights Reserved. https://privacy.apache.org/policies/privacy-policy-public.html;>Privacy policy. Modified: jclouds/site-content/blog/2014/08/04/1-release-2-committers/index.html URL: http://svn.apache.org/viewvc/jclouds/site-content/blog/2014/08/04/1-release-2-committers/index.html?rev=1906202=1906201=1906202=diff == --- jclouds/site-content/blog/2014/08/04/1-release-2-committers/index.html (original) +++ jclouds/site-content/blog/2014/08/04/1-release-2-committers/index.html Sun Dec 25 04:48:57 2022 @@ -63,7 +63,7 @@ Core Concepts ComputeService BlobStore -http://github.com/apache/jclouds-examples;>Examples +https://github.com/apache/jclouds-examples;>Examples @@ -96,12 +96,12 @@ About Apache -http://www.apache.org;>The Apache Software Foundation -http://www.apache.org/licenses/;>License -http://www.apache.org/foundation/contributing.html;>Donations -http://www.apache.org/foundation/sponsorship.html;>Sponsorship -http://www.apache.org/security/;>Security -http://www.apache.org/foundation/thanks.html;>Thanks +https://www.apache.org;>The Apache Software Foundation +https://www.apache.org/licenses/;>License +https://www.apache.org/foundation/contributing.html;>Donations +https://www.apache.org/foundation/sponsorship.html;>Sponsorship +https://www.apache.org/security/;>Security +https://www.apache.org/foundation/thanks.html;>Thanks Apache Events
svn commit: r1906202 [5/7] - in /jclouds/site-content: ./ blog/ blog/2009/05/11/jclouds-s3-beta-released/ blog/2009/05/13/catching-exceptions-with-less-keystrokes/ blog/2011/10/18/jclouds-1-2-released
Modified: jclouds/site-content/releasenotes/1.8.1/index.html URL: http://svn.apache.org/viewvc/jclouds/site-content/releasenotes/1.8.1/index.html?rev=1906202=1906201=1906202=diff == --- jclouds/site-content/releasenotes/1.8.1/index.html (original) +++ jclouds/site-content/releasenotes/1.8.1/index.html Sun Dec 25 04:48:57 2022 @@ -63,7 +63,7 @@ Core Concepts ComputeService BlobStore -http://github.com/apache/jclouds-examples;>Examples +https://github.com/apache/jclouds-examples;>Examples @@ -96,12 +96,12 @@ About Apache -http://www.apache.org;>The Apache Software Foundation -http://www.apache.org/licenses/;>License -http://www.apache.org/foundation/contributing.html;>Donations -http://www.apache.org/foundation/sponsorship.html;>Sponsorship -http://www.apache.org/security/;>Security -http://www.apache.org/foundation/thanks.html;>Thanks +https://www.apache.org;>The Apache Software Foundation +https://www.apache.org/licenses/;>License +https://www.apache.org/foundation/contributing.html;>Donations +https://www.apache.org/foundation/sponsorship.html;>Sponsorship +https://www.apache.org/security/;>Security +https://www.apache.org/foundation/thanks.html;>Thanks Apache Events https://www.apache.org/events/current-event.html;>https://www.apache.org/events/current-event-234x60.png"/> @@ -266,7 +266,7 @@ - Copyright 2011-2014 http://www.apache.org;>The Apache Software Foundation. All Rights Reserved. + Copyright 2011-2014 https://www.apache.org;>The Apache Software Foundation. All Rights Reserved. https://privacy.apache.org/policies/privacy-policy-public.html;>Privacy policy. Modified: jclouds/site-content/releasenotes/1.9.0/index.html URL: http://svn.apache.org/viewvc/jclouds/site-content/releasenotes/1.9.0/index.html?rev=1906202=1906201=1906202=diff == --- jclouds/site-content/releasenotes/1.9.0/index.html (original) +++ jclouds/site-content/releasenotes/1.9.0/index.html Sun Dec 25 04:48:57 2022 @@ -63,7 +63,7 @@ Core Concepts ComputeService BlobStore -http://github.com/apache/jclouds-examples;>Examples +https://github.com/apache/jclouds-examples;>Examples @@ -96,12 +96,12 @@ About Apache -http://www.apache.org;>The Apache Software Foundation -http://www.apache.org/licenses/;>License -http://www.apache.org/foundation/contributing.html;>Donations -http://www.apache.org/foundation/sponsorship.html;>Sponsorship -http://www.apache.org/security/;>Security -http://www.apache.org/foundation/thanks.html;>Thanks +https://www.apache.org;>The Apache Software Foundation +https://www.apache.org/licenses/;>License +https://www.apache.org/foundation/contributing.html;>Donations +https://www.apache.org/foundation/sponsorship.html;>Sponsorship +https://www.apache.org/security/;>Security +https://www.apache.org/foundation/thanks.html;>Thanks Apache Events https://www.apache.org/events/current-event.html;>https://www.apache.org/events/current-event-234x60.png"/> @@ -282,7 +282,7 @@ - Copyright 2011-2014 http://www.apache.org;>The Apache Software Foundation. All Rights Reserved. + Copyright 2011-2014 https://www.apache.org;>The Apache Software Foundation. All Rights Reserved. https://privacy.apache.org/policies/privacy-policy-public.html;>Privacy policy. Modified: jclouds/site-content/releasenotes/1.9.1/index.html URL: http://svn.apache.org/viewvc/jclouds/site-content/releasenotes/1.9.1/index.html?rev=1906202=1906201=1906202=diff
svn commit: r1906202 [7/7] - in /jclouds/site-content: ./ blog/ blog/2009/05/11/jclouds-s3-beta-released/ blog/2009/05/13/catching-exceptions-with-less-keystrokes/ blog/2011/10/18/jclouds-1-2-released
Modified: jclouds/site-content/releasenotes/beta7.html URL: http://svn.apache.org/viewvc/jclouds/site-content/releasenotes/beta7.html?rev=1906202=1906201=1906202=diff == --- jclouds/site-content/releasenotes/beta7.html (original) +++ jclouds/site-content/releasenotes/beta7.html Sun Dec 25 04:48:57 2022 @@ -63,7 +63,7 @@ Core Concepts ComputeService BlobStore -http://github.com/apache/jclouds-examples;>Examples +https://github.com/apache/jclouds-examples;>Examples @@ -96,12 +96,12 @@ About Apache -http://www.apache.org;>The Apache Software Foundation -http://www.apache.org/licenses/;>License -http://www.apache.org/foundation/contributing.html;>Donations -http://www.apache.org/foundation/sponsorship.html;>Sponsorship -http://www.apache.org/security/;>Security -http://www.apache.org/foundation/thanks.html;>Thanks +https://www.apache.org;>The Apache Software Foundation +https://www.apache.org/licenses/;>License +https://www.apache.org/foundation/contributing.html;>Donations +https://www.apache.org/foundation/sponsorship.html;>Sponsorship +https://www.apache.org/security/;>Security +https://www.apache.org/foundation/thanks.html;>Thanks Apache Events https://www.apache.org/events/current-event.html;>https://www.apache.org/events/current-event-234x60.png"/> @@ -257,7 +257,7 @@ Generally, os64bit(true) re - Copyright 2011-2014 http://www.apache.org;>The Apache Software Foundation. All Rights Reserved. + Copyright 2011-2014 https://www.apache.org;>The Apache Software Foundation. All Rights Reserved. https://privacy.apache.org/policies/privacy-policy-public.html;>Privacy policy. Modified: jclouds/site-content/releasenotes/beta8.html URL: http://svn.apache.org/viewvc/jclouds/site-content/releasenotes/beta8.html?rev=1906202=1906201=1906202=diff == --- jclouds/site-content/releasenotes/beta8.html (original) +++ jclouds/site-content/releasenotes/beta8.html Sun Dec 25 04:48:57 2022 @@ -63,7 +63,7 @@ Core Concepts ComputeService BlobStore -http://github.com/apache/jclouds-examples;>Examples +https://github.com/apache/jclouds-examples;>Examples @@ -96,12 +96,12 @@ About Apache -http://www.apache.org;>The Apache Software Foundation -http://www.apache.org/licenses/;>License -http://www.apache.org/foundation/contributing.html;>Donations -http://www.apache.org/foundation/sponsorship.html;>Sponsorship -http://www.apache.org/security/;>Security -http://www.apache.org/foundation/thanks.html;>Thanks +https://www.apache.org;>The Apache Software Foundation +https://www.apache.org/licenses/;>License +https://www.apache.org/foundation/contributing.html;>Donations +https://www.apache.org/foundation/sponsorship.html;>Sponsorship +https://www.apache.org/security/;>Security +https://www.apache.org/foundation/thanks.html;>Thanks Apache Events https://www.apache.org/events/current-event.html;>https://www.apache.org/events/current-event-234x60.png"/> @@ -246,7 +246,7 @@ to run scripts without ever knowing the - Copyright 2011-2014 http://www.apache.org;>The Apache Software Foundation. All Rights Reserved. + Copyright 2011-2014 https://www.apache.org;>The Apache Software Foundation. All Rights Reserved. https://privacy.apache.org/policies/privacy-policy-public.html;>Privacy policy. Modified: jclouds/site-content/releasenotes/index.html URL: http://svn.apache.org/viewvc/jclouds/site-content/releasenotes/index.html?rev=1906202=1906201=1906202=diff
[jclouds-site] branch master updated: Add --force-yes for expired Debian 8 certificate
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds-site.git The following commit(s) were added to refs/heads/master by this push: new 69a7b51 Add --force-yes for expired Debian 8 certificate 69a7b51 is described below commit 69a7b51e85b3680182a4a048d6fc2097dd9d6e47 Author: Andrew Gaul AuthorDate: Fri Dec 23 08:48:09 2022 +0900 Add --force-yes for expired Debian 8 certificate --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7bc1f5b..a4e4963 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM ruby:2.2.5 RUN apt-get update && \ -apt-get install -y rsync +apt-get install -y --force-yes rsync RUN gem install ffi -v 1.12.2 && \ gem install jekyll -v 1.5.1 && \
[jclouds-site] branch master updated: Simplify deploying javadoc
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds-site.git The following commit(s) were added to refs/heads/master by this push: new 98d34b1 Simplify deploying javadoc 98d34b1 is described below commit 98d34b1185cd3a8fb8703367a76f5dd550ba4aa4 Author: Andrew Gaul AuthorDate: Fri Dec 23 08:44:45 2022 +0900 Simplify deploying javadoc Curiously this does not publish jclouds-labs. --- deploy-javadoc.sh | 18 +- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/deploy-javadoc.sh b/deploy-javadoc.sh index 0653779..989c9eb 100755 --- a/deploy-javadoc.sh +++ b/deploy-javadoc.sh @@ -22,7 +22,7 @@ JCLOUDS_VERSION_X=`echo $JCLOUDS_VERSION | cut -c 1-3 | awk '{print $1".x"}'` cd $TMPDIR -for name in jclouds jclouds-labs-openstack; do +for name in jclouds; do rm -rf ${name} git clone --branch rel/${name}-${JCLOUDS_VERSION} --depth 1 https://git-wip-us.apache.org/repos/asf/${name}.git cd ${name} @@ -30,22 +30,6 @@ for name in jclouds jclouds-labs-openstack; do cd .. done -apis="openstack-glance openstack-marconi rackspace-autoscale" - -for api in ${apis}; do - mv jclouds-labs-openstack/${api} jclouds/apis/ - sed "s#route53#route53${api}#g" < jclouds/apis/pom.xml > tmp - mv tmp jclouds/apis/pom.xml -done - -providers="rackspace-autoscale-us rackspace-cloudqueues-us rackspace-cloudqueues-uk" - -for provider in ${providers}; do - mv jclouds-labs-openstack/${provider} jclouds/providers/ - sed "s#dynect#dynect${provider}#g" < jclouds/providers/pom.xml > tmp - mv tmp jclouds/providers/pom.xml -done - cd jclouds mvn -Pdoc clean javadoc:aggregate -Dnotimestamp=true -DadditionalJOption=-J-Xmx512m
[jclouds-site] branch master updated: Update some links to https
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds-site.git The following commit(s) were added to refs/heads/master by this push: new c180e8e Update some links to https c180e8e is described below commit c180e8e58d0d0396d48ed7695e77cebd1197eb4a Author: Arnout Engelen AuthorDate: Wed Dec 21 14:43:52 2022 +0100 Update some links to https --- README.md| 2 +- _includes/apachecon.html | 2 +- _includes/disqus.html| 4 +-- _includes/footer.html| 2 +- _includes/navbar.html| 14 +-- blog/atom.xml| 2 +- community/users.md | 60 ++-- guides/aws-ec2.md| 2 +- guides/azure-storage.md | 2 +- guides/chef.md | 2 +- guides/cloudsigma.md | 4 +-- guides/dimensiondata.md | 2 +- guides/docker.md | 4 +-- guides/glacier.md| 6 ++--- guides/go-grid.md| 2 +- guides/google.md | 2 +- guides/karaf.md | 6 ++--- guides/openstack.md | 16 ++-- guides/profitbricks.md | 6 ++--- guides/rackspace.md | 30 +++--- guides/softlayer.md | 4 +-- news/00-gsoc2014.md | 4 +-- reference/logging.md | 4 +-- reference/providers.md | 18 ++--- reference/troubleshooting.md | 6 ++--- start/blobstore.md | 14 +-- start/concepts.md| 2 +- start/install.md | 8 +++--- start/what-is-jclouds.md | 4 +-- 29 files changed, 117 insertions(+), 117 deletions(-) diff --git a/README.md b/README.md index d820692..c4de409 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Apache jclouds -This repository supports the GitHub Pages site for jclouds. See and read more at [http://www.jclouds.org](http://www.jclouds.org). +This repository supports the GitHub Pages site for jclouds. See and read more at [https://www.jclouds.org](https://www.jclouds.org). To test the site locally you will need to create the site build image with: diff --git a/_includes/apachecon.html b/_includes/apachecon.html index bbaaca2..00fa221 100644 --- a/_includes/apachecon.html +++ b/_includes/apachecon.html @@ -1,7 +1,7 @@ https://www.apache.org/events/current-event.html;> -http://apachecon.com/acna18/banners/acna-large-standard.png"/> +https://apachecon.com/acna18/banners/acna-large-standard.png"/> ApacheCon North America is coming to Montral! ApacheCon is the premier community event of the Apache Software Foundation. diff --git a/_includes/disqus.html b/_includes/disqus.html index b6d7eff..49c34b8 100644 --- a/_includes/disqus.html +++ b/_includes/disqus.html @@ -8,5 +8,5 @@ var disqus_shortname = 'jclouds'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); -Please enable JavaScript to view the http://disqus.com/?ref_noscript;>Comments powered by Disqus. -http://disqus.com; class="dsq-brlink">Comments powered by Disqus +Please enable JavaScript to view the https://disqus.com/?ref_noscript;>Comments powered by Disqus. +https://disqus.com; class="dsq-brlink">Comments powered by Disqus diff --git a/_includes/footer.html b/_includes/footer.html index 6d55e65..92d42a8 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -36,7 +36,7 @@ - Copyright 2011-2014 http://www.apache.org;>The Apache Software Foundation. All Rights Reserved. + Copyright 2011-2014 https://www.apache.org;>The Apache Software Foundation. All Rights Reserved. https://privacy.apache.org/policies/privacy-policy-public.html;>Privacy policy. diff --git a/_includes/navbar.html b/_includes/navbar.html index ddf87ce..5246a44 100755 --- a/_includes/navbar.html +++ b/_includes/navbar.html @@ -21,7 +21,7 @@ Core Concepts ComputeService BlobStore -http://github.com/apache/jclouds-examples;>Examples +https://github.com/apache/jclouds-examples;>Examples @@ -54,12 +54,12 @@ About Apache -http://www.apache.org;>The Apache Software Foundation -http://www.apache.org/licenses/;>License -http://www.apache.org/foundation/contributing.html;>Donations -http://www.apache.org/foundation/sponsorship.html;>Sponsorship -http://www
[jclouds] branch master updated: Upgrade to Guice 5.1.0
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 7e50ae630d Upgrade to Guice 5.1.0 7e50ae630d is described below commit 7e50ae630db53dee88bb093ccd94ddadeeb1988e Author: Andrew Gaul AuthorDate: Fri Dec 16 21:20:35 2022 +0900 Upgrade to Guice 5.1.0 Release notes: https://github.com/google/guice/wiki/Guice510 --- project/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/pom.xml b/project/pom.xml index f6d9eec75f..3d03ae072a 100644 --- a/project/pom.xml +++ b/project/pom.xml @@ -224,7 +224,7 @@ 2.8.9 31.1-jre -5.0.1 +5.1.0 3.14.9 1.0.1
[jclouds] branch master updated (552eb95c44 -> b754e177fe)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git from 552eb95c44 Fix Files name collision add b754e177fe Bump snakeyaml from 1.31 to 1.32 in /apis/byon No new revisions were added by this update. Summary of changes: apis/byon/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[jclouds] branch master updated: Fix Files name collision
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 552eb95c44 Fix Files name collision 552eb95c44 is described below commit 552eb95c44dd99d3d1234278e8113f915852f133 Author: Andrew Gaul AuthorDate: Mon Nov 21 07:49:18 2022 +0900 Fix Files name collision Regression from b282b5cbfef760be026660522e78d1bba81988ac. --- .../jclouds/http/BaseHttpCommandExecutorServiceIntegrationTest.java | 3 +-- .../java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java | 5 ++--- .../src/test/java/org/jclouds/ssh/jsch/JschSshClientLiveTest.java| 3 +-- .../sshj/src/test/java/org/jclouds/sshj/SshjSshClientLiveTest.java | 3 +-- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/core/src/test/java/org/jclouds/http/BaseHttpCommandExecutorServiceIntegrationTest.java b/core/src/test/java/org/jclouds/http/BaseHttpCommandExecutorServiceIntegrationTest.java index e9ce28ab7d..cb406d60d2 100644 --- a/core/src/test/java/org/jclouds/http/BaseHttpCommandExecutorServiceIntegrationTest.java +++ b/core/src/test/java/org/jclouds/http/BaseHttpCommandExecutorServiceIntegrationTest.java @@ -31,7 +31,6 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.URLDecoder; -import java.nio.file.Files; import java.util.Random; import java.util.concurrent.TimeUnit; @@ -269,7 +268,7 @@ public abstract class BaseHttpCommandExecutorServiceIntegrationTest extends Base Payload payload = null; try { - f = Files.createTempFile("jclouds", "tmp").toFile(); + f = java.nio.file.Files.createTempFile("jclouds", "tmp").toFile(); long length = (new Random().nextInt(32) + 1) * 1024L * 1024L; TestUtils.randomByteSource().slice(0, length).copyTo(Files.asByteSink(f)); diff --git a/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java b/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java index 666b7e1854..5ace972bef 100644 --- a/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java +++ b/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java @@ -43,7 +43,6 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.net.URI; import java.net.URLEncoder; -import java.nio.file.Files; import java.security.NoSuchAlgorithmException; import java.util.Arrays; import java.util.Collection; @@ -1037,7 +1036,7 @@ public class RestAnnotationProcessorTest extends BaseRestApiTest { public void testMultipartWithParamFilePart() throws Exception { Invokable method = method(TestMultipartForm.class, "withParamFilePart", String.class, File.class); - File file = Files.createTempFile("foo", "bar").toFile(); + File file = java.nio.file.Files.createTempFile("foo", "bar").toFile(); try { Files.append("foobledata", file, UTF_8); @@ -1083,7 +1082,7 @@ public class RestAnnotationProcessorTest extends BaseRestApiTest { public void testMultipartWithParamFileBinaryPart() throws Exception { Invokable method = method(TestMultipartForm.class, "withParamFileBinaryPart", String.class, File.class); - File file = Files.createTempFile("foo", "bar").toFile(); + File file = java.nio.file.Files.createTempFile("foo", "bar").toFile(); try { Files.write(new byte[] { 17, 26, 39, 40, 50 }, file); diff --git a/drivers/jsch/src/test/java/org/jclouds/ssh/jsch/JschSshClientLiveTest.java b/drivers/jsch/src/test/java/org/jclouds/ssh/jsch/JschSshClientLiveTest.java index 64007c299e..d9389cd67d 100644 --- a/drivers/jsch/src/test/java/org/jclouds/ssh/jsch/JschSshClientLiveTest.java +++ b/drivers/jsch/src/test/java/org/jclouds/ssh/jsch/JschSshClientLiveTest.java @@ -28,7 +28,6 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.PrintStream; import java.net.InetAddress; -import java.nio.file.Files; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.Executors; @@ -162,7 +161,7 @@ public class JschSshClientLiveTest { @Test public void testPutAndGet() throws IOException { - temp = Files.createTempFile("foo", "bar").toFile(); + temp = java.nio.file.Files.createTempFile("foo", "bar").toFile(); try { SshClient client = setupClient(); client.put(temp.getAbsolutePath(), Payloads.newStringPayload("rabbit")); diff --git a/drivers/sshj/src/test/java/org/jclouds/sshj/SshjSshClientLiveTest.java b/drivers/sshj/src/test/java/org/jc
[jclouds] branch master updated: vuln-fix: Temporary File Information Disclosure
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new b282b5cbfe vuln-fix: Temporary File Information Disclosure b282b5cbfe is described below commit b282b5cbfef760be026660522e78d1bba81988ac Author: Jonathan Leitschuh AuthorDate: Sat Nov 19 03:01:07 2022 + vuln-fix: Temporary File Information Disclosure This fixes temporary file information disclosure vulnerability due to the use of the vulnerable `File.createTempFile()` method. The vulnerability is fixed by using the `Files.createTempFile()` method which sets the correct posix permissions. Weakness: CWE-377: Insecure Temporary File Severity: Medium CVSSS: 5.5 Detection: CodeQL & OpenRewrite (https://public.moderne.io/recipes/org.openrewrite.java.security.SecureTempFileCreation) Reported-by: Jonathan Leitschuh Signed-off-by: Jonathan Leitschuh Bug-tracker: https://github.com/JLLeitschuh/security-research/issues/18 Co-authored-by: Moderne --- .../src/test/java/org/jclouds/docker/features/MiscApiMockTest.java | 3 ++- .../jclouds/http/BaseHttpCommandExecutorServiceIntegrationTest.java | 3 ++- .../java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java | 5 +++-- .../src/test/java/org/jclouds/ssh/jsch/JschSshClientLiveTest.java| 3 ++- .../sshj/src/test/java/org/jclouds/sshj/SshjSshClientLiveTest.java | 3 ++- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/apis/docker/src/test/java/org/jclouds/docker/features/MiscApiMockTest.java b/apis/docker/src/test/java/org/jclouds/docker/features/MiscApiMockTest.java index a3d21a194d..0678966fc1 100644 --- a/apis/docker/src/test/java/org/jclouds/docker/features/MiscApiMockTest.java +++ b/apis/docker/src/test/java/org/jclouds/docker/features/MiscApiMockTest.java @@ -27,6 +27,7 @@ import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.nio.charset.StandardCharsets; +import java.nio.file.Files; import javax.ws.rs.core.HttpHeaders; @@ -96,7 +97,7 @@ public class MiscApiMockTest extends BaseDockerMockTest { public void testBuildContainerUsingPayload() throws Exception { MockWebServer server = mockWebServer(new MockResponse().setResponseCode(200)); MiscApi api = api(DockerApi.class, server.url("/").toString()).getMiscApi(); - File file = File.createTempFile("docker", "tmp"); + File file = Files.createTempFile("docker", "tmp").toFile(); FileInputStream data = new FileInputStream(file); Payload payload = Payloads.newInputStreamPayload(data); payload.getContentMetadata().setContentLength(file.length()); diff --git a/core/src/test/java/org/jclouds/http/BaseHttpCommandExecutorServiceIntegrationTest.java b/core/src/test/java/org/jclouds/http/BaseHttpCommandExecutorServiceIntegrationTest.java index 7a19459912..e9ce28ab7d 100644 --- a/core/src/test/java/org/jclouds/http/BaseHttpCommandExecutorServiceIntegrationTest.java +++ b/core/src/test/java/org/jclouds/http/BaseHttpCommandExecutorServiceIntegrationTest.java @@ -31,6 +31,7 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.URLDecoder; +import java.nio.file.Files; import java.util.Random; import java.util.concurrent.TimeUnit; @@ -268,7 +269,7 @@ public abstract class BaseHttpCommandExecutorServiceIntegrationTest extends Base Payload payload = null; try { - f = File.createTempFile("jclouds", "tmp"); + f = Files.createTempFile("jclouds", "tmp").toFile(); long length = (new Random().nextInt(32) + 1) * 1024L * 1024L; TestUtils.randomByteSource().slice(0, length).copyTo(Files.asByteSink(f)); diff --git a/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java b/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java index c81c65298f..666b7e1854 100644 --- a/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java +++ b/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java @@ -43,6 +43,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.net.URI; import java.net.URLEncoder; +import java.nio.file.Files; import java.security.NoSuchAlgorithmException; import java.util.Arrays; import java.util.Collection; @@ -1036,7 +1037,7 @@ public class RestAnnotationProcessorTest extends BaseRestApiTest { public void testMultipartWithParamFilePart() throws Exception { Invokable method = method(TestMultipartForm.class, "withParamFilePart", String.class, File.class); - File file = File.
[jclouds] branch master updated: activate Reproducible Builds
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 25bcb7961e activate Reproducible Builds 25bcb7961e is described below commit 25bcb7961e4fb6c50827e9f6cc13ee898870a9a4 Author: Hervé Boutemy AuthorDate: Fri Nov 11 09:15:37 2022 +0100 activate Reproducible Builds --- project/pom.xml | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/project/pom.xml b/project/pom.xml index e46a568557..f6d9eec75f 100644 --- a/project/pom.xml +++ b/project/pom.xml @@ -214,10 +214,11 @@ ${jdk.version} ${jdk.version} true +1668154596 5.2.0 -3.0.1 +3.3.0 3.0.0-M7 @@ -476,7 +477,7 @@ org.apache.maven.plugins maven-release-plugin -2.4 +3.0.0-M7 false deploy @@ -637,6 +638,21 @@ + + org.apache.maven.plugins + maven-assembly-plugin + 3.3.0 + + + org.apache.maven.plugins + maven-remote-resources-plugin + 1.7.0 + + + org.apache.maven.plugins + maven-source-plugin + 3.2.1 + biz.aQute.bnd bnd-maven-plugin @@ -675,7 +691,7 @@ maven-archetype-plugin - 2.2 + 3.2.0 maven-deploy-plugin @@ -1040,7 +1056,6 @@ org.apache.maven.plugins maven-source-plugin -3.2.0 attach-sources
[jclouds] branch master updated: This fixes problem JCLOUDS 1615.
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new b2a2025b32 This fixes problem JCLOUDS 1615. b2a2025b32 is described below commit b2a2025b32c7c3c0ca50cd7769353c59c6fabe8d Author: Christian.Jung AuthorDate: Thu Sep 15 08:38:34 2022 +0200 This fixes problem JCLOUDS 1615. --- .../azureblob/blobstore/AzureBlobStore.java| 8 +++- .../azureblob/blobstore/AzureBlobStoreTest.java| 55 ++ 2 files changed, 61 insertions(+), 2 deletions(-) diff --git a/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/AzureBlobStore.java b/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/AzureBlobStore.java index a2bf864d61..b05b4895b0 100644 --- a/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/AzureBlobStore.java +++ b/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/AzureBlobStore.java @@ -434,15 +434,19 @@ public class AzureBlobStore extends BaseBlobStore { ImmutableList.Builder blocks = ImmutableList.builder(); for (MultipartPart part : parts) { - String blockId = BaseEncoding.base64().encode(Ints.toByteArray(part.partNumber())); + String blockId = makeBlockId(part.partNumber()); blocks.add(blockId); } return sync.putBlockList(mpu.containerName(), azureBlob, blocks.build()); } + static String makeBlockId(int partNumber) { + return BaseEncoding.base64Url().encode(Ints.toByteArray(partNumber)); + } + @Override public MultipartPart uploadMultipartPart(MultipartUpload mpu, int partNumber, Payload payload) { - String blockId = BaseEncoding.base64().encode(Ints.toByteArray(partNumber)); + String blockId = makeBlockId(partNumber); sync.putBlock(mpu.containerName(), mpu.blobName(), blockId, payload); String eTag = ""; // putBlock does not return ETag Date lastModified = null; // putBlob does not return Last-Modified diff --git a/providers/azureblob/src/test/java/org/jclouds/azureblob/blobstore/AzureBlobStoreTest.java b/providers/azureblob/src/test/java/org/jclouds/azureblob/blobstore/AzureBlobStoreTest.java new file mode 100644 index 00..71830151cd --- /dev/null +++ b/providers/azureblob/src/test/java/org/jclouds/azureblob/blobstore/AzureBlobStoreTest.java @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jclouds.azureblob.blobstore; + +import static org.testng.Assert.assertTrue; + +import org.testng.annotations.Test; + +import java.util.regex.Pattern; +/** + * Tests behavior of {@code AzureBlobStore} + */ +// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire +@Test(groups = "unit", testName = "AzureBlobStore") +public class AzureBlobStoreTest { + +private static final Pattern VALIDATION_PATTERN = Pattern.compile("[a-zA-Z0-9\\-_=]*"); + +public void testMakeBlockId() { + // how can i achieve something like a junit5 parametrized test in testng? + checkBlockIdForPartNumber(0); + checkBlockIdForPartNumber(1); + checkBlockIdForPartNumber(248); + checkBlockIdForPartNumber(504); + checkBlockIdForPartNumber(760); + checkBlockIdForPartNumber(1016); + checkBlockIdForPartNumber(1272); + checkBlockIdForPartNumber(4600); + checkBlockIdForPartNumber(6654); + checkBlockIdForPartNumber(867840); + checkBlockIdForPartNumber(868091); + checkBlockIdForPartNumber(868096); + checkBlockIdForPartNumber(-1); + checkBlockIdForPartNumber(-1023); + } + + private void checkBlockIdForPartNumber(int partNumber) { + String blockId = AzureBlobStore.makeBlockId(partNumber); + assertTrue(VALIDATION_PATTERN.matcher(blockId).find()); + } +}
[jclouds] branch master updated: Deep copy Blob in LocalBlobStore.getBlob
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 57a9e7b7cc Deep copy Blob in LocalBlobStore.getBlob 57a9e7b7cc is described below commit 57a9e7b7ccb900a8d0d8808098fd5beaf75d6332 Author: Andrew Gaul AuthorDate: Mon Aug 1 21:19:15 2022 +0900 Deep copy Blob in LocalBlobStore.getBlob ByteSourcePayload.openStream is not thread safe and lack of synchronization can throw ArrayIndexOutOfBoundsExceptions. Instead deep copy the underlying Payload. Fixes gaul/s3proxy#303. --- .../org/jclouds/blobstore/TransientStorageStrategy.java | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/blobstore/src/main/java/org/jclouds/blobstore/TransientStorageStrategy.java b/blobstore/src/main/java/org/jclouds/blobstore/TransientStorageStrategy.java index 76a66b4695..ca1b1c85d4 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/TransientStorageStrategy.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/TransientStorageStrategy.java @@ -162,7 +162,22 @@ public class TransientStorageStrategy implements LocalStorageStrategy { @Override public Blob getBlob(final String containerName, final String blobName) { Map map = containerToBlobs.get(containerName); - return map == null ? null : map.get(blobName); + if (map == null) { + return null; + } + Blob blob = map.get(blobName); + if (blob == null) { + return null; + } + + // Deep copy Blob to make sure ByteSourcePayload does not share Closer. + Payload payload = blob.getPayload(); + MutableContentMetadata md = payload.getContentMetadata(); + Blob newBlob = blobFactory.create(BlobStoreUtils.copy(blob.getMetadata())); + Payload newPayload = Payloads.newPayload(payload.getRawContent()); + newBlob.setPayload(payload); + HttpUtils.copy(md, newPayload.getContentMetadata()); + return newBlob; } @Override
[jclouds] branch master updated: Upgrade to jax-rs 2.1.1
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 5067897ff5 Upgrade to jax-rs 2.1.1 5067897ff5 is described below commit 5067897ff5f9d6405215e9cb71771072f9a58a7b Author: Andrew Gaul AuthorDate: Thu Aug 24 23:46:58 2017 -0700 Upgrade to jax-rs 2.1.1 Also address constant TODO. --- project/pom.xml| 2 +- .../handlers/GoogleCloudStorageClientErrorRetryHandler.java| 7 ++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/project/pom.xml b/project/pom.xml index 8b67af1e8c..e46a568557 100644 --- a/project/pom.xml +++ b/project/pom.xml @@ -231,7 +231,7 @@ 1.4.1 9.4.46.v20220331 -2.0.1 +2.1.1 1.8.0 diff --git a/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/handlers/GoogleCloudStorageClientErrorRetryHandler.java b/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/handlers/GoogleCloudStorageClientErrorRetryHandler.java index f47ff4cde2..013071455d 100644 --- a/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/handlers/GoogleCloudStorageClientErrorRetryHandler.java +++ b/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/handlers/GoogleCloudStorageClientErrorRetryHandler.java @@ -17,6 +17,7 @@ package org.jclouds.googlecloudstorage.handlers; import javax.inject.Singleton; +import javax.ws.rs.core.Response.Status; import org.jclouds.http.HttpCommand; import org.jclouds.http.HttpResponse; @@ -27,10 +28,6 @@ import com.google.inject.Inject; @Singleton public final class GoogleCloudStorageClientErrorRetryHandler implements HttpRetryHandler { - /** The user has sent too many requests in a given amount of time ("rate limiting"). */ - // TODO: remove when upgrading to jax-rs api 2.1 - private static final int TOO_MANY_REQUESTS = 429; - private final BackoffLimitedRetryHandler backoffHandler; @Inject @@ -40,7 +37,7 @@ public final class GoogleCloudStorageClientErrorRetryHandler implements HttpRetr @Override public boolean shouldRetryRequest(HttpCommand command, HttpResponse response) { - if (response.getStatusCode() == TOO_MANY_REQUESTS) { + if (response.getStatusCode() == Status.TOO_MANY_REQUESTS.getStatusCode()) { return backoffHandler.shouldRetryRequest(command, response); } else { return false;
[jclouds] branch master updated: JCLOUDS-1616: Proxy credentials validation is missing in OkHttpCommandExecutorService API request
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git The following commit(s) were added to refs/heads/master by this push: new 88f0c341cf JCLOUDS-1616: Proxy credentials validation is missing in OkHttpCommandExecutorService API request 88f0c341cf is described below commit 88f0c341cfc4a6508db63794846e7c3902b8e255 Author: SATYANAN-ANAND AuthorDate: Tue Aug 2 05:39:34 2022 -0700 JCLOUDS-1616: Proxy credentials validation is missing in OkHttpCommandExecutorService API request Added support for credentials validation --- .../http/okhttp/OkHttpCommandExecutorService.java | 33 ++ 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/drivers/okhttp/src/main/java/org/jclouds/http/okhttp/OkHttpCommandExecutorService.java b/drivers/okhttp/src/main/java/org/jclouds/http/okhttp/OkHttpCommandExecutorService.java index 750d78820e..d3144de57f 100644 --- a/drivers/okhttp/src/main/java/org/jclouds/http/okhttp/OkHttpCommandExecutorService.java +++ b/drivers/okhttp/src/main/java/org/jclouds/http/okhttp/OkHttpCommandExecutorService.java @@ -32,11 +32,14 @@ import java.util.Map; import javax.annotation.Nullable; import javax.inject.Named; +import okhttp3.Authenticator; +import okhttp3.Credentials; import okhttp3.internal.http.HttpMethod; import okhttp3.Headers; import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; +import okhttp3.Route; import okhttp3.RequestBody; import okhttp3.Response; @@ -55,6 +58,7 @@ import org.jclouds.http.internal.HttpWire; import org.jclouds.io.ContentMetadataCodec; import org.jclouds.io.MutableContentMetadata; import org.jclouds.io.Payload; +import org.jclouds.proxy.internal.GuiceProxyConfig; import com.google.common.base.Function; import com.google.common.collect.ImmutableMultimap; @@ -66,17 +70,19 @@ public final class OkHttpCommandExecutorService extends BaseHttpCommandExecutorS private final Function proxyForURI; private final OkHttpClient globalClient; private final String userAgent; + private final GuiceProxyConfig proxyConfig; @Inject OkHttpCommandExecutorService(HttpUtils utils, ContentMetadataCodec contentMetadataCodec, DelegatingRetryHandler retryHandler, IOExceptionRetryHandler ioRetryHandler, DelegatingErrorHandler errorHandler, HttpWire wire, Function proxyForURI, OkHttpClient okHttpClient, @Named(PROPERTY_IDEMPOTENT_METHODS) String idempotentMethods, - @Named(PROPERTY_USER_AGENT) String userAgent) { + @Named(PROPERTY_USER_AGENT) String userAgent, GuiceProxyConfig proxyConfig) { super(utils, contentMetadataCodec, retryHandler, ioRetryHandler, errorHandler, wire, idempotentMethods); this.proxyForURI = proxyForURI; this.globalClient = okHttpClient; this.userAgent = userAgent; + this.proxyConfig = proxyConfig; } @Override @@ -172,10 +178,27 @@ public final class OkHttpCommandExecutorService extends BaseHttpCommandExecutorS @Override protected HttpResponse invoke(Request nativeRequest) throws IOException, InterruptedException { - OkHttpClient requestScopedClient = globalClient.newBuilder() - .proxy(proxyForURI.apply(nativeRequest.url().uri())) - .build(); - + + OkHttpClient.Builder okHttpClientBuilder = globalClient.newBuilder() + .proxy(proxyForURI.apply(nativeRequest.url().uri())); + + if (proxyConfig.getCredentials().isPresent()) { + Authenticator proxyAuthenticator = new Authenticator() { + @Override + public Request authenticate(Route route, Response response) throws IOException { + if (response != null && response.code() == 407 + && !response.message().toLowerCase().contains("preemptive authenticate")) { + return null; + } + String credential = Credentials.basic(proxyConfig.getCredentials().get().identity, + proxyConfig.getCredentials().get().credential); + return response.request().newBuilder().header("Proxy-Authorization", credential).build(); + } + }; + okHttpClientBuilder.proxyAuthenticator(proxyAuthenticator); + } + OkHttpClient requestScopedClient = okHttpClientBuilder.build(); + Response response = requestScopedClient.newCall(nativeRequest).execute(); HttpResponse.Builder builder = HttpResponse.builder();
[jclouds] 05/05: Upgrade to testng 7.5
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git commit 7fecb72e0d591038ed284ca1930446279c364089 Author: Andrew Gaul AuthorDate: Sun Jul 31 19:12:29 2022 +0900 Upgrade to testng 7.5 Requires upgrading surefire as well. --- project/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/pom.xml b/project/pom.xml index 496bde09df..8b67af1e8c 100644 --- a/project/pom.xml +++ b/project/pom.xml @@ -218,7 +218,7 @@ 5.2.0 3.0.1 -2.17 +3.0.0-M7 2.8.9 @@ -243,7 +243,7 @@ 6.0.0 -6.8.21 +7.5 1.3 3.23.1 1.3.0
[jclouds] branch master updated (16926b0bb7 -> 7fecb72e0d)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git from 16926b0bb7 Upgrade to assertj 3.23.1 new 65e16c97f5 Annotate test methods as singleThreaded new 2b217fb2bb Annotate public non-test methods new 5111923566 Specify missing DataProviders new f4ec2bb63c Address testng cyclic dependency new 7fecb72e0d Upgrade to testng 7.5 The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../chef/src/test/java/org/jclouds/chef/domain/RoleTest.java | 1 + .../src/test/java/org/jclouds/chef/util/ChefUtilsTest.java | 2 +- .../jclouds/ohai/functions/ByteArrayToMacAddressTest.java| 2 +- .../org/jclouds/cloudstack/parse/ListHostsResponseTest.java | 2 ++ .../integration/FilesystemBlobIntegrationTest.java | 10 ++ .../strategy/internal/FilesystemStorageStrategyImplTest.java | 2 +- apis/s3/src/test/java/org/jclouds/s3/xml/S3ParserTest.java | 2 +- .../functions/ParseSystemAndUserMetadataFromHeadersTest.java | 2 +- .../integration/internal/BaseBlobIntegrationTest.java| 2 +- .../integration/internal/BaseBlobSignerLiveTest.java | 2 ++ .../integration/internal/BaseBlobStoreIntegrationTest.java | 3 +-- .../integration/internal/BaseContainerIntegrationTest.java | 12 core/src/test/java/org/jclouds/crypto/PemsTest.java | 2 +- .../src/test/java/org/jclouds/functions/JoinOnCommaTest.java | 2 +- .../test/java/org/jclouds/http/internal/WireLiveTest.java| 2 +- core/src/test/java/org/jclouds/http/internal/WireTest.java | 2 +- project/pom.xml | 4 ++-- .../ElasticHostsPeer1LosAngelesComputeServiceLiveTest.java | 2 +- .../ElasticHostsPeer1LondonComputeServiceLiveTest.java | 2 +- .../ElasticHostsPeer1SanAntonioComputeServiceLiveTest.java | 2 +- .../ElasticHostsPeer1TorontoComputeServiceLiveTest.java | 2 +- .../compute/Go2CloudJohannesburg1ComputeServiceLiveTest.java | 2 +- .../compute/OpenHostingEast1ComputeServiceLiveTest.java | 2 +- .../compute/ServerloveManchesterComputeServiceLiveTest.java | 2 +- .../compute/SkaliCloudMalaysiaComputeServiceLiveTest.java| 2 +- 25 files changed, 48 insertions(+), 22 deletions(-)
[jclouds] 02/05: Annotate public non-test methods
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git commit 2b217fb2bb0cfaf39c8f91c1402cdf438f806ee9 Author: Andrew Gaul AuthorDate: Sun Jul 31 19:29:29 2022 +0900 Annotate public non-test methods Newer versions of TestNG try to run these. --- apis/chef/src/test/java/org/jclouds/chef/domain/RoleTest.java | 1 + .../test/java/org/jclouds/cloudstack/parse/ListHostsResponseTest.java | 2 ++ .../jclouds/filesystem/integration/FilesystemBlobIntegrationTest.java | 1 + .../jclouds/blobstore/integration/internal/BaseBlobSignerLiveTest.java | 2 ++ 4 files changed, 6 insertions(+) diff --git a/apis/chef/src/test/java/org/jclouds/chef/domain/RoleTest.java b/apis/chef/src/test/java/org/jclouds/chef/domain/RoleTest.java index 59f92bf310..b5b5d3db09 100644 --- a/apis/chef/src/test/java/org/jclouds/chef/domain/RoleTest.java +++ b/apis/chef/src/test/java/org/jclouds/chef/domain/RoleTest.java @@ -107,6 +107,7 @@ public class RoleTest { assertNotEquals(role2, role1, "role2 should not equal role1"); } + @Test(enabled = false) public static void verifyRunListForEnvironment(Map> envRunList, String envName, String... expectedEntries) { assertTrue(envRunList.containsKey(envName), "envRunList contains " + envName); diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/parse/ListHostsResponseTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/parse/ListHostsResponseTest.java index b4f5855cb3..58b91631be 100644 --- a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/parse/ListHostsResponseTest.java +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/parse/ListHostsResponseTest.java @@ -36,6 +36,8 @@ import com.google.inject.Injector; @Test(groups = "unit") public class ListHostsResponseTest extends BaseParserTest, Set> { + @Override + @Test(enabled = false) public void compare(Set expects, Set response) { assertEquals(response.toString(), expects.toString()); } diff --git a/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemBlobIntegrationTest.java b/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemBlobIntegrationTest.java index 4219ef6d2f..a4ed63c694 100644 --- a/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemBlobIntegrationTest.java +++ b/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemBlobIntegrationTest.java @@ -64,6 +64,7 @@ public class FilesystemBlobIntegrationTest extends BaseBlobIntegrationTest { // Mac OS X HFS+ does not support UserDefinedFileAttributeView: // https://bugs.openjdk.java.net/browse/JDK-8030048 @Override + @Test(enabled = false) public void checkContentMetadata(Blob blob) { if (!isMacOSX()) { super.checkContentMetadata(blob); diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobSignerLiveTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobSignerLiveTest.java index 8bacfbed4b..db74dddcf2 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobSignerLiveTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobSignerLiveTest.java @@ -99,6 +99,7 @@ public class BaseBlobSignerLiveTest extends BaseBlobStoreIntegrationTest { } } + @Test(enabled = false) public void testSignGetUrlWithTime(final long timeout) throws InterruptedException, IOException { String name = "hello"; String text = "fooo"; @@ -166,6 +167,7 @@ public class BaseBlobSignerLiveTest extends BaseBlobStoreIntegrationTest { } } + @Test(enabled = false) public void testSignPutUrlWithTime(final long timeout) throws InterruptedException, IOException { String name = "hello"; String text = "fooo";
[jclouds] 01/05: Annotate test methods as singleThreaded
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git commit 65e16c97f56b141ce8fdd00a5e75227a0146d77d Author: Andrew Gaul AuthorDate: Sun Jul 31 19:19:52 2022 +0900 Annotate test methods as singleThreaded Newer versions of testng deprecate sequential. --- apis/chef/src/test/java/org/jclouds/chef/util/ChefUtilsTest.java| 2 +- .../test/java/org/jclouds/ohai/functions/ByteArrayToMacAddressTest.java | 2 +- .../filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java | 2 +- apis/s3/src/test/java/org/jclouds/s3/xml/S3ParserTest.java | 2 +- .../blobstore/functions/ParseSystemAndUserMetadataFromHeadersTest.java | 2 +- core/src/test/java/org/jclouds/crypto/PemsTest.java | 2 +- core/src/test/java/org/jclouds/functions/JoinOnCommaTest.java | 2 +- core/src/test/java/org/jclouds/http/internal/WireLiveTest.java | 2 +- core/src/test/java/org/jclouds/http/internal/WireTest.java | 2 +- .../compute/ElasticHostsPeer1LosAngelesComputeServiceLiveTest.java | 2 +- .../compute/ElasticHostsPeer1LondonComputeServiceLiveTest.java | 2 +- .../compute/ElasticHostsPeer1SanAntonioComputeServiceLiveTest.java | 2 +- .../compute/ElasticHostsPeer1TorontoComputeServiceLiveTest.java | 2 +- .../go2cloud/compute/Go2CloudJohannesburg1ComputeServiceLiveTest.java | 2 +- .../openhosting/compute/OpenHostingEast1ComputeServiceLiveTest.java | 2 +- .../serverlove/compute/ServerloveManchesterComputeServiceLiveTest.java | 2 +- .../skalicloud/compute/SkaliCloudMalaysiaComputeServiceLiveTest.java| 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/apis/chef/src/test/java/org/jclouds/chef/util/ChefUtilsTest.java b/apis/chef/src/test/java/org/jclouds/chef/util/ChefUtilsTest.java index 5f625f4a19..faefd789f6 100644 --- a/apis/chef/src/test/java/org/jclouds/chef/util/ChefUtilsTest.java +++ b/apis/chef/src/test/java/org/jclouds/chef/util/ChefUtilsTest.java @@ -29,7 +29,7 @@ import com.google.common.collect.ImmutableList; /** * Tests behavior of {@code ChefUtils} */ -@Test(groups = { "unit" }, sequential = true) +@Test(groups = { "unit" }, singleThreaded = true) public class ChefUtilsTest { public static long millis = 1280251180727L; public static String millisString = "1280251180727"; diff --git a/apis/chef/src/test/java/org/jclouds/ohai/functions/ByteArrayToMacAddressTest.java b/apis/chef/src/test/java/org/jclouds/ohai/functions/ByteArrayToMacAddressTest.java index f736dad8c6..1c5345c7a6 100644 --- a/apis/chef/src/test/java/org/jclouds/ohai/functions/ByteArrayToMacAddressTest.java +++ b/apis/chef/src/test/java/org/jclouds/ohai/functions/ByteArrayToMacAddressTest.java @@ -24,7 +24,7 @@ import org.testng.annotations.Test; /** * Tests behavior of {@code ByteArrayToMacAddress} */ -@Test(groups = { "unit" }, sequential = true) +@Test(groups = { "unit" }, singleThreaded = true) public class ByteArrayToMacAddressTest { public void test() { diff --git a/apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java b/apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java index 33157ced6c..193a5a4e08 100644 --- a/apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java +++ b/apis/filesystem/src/test/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImplTest.java @@ -67,7 +67,7 @@ import com.google.common.util.concurrent.Uninterruptibles; /** * Test class for {@link FilesystemStorageStrategyImpl } class */ -@Test(groups = "unit", testName = "filesystem.FilesystemBlobUtilsTest", sequential = true) +@Test(groups = "unit", testName = "filesystem.FilesystemBlobUtilsTest", singleThreaded = true) public class FilesystemStorageStrategyImplTest { private static final String CONTAINER_NAME = "funambol-test"; private static final String TARGET_CONTAINER_NAME = TestUtils.TARGET_BASE_DIR + CONTAINER_NAME; diff --git a/apis/s3/src/test/java/org/jclouds/s3/xml/S3ParserTest.java b/apis/s3/src/test/java/org/jclouds/s3/xml/S3ParserTest.java index 6cd1485ced..71824b5efe 100644 --- a/apis/s3/src/test/java/org/jclouds/s3/xml/S3ParserTest.java +++ b/apis/s3/src/test/java/org/jclouds/s3/xml/S3ParserTest.java @@ -51,7 +51,7 @@ import com.google.inject.Injector; * Tests parsing of S3 responses */ // NOTE:without testName, this will not call @Before* and fail w/NPE during surefire -@Test(groups = "performance", sequential = true, timeOut = 2 * 60 * 1000, testName = "S3ParserTest") +@Test(groups = "performance", singleThreaded = true, time
[jclouds] 04/05: Address testng cyclic dependency
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git commit f4ec2bb63cf46a9488340a1cbfd5e189ee691db7 Author: Andrew Gaul AuthorDate: Sun Jul 31 20:08:27 2022 +0900 Address testng cyclic dependency Uncovered by newer versions of testng. --- .../blobstore/integration/internal/BaseBlobIntegrationTest.java| 2 +- .../blobstore/integration/internal/BaseBlobStoreIntegrationTest.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java index a814c00b79..d885f4530e 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java @@ -104,7 +104,7 @@ import com.google.common.util.concurrent.ListenableFuture; public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest { private static final ByteSource oneHundredOneConstitutions = TestUtils.randomByteSource().slice(0, 101 * 45118); - @BeforeClass(groups = { "integration", "live" }, dependsOnMethods = "setupContext") + @BeforeClass(groups = { "integration", "live" }) @Override public void setUpResourcesOnThisThread(ITestContext testContext) throws Exception { super.setUpResourcesOnThisThread(testContext); diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java index 009e8fc861..7adbab703c 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java @@ -115,7 +115,6 @@ public class BaseBlobStoreIntegrationTest extends BaseViewLiveTest
[jclouds] 03/05: Specify missing DataProviders
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds.git commit 5111923566a9c5fc37529b5098a9a53806c04c0e Author: Andrew Gaul AuthorDate: Sun Jul 31 20:08:17 2022 +0900 Specify missing DataProviders Uncovered by newer versions of testng. --- .../integration/FilesystemBlobIntegrationTest.java | 9 + .../integration/internal/BaseContainerIntegrationTest.java | 12 2 files changed, 21 insertions(+) diff --git a/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemBlobIntegrationTest.java b/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemBlobIntegrationTest.java index a4ed63c694..2fa70014a8 100644 --- a/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemBlobIntegrationTest.java +++ b/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemBlobIntegrationTest.java @@ -17,6 +17,8 @@ package org.jclouds.filesystem.integration; import static org.jclouds.filesystem.util.Utils.isMacOSX; +import static org.jclouds.utils.TestUtils.NO_INVOCATIONS; +import static org.jclouds.utils.TestUtils.SINGLE_NO_ARG_INVOCATION; import java.io.IOException; import java.util.Arrays; @@ -44,6 +46,7 @@ import org.jclouds.filesystem.reference.FilesystemConstants; import org.jclouds.filesystem.utils.TestUtils; import org.jclouds.io.Payload; import org.jclouds.io.Payloads; +import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import org.testng.SkipException; @@ -205,4 +208,10 @@ public class FilesystemBlobIntegrationTest extends BaseBlobIntegrationTest { throw new SkipException("filesystem does not support extended attributes in Mac OSX"); } } + +@DataProvider +public Object[][] ignoreOnMacOSX() { +return isMacOSX() ? NO_INVOCATIONS +: SINGLE_NO_ARG_INVOCATION; +} } diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseContainerIntegrationTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseContainerIntegrationTest.java index 0c7b50378b..f13ad6ce6c 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseContainerIntegrationTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseContainerIntegrationTest.java @@ -24,6 +24,8 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.jclouds.blobstore.options.ListContainerOptions.Builder.afterMarker; import static org.jclouds.blobstore.options.ListContainerOptions.Builder.inDirectory; import static org.jclouds.blobstore.options.ListContainerOptions.Builder.maxResults; +import static org.jclouds.utils.TestUtils.NO_INVOCATIONS; +import static org.jclouds.utils.TestUtils.SINGLE_NO_ARG_INVOCATION; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; @@ -790,4 +792,14 @@ public class BaseContainerIntegrationTest extends BaseBlobStoreIntegrationTest { Uninterruptibles.sleepUninterruptibly(AWAIT_CONSISTENCY_TIMEOUT_SECONDS, TimeUnit.SECONDS); } } + + @DataProvider + public Object[][] ignoreOnWindows() { + return isWindowsOs() ? NO_INVOCATIONS +: SINGLE_NO_ARG_INVOCATION; + } + + private static boolean isWindowsOs() { + return System.getProperty("os.name", "").toLowerCase().contains("windows"); + } }
[jclouds-examples] branch master updated: Bump commons-io from 2.4 to 2.7 in /blobstore-uploader
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds-examples.git The following commit(s) were added to refs/heads/master by this push: new 1be7fb5 Bump commons-io from 2.4 to 2.7 in /blobstore-uploader 1be7fb5 is described below commit 1be7fb51c244a57b51a716d63e3b2bbc831d1d07 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Sun Jul 31 09:57:52 2022 + Bump commons-io from 2.4 to 2.7 in /blobstore-uploader Bumps commons-io from 2.4 to 2.7. --- updated-dependencies: - dependency-name: commons-io:commons-io dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- blobstore-uploader/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blobstore-uploader/pom.xml b/blobstore-uploader/pom.xml index 5278ea9..ae7d284 100644 --- a/blobstore-uploader/pom.xml +++ b/blobstore-uploader/pom.xml @@ -54,7 +54,7 @@ commons-io commons-io - 2.4 + 2.7 commons-codec
[jclouds-examples] branch master updated: Bump logback-classic from 1.0.0 to 1.2.0 in /chef-basics
This is an automated email from the ASF dual-hosted git repository. gaul pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jclouds-examples.git The following commit(s) were added to refs/heads/master by this push: new 139e7ee Bump logback-classic from 1.0.0 to 1.2.0 in /chef-basics 139e7ee is described below commit 139e7eed1e6a3437be5ddc20e5490d25591cb2d7 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> AuthorDate: Tue Jun 21 13:15:57 2022 + Bump logback-classic from 1.0.0 to 1.2.0 in /chef-basics Bumps logback-classic from 1.0.0 to 1.2.0. --- updated-dependencies: - dependency-name: ch.qos.logback:logback-classic dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- chef-basics/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chef-basics/pom.xml b/chef-basics/pom.xml index 49fec29..a442124 100644 --- a/chef-basics/pom.xml +++ b/chef-basics/pom.xml @@ -100,7 +100,7 @@ ch.qos.logback logback-classic - 1.0.0 + 1.2.0
[jclouds-examples] branch master updated (ef25829 -> 660019c)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/jclouds-examples.git from ef25829 Bump logback-classic from 1.0.9 to 1.2.0 in /compute-basics add 660019c Bump logback-classic from 1.0.13 to 1.2.0 in /blobstore-uploader No new revisions were added by this update. Summary of changes: blobstore-uploader/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[jclouds-examples] branch master updated (2afc54b -> ef25829)
This is an automated email from the ASF dual-hosted git repository. gaul pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/jclouds-examples.git from 2afc54b Bump logback-classic from 1.0.9 to 1.2.0 in /google-lb add ef25829 Bump logback-classic from 1.0.9 to 1.2.0 in /compute-basics No new revisions were added by this update. Summary of changes: compute-basics/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)