-
Notifications
You must be signed in to change notification settings - Fork 645
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
Create google-common module #2613
Conversation
Nice! I think we don't need to keep it internal only, simply just document that everything can change until we freeze the API. So I don't think the namespaces are problematic.
This will be the interesting part. If you want to I can try to migrate FCM. |
Thanks @tg44! I'm open to making it public API with those caveats.
Thanks, that would be a big help!! Before we start migrating code, my big question is if (and how much) we can break the public APIs of the existing connectors? Of course this module is still useful even if only used to replace the internal implementations of the connectors, without changing their public APIs. But, to achieve truly central configuration (and shared credentials/access tokens) will probably require breaking changes to config and settings classes for each of the connectors. If we are going to do it, Alpakka 3 would probably be our best chance. Hopefully @seglo or @ennru can comment on this? |
I created a commit; tg44@601a464 (I can't PR it to your fork, I think you need to enable something.) I removed the |
Wow, this is awesome @tg44, thanks for this! Love that your commit nearly halved the size of the code. Not sure why you couldn't PR so I started it for you at armanbilge#1.
I'm glad you had a positive experience, any feedback? Actually, I'm still noodling a bit with the
I added some comments, but you're right, it looks like you pulled this off without breaking much/any public API! I hope it can be this easy for the other connectors. |
To make sure IUC, you're asking if you can update the existing connectors to use this updated module in this PR? That sounds reasonable to me, and will help to make sure we don't miss any functionality required by one or more of google connectors.
If we did this I would choose a package that most of the connectors use and deprecate all the APIs found in the other packages. I don't think we should make a clean break. I'm not sure this is really worth the effort though.
We can deprecate existing configuration, but it would be unfortunate to have to make breaking changes across the board for Alpakka 3.0.0. Alpakka major releases don't have to be as rare as they are right now. If there's a good reason (and maybe this is one of them) then we could release an Alpakka 4.0.0 in a more reasonable interval, maybe after 3 months? |
Exactly my thinking!
Thanks for your thoughts! This makes sense; I agree. Ok, let's focus on not breaking stuff for now, and once the dust settles see where that leaves us regarding need for 4.0. |
Just pushed my first migration effort for the Google Cloud Storage module. All tests pass, but I did have to break a couple things.
@seglo Are these breaking changes acceptable? |
client-email = deprecated | ||
private-key = deprecated | ||
|
||
# No longer supported, use config path alpakka.google.forward-proxy |
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.
These are the configurable endpoints I dropped support for.
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 don't know. Maybe some people with some recent experience using GCS can comment. @francisdb, @DanieleSassoli, @gabrielreid ?
See Arman's note about introducing configuration breaking changes here: #2613 (comment)
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.
Just had a look, seems this was added by @jkobejs when he worked further on my pr. We are not using these settings so for my part ok to make unsupported.
google-cloud-storage/src/test/scala/docs/scaladsl/GCStorageSourceSpec.scala
Outdated
Show resolved
Hide resolved
@tg44 I just pushed the FCM migration based on your code, thanks for the help! Would be great if you could have a look at it. |
Thanks for the review @seglo, working my way through it.
As far as I can tell the |
...pub-sub-grpc/src/main/scala/akka/stream/alpakka/googlecloud/pubsub/grpc/PubSubSettings.scala
Outdated
Show resolved
Hide resolved
@seglo did I miss any comments or anything else left to do? Ok, good to go for real! Pending CI :) |
google-cloud-storage/src/test/scala/docs/scaladsl/GCStorageSourceSpec.scala
Outdated
Show resolved
Hide resolved
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.
LGTM! I'll wait for the build to go thru and merge this evening or tomorrow.
Got it 👍 |
References #773 #2548; cc @tg44
This is an attempt at the beginnings of a long-awaited
google-common
module.The implementation is mostly taken from the new BigQuery connector, which includes:
Credentials
providers w/ Service Account and Compute Engine configurationsCredentials
class, for interop with gRPCGoogleHttp
class with auth, retry, and proxy support for requestsPaginatedRequest
source for paginated resourcesResumableUpload
flow (will be shared between GCS and BigQuery, at least)GoogleSettings
and stream attributes classes for managing configThe idea is that this config is generally done centrally (although of course can be overridden) so that multiple connectors can share access tokens from the same
Credentials
instance.If it's not too ambitious, I'd like to try and migrate all the Google connectors to this module in this PR. I think this is the best path towards determining a relatively stable (internal) API for this module that meets the needs of all of the connectors.
Unfortunately, it seems that the various Google connectors don't share a top level package: they are split between
a.s.a.google
anda.s.a.googlecloud
, probably too late to change?Looking forward to your feedback!