-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Destination CDK: Simplify AsyncStreamConsumer constructors #37106
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
* @return PartialAirbyteMessage if the message is valid, empty otherwise | ||
*/ | ||
fun deserializeAirbyteMessage( | ||
messageString: String?, | ||
dataTransformer: StreamAwareDataTransformer, |
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.
🎉 love to see this
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.
love how the doc string didn't even match the parameters...
@@ -144,7 +146,7 @@ private constructor( | |||
writeConfigs, | |||
typerDeduper | |||
), // todo (cgardens) - wrapping the old close function to avoid more code churn. | |||
OnCloseFunction { _, streamSyncSummaries -> | |||
{ _, streamSyncSummaries -> |
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.
now that we're in kotlin (no checked exceptions)... can we kill try-catch here? (... or just use the function returned from GeneralStagingFunctions.onCloseFunction
directly)
feels weird to build a lambda that effectively just wraps another lambda
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.
yeah let me see if i can unify. i have no clue what the java equivalent code was 😅
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.
Simplified it and yet another cgardens TODO gone 😄
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.
we should track the number of times the string cgardens
shows up in our code as a vanity metric :P
358ab5b
to
bf9a6e4
Compare
bf9a6e4
to
9d92625
Compare
/publish-java-cdk
|
TL;DR
This pull request removes complex constructors and unifies into single constructor in
AsyncStreamConsumer
and related classes.What changed?
DeserializationUtil
toAirbyteMessageDeserializer
Transformer
&Deserializer
AsyncStreamConsumer
StagingConsumerFactory
&JdbcBufferedConsumerFactory