-
Notifications
You must be signed in to change notification settings - Fork 644
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
WIP - Adds Google cloud storage support #650
Conversation
@ennru mind answering the questions I put in the comment? |
Great that you'd like to donate this code to Alpakka.
I'll need to look at the code to give more guidance... |
I'll switch to scalatest and spray-json, should not be that much work |
Would be good if you could also read through the brand new contributor advice https://github.com/akka/alpakka/blob/master/contributor-advice.md and adjust public/internal APIs etc as needed, thanks! |
@ennru @johanandren I would like to share the see also |
Yes, sharing sounds good to me. How much code could be shared? Is it "just" the session class? We'd either need to add a |
Yapp sharing could be good. Centralize the deps, create a "common" way to do things. But on the other hand we are speaking about ~90 line of code. So I still not convinced myself. So I think for the start we could implement the same session and token handling for the 3 modules, and we should generalize/centralize this later. (Mostly because if we do a refactor in one PR we need to do that on the other related PRs too. If we have a more "stable/freezed" codebase we could refactor more easily.) Maybe start a new issue with this "google shared code" problem, and we will not forget it. |
@tg44 makes sense to wait until everything has been merged |
@@ -16,11 +16,11 @@ class SessionSpec extends WordSpec { | |||
"report the path of the missing service account file" in { | |||
implicit val as: ActorSystem = null | |||
implicit val mat: Materializer = null | |||
val session = new Session(GoogleAuthConfiguration("missingpath"), Seq.empty) | |||
val session = new Session(GoogleAuthConfiguration("/missing/path/test.json"), Seq.empty) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this break the build on non unixy machines. Use TempDirectory.location()
and then combine with a more specific file name that will not exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switching to Paths.get(System.getProperty("java.io.tmpdir")).resolve("idonotexist.json") as TempDirectory is not accessible
I don't have the time to work on this any more, might in the end be a better idea to create a wrapper for the official google client that now supports async callbacks? |
on the other hand we have been running this code in production for a while now and it does its job |
Sorry, to see you leaving this behind. Welcome back another day. |
We are using it too in production |
@ennru what needs to be implemented to have this PR ready for merge?
francisdb mentioned that it might be better idea to implement this in terms of new google client that supports async callbacks, it that better approach? @francisdb can you point me to the google client that supports async callbacks, I haven't had luck to find documentation about it yet. |
I have no idea which one is the "new google client", but last time when I checked out the official java sdk from google, it was really ugly. Personally I would not use that lib in any production system. (It makes a lot of unneeded requests, no reasonable caching, the codebase is hardly readable and not segmented, and if you check the dependencies its really big.) So we coded all the required functionality from the REST documentation after we tried to use it and failed bcs of the performance and memory issues. |
I guess I mixed op Amazon and Google. There is a new async aws client. So forget about that comment. |
@josipgrgurica Would be great if you have the time to get this rolling again. We'd like it to follow the structure as described in the contributor advice. |
@ennru I have time to continue on this, I'll go through this PR and contributor advice to see what is missing and what needs to be changed. Should I fork francisdb:googlestorage branch and work on it? |
Superseded by #1340
fixes #588
This is an initial import of the code we currently have in (pre)production at https://www.waylay.io . Kudos to @brunoballekens
Some questions toward maintainers: