-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Exposing SSL-only version of Postgres Source #6362
Conversation
@@ -42,6 +42,7 @@ | |||
import io.airbyte.commons.util.MoreIterators; |
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.
ignore this class for now. i had to commit some hacks to get this to work. will clean it up if we stick with this approach.
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.
seems good!
Some related work/problems we may wanna think about (not in this PR):
- How to do this in destinations, specifically normalization
- encoding the publish script into gradle so we can couple connectors together
final JsonNode jdbcConfig = source.toDatabaseConfig(config); | ||
toDatabaseConfig = sourceFunctionImmutablePair.getRight(); | ||
// final JsonNode jdbcConfig = source.toDatabaseConfig(config); | ||
final JsonNode jdbcConfig = toDatabaseConfig.apply(config); |
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.
would be ideal if we can do this all at once for all vars
# See [Source Acceptance Tests](https://docs.airbyte.io/connector-development/testing-connectors/source-acceptance-tests-reference) | ||
# for more information about how to configure these tests | ||
connector_image: airbyte/source-postgres-strict:dev | ||
tests: |
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.
nice! though I think this is not bing triggered from the build system. You need to add the plugin + to do it locally, add the bash wrapper (find it in any python source)
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.
this is actually just copied from the postgres source. is it just wrong there too?
import io.airbyte.protocol.models.ConfiguredAirbyteCatalog; | ||
import io.airbyte.protocol.models.ConnectorSpecification; | ||
|
||
public abstract class SpecModifyingSource implements Source { |
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.
if all we're doing is modify the spec is a whole new superclass worth it? why not just extend the source directly and modify the spec method?
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.
fair. I think we can reuse this class for all the db sources that this applies to so it gives us a nice convention to work from if we want to expand it later. i can just document it once. otherwise we're just going to extend a bunch of sources and have to explain it in a bunch of places.
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.
agree with @cgardens the decoration pattern makes the feature of modifying the spec more composable
/publish connector=source-postgres-strict-encrypt
|
555ad72
to
aaf3eaa
Compare
/publish connector=connectors/source-postgres-strict-encrypt
|
What
How
jq
query in the build system and then a lot of confusing work to inject the new spec into the jar of the connector. At best it is not intuitive and ends up with a lot of build cruft and will be easy to mess up.Recommended reading order
SpecModifyingSource.java
PostgresSourceStrict.java
Questions