-
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
AWS EventBridge Support #2061
AWS EventBridge Support #2061
Conversation
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.
AWS EventBridge looks like an interesting product. Thanks a lot for creating a PR! I did a first pass on the PR, but it looks like a great start.
Some general notes.
- Consider the consequences of using
mapAsyncUnordered
with your concurrency setting. Is this important when using AWS EventBridge? Does the order of results ever matter? - More variety in the tests would be good to test error corner cases.
- Alpakka documentation is still outstanding. We use paradox. I suggest using the SNS docs as a reference. Any worthwhile knowledge you've accumulated from using AWS EventBridge with Akka Streams should be added there. You can generate the docs locally with the sbt task
docs/previewSite
. I suggest opening an sbt session first and then make changes to the docs while you're in there, because there's a large startup performance penalty when calling the sbt task.
...bridge/src/main/scala/akka/stream/alpakka/aws/eventbridge/javadsl/EventBridgePublisher.scala
Outdated
Show resolved
Hide resolved
...bridge/src/main/scala/akka/stream/alpakka/aws/eventbridge/javadsl/EventBridgePublisher.scala
Outdated
Show resolved
Hide resolved
...bridge/src/main/scala/akka/stream/alpakka/aws/eventbridge/javadsl/EventBridgePublisher.scala
Outdated
Show resolved
Hide resolved
...bridge/src/main/scala/akka/stream/alpakka/aws/eventbridge/javadsl/EventBridgePublisher.scala
Outdated
Show resolved
Hide resolved
...bridge/src/main/scala/akka/stream/alpakka/aws/eventbridge/javadsl/EventBridgePublisher.scala
Show resolved
Hide resolved
...ridge/src/main/scala/akka/stream/alpakka/aws/eventbridge/scaladsl/EventBridgePublisher.scala
Show resolved
Hide resolved
verify(eventBridgeClient, times(1)).putEvents(meq(expectedThird)) | ||
} | ||
|
||
it should "publish multiple PublishRequest messages to multiple eventbridge topics" in { |
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.
It's not clear to me how this test is routing or asserting that messages are sent to different topics. It looks like the same impl as above.
...t-bridge/src/test/scala/akka/stream/alpakka/aws/eventbridge/EventBridgePublishMockSpec.scala
Outdated
Show resolved
Hide resolved
...t-bridge/src/test/scala/akka/stream/alpakka/aws/eventbridge/EventBridgePublishMockSpec.scala
Outdated
Show resolved
Hide resolved
|
||
verify(eventBridgeClient, never()).putEvents(any[PutEventsRequest]()) | ||
} | ||
|
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.
Maybe we could add a test that simulates an error returned by the service. There are some example error responses in the docs. https://docs.aws.amazon.com/eventbridge/latest/userguide/add-events-putevents.html
@teroxik Thanks for pushing this forward. I see you've labelled it as a WIP. Ping us when you're ready. |
75f9e0c
to
5e34e59
Compare
Hey, I wish to +1 this change I think it will be really cool interop feature between Akka and EventBridge. I had done pretty much same code changes: #2151. Since you are already ahed of with the work I will close the other pull request. Some thoughts that I have (some of them have been pointed out here)
Also if you think I can help on anything, let me know. I can write a blog post once the change will be available as well. |
Hi there, I have the documentation almost ready. So will push it up this week. And we can hopefully move this forward and extend. |
I have added the documentation. Still wanted to spent a bit more time on the test cases. Could do today. |
@seglo tomorrow if possible please. I will sort it. |
Sure. There's no rush :) |
@seglo the MiMa check is failing as it's trying to find previous version of the module, but there is not one as it's new, any advice how to bypass that check? |
Will be looking into improving the test coverage as suggested today. |
Yes, for the new sbt project disable the MiMa plugin. Also, create a new alpakka issue to enable the MiMa plugin on this project once it's been released.
|
Log the link to the new issue you create in a code comment where the sub project is defined. |
build.sbt
Outdated
@@ -280,6 +281,9 @@ lazy val simpleCodecs = alpakkaProject("simple-codecs", "simplecodecs") | |||
|
|||
lazy val slick = alpakkaProject("slick", "slick", Dependencies.Slick) | |||
|
|||
lazy val eventbridge = | |||
alpakkaProject("aws-event-bridge", "aws.eventbridge", Dependencies.Eventbridge).disablePlugins(MimaPlugin) |
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.
Have to remove this disablePlugins
after next release in order to check the Binary Compatibiliy.
Any chance for another pass of review? |
Yes, I meant to do a review this week but I kept getting distracted with other tasks. It's on my todo for next week. Sorry for the delay. |
79a9dd1
to
32eb154
Compare
Doc updates from Seglo, thanks Co-authored-by: Sean Glover <sean@seanglover.com>
…o feature/event-bridge
@seglo if you can help me out why the @apidoc is not working, correctly I have accepted the suggested updates for the comments - and that broke the build.
|
@teroxik Thanks. I've pushed a fix. I'll follow up on Monday with another review. |
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
Thanks a lot for this contribution @teroxik! It will be published to the akka snapshot repo next successful build of master. |
Hi there, I think there is some more followup work still required but let's take it from there. Thanks for the help. |
@teroxik Is there anything required that you think should gate the first release? We should create GitHub issues to address any outstanding work. WDYT @jmnarloch? |
@seglo I don't think there are any issues, mainly some additional suggestion we have discussed - in terms of testing, adding different shape for the sinks and flow API, based on how people would prefer to use it. |
Pull Request Checklist
Purpose
References
N/A
Changes
N/A
Background Context
N/A