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

AWS S3: versioning support #951

Merged
merged 15 commits into from
Jun 5, 2018
Merged

AWS S3: versioning support #951

merged 15 commits into from
Jun 5, 2018

Conversation

sfali
Copy link
Contributor

@sfali sfali commented May 13, 2018

Support for download, upload, copy, and delete for a specific version, when the bucket is enabled to support versioning.

#944

sfali added 12 commits May 9, 2018 07:59
    * populate download rquest with `versionId` query parameter, if provide
    * make sure existing test cases does not add any query parameter
    * add test for versionId when provided
    * versionId function paarmeters for each of "GET" methods
    * functions to "GET" an object with version id in each of S3Client for scala and jav dsl
    * populate versionId in ObjectMetadata
    * function to get entity from HttpResponse with headers (entityForSuccessWithHeaders)
    * function to prase entity and populate it values from header
    * update S3Client for Java and Scala
    * fix test cases
    * ignoring one test case for now, to figure out later how to run
@ennru ennru changed the title 944 versioning support AWS S3: versioning support May 14, 2018
@ennru ennru added the p:aws-s3 label May 14, 2018
Copy link
Member

@ennru ennru left a comment

Choose a reason for hiding this comment

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

Looks good. Touching quite some code...

@@ -93,9 +101,15 @@ Copy an S3 object from source bucket to target bucket using multi part copy uplo
Scala
: @@snip ($alpakka$/s3/src/test/scala/akka/stream/alpakka/s3/scaladsl/S3SinkSpec.scala) { #multipart-copy }

Scala
: @@snip ($alpakka$/s3/src/test/scala/akka/stream/alpakka/s3/scaladsl/S3SinkSpec.scala) { #multipart-copy-with-source-version }

Copy link
Member

Choose a reason for hiding this comment

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

You should make this two snippet sections, and add some text explaining what it does.

@@ -195,10 +223,14 @@ final class S3Client(s3Settings: S3Settings, system: ActorSystem, mat: Materiali
*/
def request(bucket: String,
key: String,
versionId: String,
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it be better to go with Optional instead of a nullable String?
We might deprecate the request without the parameter.

version: '3.1'

services:
minio1:
Copy link
Member

Choose a reason for hiding this comment

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

Did you implement integration tests against these minio servers?
I so, please send a separate PR with those and remove this section for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I ran against integration tests these minio servers. I noticed that you have an issue, #938, open to run integration tests in CI, in that case there should be a way to create buckets on startup and delete once done.

I'll remove and will send new PR for this.

Copy link
Member

@ennru ennru left a comment

Choose a reason for hiding this comment

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

LGTM.

@sfali
Copy link
Contributor Author

sfali commented Jun 1, 2018

As for creating a PR for docker compose file, as I mentioned in my comments if you are planning to run in CI/CD pipeline then functions need to be added to create and delete buckets at the start and end respectively, let me know about your thoughts.

@ennru ennru merged commit a26c212 into akka:master Jun 5, 2018
@ennru ennru added this to the 0.20 milestone Jun 5, 2018
@ennru
Copy link
Member

ennru commented Jun 5, 2018

Thank you for growing the S3 connector even more.

@sfali sfali deleted the 944_versioning_support branch June 5, 2018 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants