Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JCLOUDS-1590: Promote glacier to core #127

Merged
merged 96 commits into from Dec 18, 2021
Merged

Conversation

gaul
Copy link
Member

@gaul gaul commented Dec 17, 2021

No description provided.

Roman C. Coedo and others added 30 commits May 15, 2014 02:32
The Glacier client can create, delete, read, and list vaults.
Annotations removed with:

find -name \*.java | xargs sed -i /@author/d

Empty Javadoc removed with multiple iterations of:

find -name \*.java | xargs sed -i -z 's/ \*\n \*\// \*\//'
find -name \*.java | xargs sed -i -z 's/ \* \n \*\// \*\//'
find -name \*.java | xargs sed -i -z 's/\/\*\*\n \*\/\n//'
…eturn false on any IllegalArgumentException.
Now the live tests are not conditioned by the current state of the
account used.
The TreeHash class stores two HashCodes, the linear and the
tree HashCode. The TreeHash class also has an static inner class
named Hasher, which allows us to calculate the hashes.

Both Hashes (tree and linear) are needed for the upload archive
and the multipart upload operations. When completing a multipart
upload operation we also need to calculate the tree hash of the
individual part's hashes.
Also ensure that we close the InputStream.
Now the Glacier client supports upload and delete archive
operations.

An static TestUtils class has been made for the archive operations
tests. This class allows us to build payloads and build ByteSources.
On the last commit we added TestUtils class. On this commit
the VaultNameValidator and the ThreeHashTest tests make use
of it.

GlacierClientMockTest was not using GlacierHeaders references.
This commit fixes this problem too.

In addition, the AWSRequestSignerV4, the TreeHash and the
VaultNameValidator classes are now final.
GlacierClientMockTest was growing uncontrollably. This commit
is an attempt to fix this problem.

The first measure taken moves the duplicated strings to constants
and the JSON response bodies to resource files. In addition, some
repeated code was moved to static classes, where they can be reused.

We also use @BeforeTest and @AfterTest to make instances of the
MockWebServer and shut them down for each test.
Now the Glacier client supports initiateMultipartUpload and
uploadPart operations.
Now the validators use checkArgument instead of throwing an
exception by calling an static method.

There were some missing validators on the Async client, these
were fixed too.

Lastly, TreeHash inner class was removed. Now the factory methods
are in the TreeHash class.
Now the Glacier client supports completeMultipartUpload and i
abortMultipartUpload operations.
Use these annotations to initialize before every test.  BeforeTest and
AfterTest initialize once before a single test in this suite.
Added listParts and listMultipartUploads operations to the Glacier
client.
For each test, we were forcing the server to discard the content of
the request body on @BeforeMethod. We need to do this on tests with a
huge body, but it may interfere with other tests which actually use
the body data.  To fix this problem, we moved the body limit
restriction to the tests that require it.
Now the Glacier client supports the initiateJob operation.
The binder classes were making unnecessary checks. They have
been cleaned up.
This commit addresses some problems found in the code:

- Now VaultMetadata returns a copy of the creation date instead
of their own instance.

- Added a checkNotNull for PaginatedVaultCollection iterable.

- Added a test for listVaults with an empty list of vaults.
Now Glacier client supports the describeJob operation.
Now the Glacier client supports the listJobs operation.
Now the Glacier client can retrieve data.
This commit demonstrates a few instances where assertj yields more
informative error messages than testng assertEquals and assertTrue.
Note that we could replace all testng asserts with assertj.
gaul and others added 23 commits June 7, 2015 22:50
It is currently throwing UnsupportedOperationException exception.
Found via error-prone.
jclouds should not assume a particular endpoint when running glacier
tests, as it's possible that a glacier emulator is used (e.g.
glacier-proxy).
Glacier has an initial wait parameter, which is used to check on the
progress of a job. By default, it is set to 3 hours. This may work
well against existing AWS Glacier interface, however, against a
Glacier emulator the timeout should be overriden. The change allows
setting the timeout to an arbitrary shorter value with
-Dtest.glacier.initial-wait.
This can cause thread visibility issues.  Found via error-prone.
- from 2.2.0-SNAPSHOST to 2.2.0-SNAPSHOT
This project, the aws-lab version of Apache JClouds, share the exact build instructions as the primary Apache JClouds project with all its modules.
Apache JClouds is shifting its strategy in handling OSGi configuration. Instead of using the Maven Bundle Plugin, a wrapper of the BND plugin, the BND plugin gets used directly.
- Remove the OSGi configuration from each module. The configuration gets served to the BND through dedicated configuration / bnd files.
- Onboard bnd-configuration files, one per module.

Ignore bnd files in rat plugin
The JClouds project module upgrades the okhttp server library and related dependencies such as mockwebserver from 2.2.0 to 3.14.9. The vendor switched the groupId declaration from com.squareup.okhttp to com.squareup.okhttp3.

Adjust imports and api calls for newer okhttp vers
@gaul gaul requested a review from nacx December 17, 2021 05:02
Comment on lines 45 to 70
<repositories>
<repository>
<id>apache-snapshots</id>
<url>https://repository.apache.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

<!-- For modernizer, which depends on jclouds-resources snapshot. -->
<pluginRepositories>
<pluginRepository>
<id>apache-snapshots</id>
<url>https://repository.apache.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably remove this from here and just inherit these settings?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@asfgit asfgit merged commit 3bbb0b4 into apache:master Dec 18, 2021
@gaul gaul deleted the promoted-glacier branch December 18, 2021 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants