Add Google Cloud Storage repository plugin#13578
Conversation
|
Note: it needs #13574 to work |
82b95d1 to
1e12955
Compare
There was a problem hiding this comment.
I don't think we ever inject container, so, it shouldn't be annotated. We can also make the constructor package private, since we don't really inherit from GoogleCloudStorageBlobContainer. Lastly, why don't we just pass bucket and client since this is the only part of the store that we need here and it will simplify code below a bit.
|
Looks like a good start. Left a couple of comments. |
1e12955 to
0fbd402
Compare
There was a problem hiding this comment.
Since we bind to concrete implementation here, maybe it makes sense to get rid of GoogleCloudStorageService interface all together and rename InternalGoogleCloudStorageService to GoogleCloudStorageService. It feels like these interfaces don't buy us anything except added complexity. Replacing them with mock implementation would make little sense here since we already test all upper levels with mock implementation based on fs repo.
|
Left some comments. Let's figure out how to add some tests to this thing. |
|
Hi, is there any updates on this issue? |
|
:1 |
|
ping @tlrx, I think this needs comments to be addressed and then another review? |
b9b6d52 to
38b9e89
Compare
Sure, thanks for the kindly reminder @dakrone . Let's add an update to this pull request and some explanation why it takes so long to get in. A bit of historyI started to work on this plugin when elasticsearch was around version 1.4. At this time, the Google Client library was almost incompatible with the way Snapshot/Restore worked in ES. We try to find a workaround for some time but the solution was hardly maintainable and had poor performance. Around ES 1.5 or 1.6 the internal snapshot/restore changed a bit and at the same time the Google library improved a lot. Great! But... Elasticsearch was on its way to 2.x and a lot of things changed and improved too: we moved the plugins from their dedicated repository back in elasticsearch repo, then move from maven to gradle, enabled the security manager, changed the way integration tests worked for plugins. It has been a lot of amazing improvements but keeping this pull request up-to-date required a LOT of attention and time. Knowing that things would stabilize, I put this on a shelve, I strongly apologize for that. Current statusAnyway, I rebased and updated the code today to make it work with elasticsearch 5.0.0-alpha1-SNAPSHOT. It has been tested locally and on Google Compute Engine and it works nicely. If you want to test it, you can check out this pull request, build it locally using Gradle and deploy it in a elasticsearch 5.0.0-alpha1-SNAPSHOT (download it here). This pull request contains a documentation page. @imotov Can you please have another look when you have time? That would be great! |
There was a problem hiding this comment.
Is this file intentionally empty?
There was a problem hiding this comment.
It looks like we add empty file for libs that don't provide NOTICE.txt (I spotted few others like this in other plugins)
There was a problem hiding this comment.
I have seen this code so many times. Maybe it's time to move it somewhere where it can be reused?
There was a problem hiding this comment.
OK. Maybe we could move it to the BlobPath.buildAsString() because it is always used with this logic. If we do that, it makes sense to do it in another PR because other plugin like repository-s3 can benefit from it.
|
Left a few comments. Looks pretty good. I think we can simplify thing by getting rid of |
@tlrx thanks for the update. Do I read you right that the current plan is to release it as part of ES 5.0? |
|
/CC @motinani |
|
@imotov Thanks for your review! I removed the Concerning the tests, I moved the Can you please have another look? That would be great. @haizaar I can't give you any estimated date for this but I'd be happy to see it ready and testable for a beta release of 5. |
|
Tanguy, thanks for the update. Really looking forward to it.
|
There was a problem hiding this comment.
Maybe rename it to createClient?
|
Left a minor comment. LGTM. |
9e7fab1 to
35d3bda
Compare
|
Thanks @imotov ! |
This pull request adds a new type of repository
gcsto allow to snapshot/restore indices on Google Cloud Storage service:For now it only supports authentication using Service Account files.
Many things still need to be done but I'd be glad to benefit from a first round of review.
Closes #12880