1
0
mirror of synced 2026-01-03 15:04:01 -05:00
Commit Graph

215 Commits

Author SHA1 Message Date
oneshcheret
494349f966 Revert "Source postgres: mark termination connection PSQLException as config error (#19623)" (#19881)
This reverts commit 92282ded3b.
2022-11-29 18:10:09 +02:00
oneshcheret
92282ded3b Source postgres: mark termination connection PSQLException as config error (#19623)
* Source postgres: catch termination connection PSQLException

* Source postgres: move common code to util method

* Source postgres: clean code

* Source postgres: review fixes and added unit tests

* Source postgres: clean code

* Source postgres: bump version

* Source postgres: format

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-11-29 16:47:09 +02:00
Davin Chia
0d4a2bb281 Introduce the AirbyteStreamNamespaceNamePair to the DefaultReplicationWorker. (#19360)
#19191 made me realise the DefaultReplicationWorker's metric tracking today has a bug where we aren't accounting for namespace when tracking metrics today. i.e. Streams with the same name and duplicate namespace will merge metrics.

While reading the code to figure out a fix, I realised we don't have a good conceptual representation of stream namespace <> name pairs within the platform today. We use a concatenated string. Though this works, it will become harder and harder to read/track as we do more operations that involve namespace i.e. progress bars and column selection.

This PR introduces the AirbyteStreamNameNamespacePair object into the platform code to make it more convenient to work with Streams in the future. (Especially if we proceed with the project to make streams a first-class citizen!)

The AirbyteStreamNameNamespacePair object was written to deal with the same issue of namespace <> name pair manipulation within the Java destination code. It implements the Comparable interface, which makes it convenient to use for Collections operations.

For an example of how this is consumed, see #19361.
2022-11-16 11:50:45 -08:00
Benoit Moriceau
1cdf1ba9e8 Bmoric/extract workspace api (#18996)
* Extract Operation API

* Extract scheduler API

* Format

* extract source api

* Extract source definition api

* Add path

* Extract State API

* extract webbackend api

* extract webbackend api

* extract workspace api
2022-11-08 10:15:57 -08:00
Akash Kulkarni
4fe8468e02 Migrate ssh exception -> config error exception (#19094)
* Update SshTunnel.java

Migrate ssh exception -> config error exception

* Unnest exception

* Address PR comments

* Add test case
2022-11-08 07:12:29 -08:00
Akash Kulkarni
972a8c0419 Handling configuration exceptions in IntegrationRunner (#18989)
* Hanlde error msgs in integration runner

* Add ConfigErrorException

* Some formatting
2022-11-04 14:38:26 -07:00
oneshcheret
2d4f443c75 Sources postgres, mysql, alloydb: encode database name (#18538)
* Source postgres: encode database name

* Source postgres, mysql: move encoding in util class, apply for mysql

* Source postgres, mysql: make var final

* Source postgres, mysql: bump version

* Source postgres, mysql: format code

* auto-bump connector version

* Source mysql: bump version

* auto-bump connector version

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-10-31 19:53:20 +02:00
Edward Gao
ba21d9048c fix formatting + imports (#18457) 2022-10-25 15:41:19 -07:00
Akash Kulkarni
b0a8e5473f Follow-up fix for SSHExceptions (#18383)
* Follow-up fix for SSHExceptions

* Catch RuntimeException instead of augmenting connection error messaging for now

* Update tests

* Bump versions + docs

* auto-bump connector version

* auto-bump connector version

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-10-25 15:06:03 -07:00
Ryan Fu
cc41385f50 Updates getPrivateKeyPair to throw exception when private key pair does not exist (#18263)
* Changes method from returning null to throwing Exception to match method structure

* Added javadoc explaining that KeyPair should not be returning null

* Moved ConnectionErrorException to commons package

* Adds error handling for SshWrappedDestinations and markdown to include changes

* Bumps version numbers for Postgres, MySQL, MSSQL

* auto-bump connector version

* auto-bump connector version

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-10-21 16:04:39 -07:00
Akash Kulkarni
55d030f3d7 🎉 Enhanced error messaging for DB source connectors (#18087)
* Enhanced error messaging for invalid cursor state

* Handle SSH config fail

* Handle SSH config fail

* Update AbstractDbSource.java

* Bump up versions + doc for beta+ connectors

Bump up versions + doc for beta+ connectors

* auto-bump connector version

* auto-bump connector version

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-10-19 12:22:42 -07:00
Yevhen Sukhomud
ee2e2b5b1f 16250 Destination Redis: Add SSH support (#17951)
* 16250 Destination Redis: Add SSH support

* 16250 Resolve port issue

* 11679 Bump version

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-10-18 02:00:51 +07:00
Ryan Fu
ef3e84ce3a Checks for iterator hasNext element (#18041)
* Checks for iterator hasNext element

* Fix linter with newline
2022-10-17 10:08:07 -07:00
Greg Solovyev
a73ae2b09d Add SSH tunneling to Elastic Search Destination (#17805)
* Add support for using URL in tunneled config
* Add support for SSH tunneling to destination-elasticsearch and destination-elasticsearch-strict-encrypt
2022-10-14 16:12:16 -07:00
Volodymyr Pochtar
a142141c98 Revert "Revert "feat: replace openjdk with amazoncorretto:17.0.4 on connectors for seсurity compliance (#17511)" (#17820)" (#17833)
This reverts commit e47c94ecff.
2022-10-11 14:22:54 +03:00
Volodymyr Pochtar
e47c94ecff Revert "feat: replace openjdk with amazoncorretto:17.0.4 on connectors for seсurity compliance (#17511)" (#17820)
This reverts commit ab71f5bc29.
2022-10-11 11:58:01 +03:00
Volodymyr Pochtar
ab71f5bc29 feat: replace openjdk with amazoncorretto:17.0.4 on connectors for seсurity compliance (#17511) 2022-10-10 12:35:39 +03:00
Ryan Fu
1d956df434 🚨 Add SSL documentation and check logic for S3 Destination 🚨 (#17340)
* Adds logic to fail upon non-deterministic custom S3 endpoint and documentation for insecure settings

* Reused config factory settings to a single static variable

* Updated error message and example in the spec.json to match expectation of secured endpoint

* Added validation check within the base s3

* Integrated AdaptiveDestinationRunner with S3Destination

* Reduced visibility for testing and fixed AdaptiveDestinationRunner issue

* Adds speicifc secure protocol with S3 and empty endpoint check

* Bumps docker version and adds comments and clearer string methods

* auto-bump connector version [ci skip]

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-10-03 13:56:58 -07:00
Yurii Bidiuk
10e4aae891 Use LOG4J2 to wrap connectors logs to JSON format (#15668)
* Use LOG4J2 to wrap connectors logs to JSON format

* log connector's stack trace directly as a message

* add stack_trace field to json template

* bump versions

* auto-bump connector version [ci skip]

* auto-bump connector version [ci skip]

* auto-bump connector version [ci skip]

* auto-bump connector version [ci skip]

* auto-bump connector version [ci skip]

* auto-bump connector version [ci skip]

* auto-bump connector version [ci skip]

* auto-bump connector version [ci skip]

* auto-bump connector version [ci skip]

* revert versions for destinations: postgres, mssql, mysql

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-09-14 23:27:13 +03:00
Ryan Fu
50a8d03c4c Cleans and Rebase Error Message Factory PR (#16202)
* Cleaned error messages factory PR

* Bumped MySQL and Postgres version

* Fixed messages and typos in test

* Fixes the changelog conflict with per-stream state

* Added note for flaky test

* Bumps mysql version to match changelog

* Added exception objects to all LOGGER.error for more visibility

* auto-bump connector version [ci skip]

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-09-12 16:08:11 -07:00
Davin Chia
315ecaea3a Use non-blocking Secure Random. (#16564)
Use the version of secure random that does not block if there is not enough entropy.

See https://tersesystems.com/blog/2015/12/17/the-right-way-to-use-securerandom/.

Instead of using .getInstanceStrong(), use the default constructor.
2022-09-09 19:00:08 -07:00
Rodi Reich Zilberman
43b8d8beaf Publish base-normalization (#16545)
* dummy

* update changelog
2022-09-09 15:10:26 -07:00
Tuhai Maksym
f81c5aa667 7198: SSH Tunnel: allow using OPENSSH key format (#15833)
* 7198: SSH Tunnel: allow using OPENSSH key format

* 7198: merge

* 7198: merge fix

* Use apache sshd lib to load private keys for tunnel

* Throw an exception in case private key failed to load

* Fix failing flow when creating NO_TUNNEL wrapper

* bump version numbers

* Address review comments. Fix test

Co-authored-by: Rodi Reich Zilberman <867491+rodireich@users.noreply.github.com>
2022-09-09 10:22:03 -07:00
Eugene
db8df934b1 [13309] Destination-mssql: enabled DAT tests (#16226) 2022-09-02 10:20:53 +03:00
Philippe Boyd
aceaf28335 feat: disable ssh tunnel idle timeout (#15635) 2022-08-29 13:17:25 -07:00
Rodi Reich Zilberman
a51a53fc3d New ssl flow for connectors (#15993)
* new ssl flow for connectors

* Bump versions and update changelogs

* Address review comments

* sanity

* Revert Dockerfile versions

* Fix error in test

* The test certificate we use do not contain a valid hostname so we can only verify ca trust but not hostname match

* verify-ca and verify-full SSL modes are not related to whether a client certificate is used. Make client certificate optional on both modes

* Bump Dockerfile versions and correct change notes.

* auto-bump connector version [ci skip]

* auto-bump connector version [ci skip]

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-08-26 22:32:19 -07:00
Evan Tahler
d009c3ea73 MySQL file reader now assumes UTF8 (#15709) 2022-08-16 19:32:40 -07:00
Evan Tahler
5d35c7f7e9 Postgres file reader now assumes UTF8 (#15697)
* Postgres file reader assumes UTF8

* fix build :/

Co-authored-by: Edward Gao <edward.gao@airbyte.io>
2022-08-16 16:45:06 -07:00
Lake Mossman
27f8596542 fix formatting (#15706)
* fix formatting

* fix slack notification client test
2022-08-16 16:39:19 -07:00
andriikorotkov
e5098e84f4 🎉 Source MySql: Added SSL certificates to MySql Source (#15044)
* updated mysql source specification and added field for root and clients SSL certificates

* added SSL mode for mysql source

* fixed code style

* updated run process timeout

* updated method for create keystore and updated tests

* updated normalization version for postgres destination

* updated normalization version for postgres destination

* added tests for connection with certificates

* updated tests for connection with full certificates and added tests for CA certificate

* updated tests

* updated source-mysql-strict-encrypt and updated versions

* updated code style

* updated doc

* updated specs

* fixed minor remarks

* fixed minor remarks

* updated tests

* fixed remarks and updated specification

* fixed mysql sources connectors version

* added CDC + SSL Certificates tests

* added property for CDC and added tests for test SSL with CDC together

* fixed MySqlStrictEncryptJdbcSourceAcceptanceTest for work with datetime format

* added property for CDC and added tests for test SSL with CDC together

* auto-bump connector version [ci skip]

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-08-16 13:34:19 -07:00
terencecho
19b1c14618 Fix whitespace formatting 2022-08-15 13:27:06 -07:00
andriikorotkov
d63a24ed41 🎉 Destination postgres: Add SSL certificates and update normalization (#14743)
* added ssl certificates for postgres source

* added command for remove client private key after transformation to encrypted key with .pk8 extension

* added connection with CA and client certificates for postgres destination

* updated code style

* moved common methods to the common class

* moved common methods to the common class

* fixed remarks

* updated postgres source tests

* added minor changes to spec and added fixes to password mechanism

* updated postgres source tests

* updated strict-encrypt postgres source and destination and added tests for SSL certificates for all postgres connectors

* fixed check style

* updated documentation and versions of connectors

* updated ordrs in test spec

* fixed minor remarks in specs and expected_specs

* fixed minor remarks in specs and expected_specs

* fixed Dockerfile

* fixed remarks

* fixed remarks

* fixed remarks

* fixed remarks

* fixed remarks

* fixed code style

* fixed connectors version in definition file

* updated postgres destination normalization

* updated postgres destination tests

* fixed code style for postgres source and destination

* pulled master changes

* removed allow mode for destination-postgres-strect-encrypt

* updated connectors version

* fixed custom DBT transformation and enabled test for it

* updated normalization version

* updated keystore password generation method

* auto-bump connector version [ci skip]

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-08-15 16:32:37 +03:00
Adam
41eac4b416 feat: new constructor that allows for specifying max number of buffers (#14546) 2022-08-05 17:29:30 -04:00
Yevhen Sukhomud
436de264cb 13539 Fix integration tests source-clickhouse Mac OS (#14701)
* 13539 Fix integration tests source-clickhouse Mac OS

* 13539 Updated clickhouse jdbc driver

* 13539 Updated destination-clickhouse-strict-encrypt

* 13539 Updated SSL configuration and tests for clickhouse-destination

* 13539 Updated SSL for source-clickhouse-strict-encrypt

* 13539 Resolved host by ip

* 13539 Fixed code formatting

* 13539 Bump up source-clickhouse-strict-encrypt version

* auto-bump connector version [ci skip]

* auto-bump connector version [ci skip]

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-07-26 13:08:44 +07:00
Jonathan Pearlin
c3b3be141f Fail on invalid state message (#14959) 2022-07-22 14:46:02 -04:00
George Claireaux
e88db7605a Remove legacy sentry code from java connectors (#14414)
* remove a bunch of things

* removed the rest

* formatting
2022-07-20 12:30:46 +01:00
andriikorotkov
2dc4759264 Source postgres: Add SSL certificates to source postgres (#13840)
* added ssl certificates for postgres source

* added command for remove client private key after transformation to encrypted key with .pk8 extension

* added connection with CA and client certificates for postgres destination

* updated code style

* moved common methods to the common class

* moved common methods to the common class

* fixed remarks

* updated postgres source tests

* added minor changes to spec and added fixes to password mechanism

* updated postgres source tests

* updated strict-encrypt postgres source and destination and added tests for SSL certificates for all postgres connectors

* fixed check style

* updated documentation and versions of connectors

* updated ordrs in test spec

* fixed minor remarks in specs and expected_specs

* fixed minor remarks in specs and expected_specs

* fixed Dockerfile

* fixed remarks

* fixed remarks

* fixed remarks

* fixed remarks

* fixed remarks

* rollback changes for postgres destination and move them to a new pull request

* rollback changes for postgres destination and move them to a new pull request

* fixed code style

* fixed code style

* fixed code style

* fixed code style

* fixed code style

* auto-bump connector version

* updated version of postgres strict-encrypt source

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-07-18 12:58:53 +03:00
Edward Gao
67a9f067d3 add EdDSA support in SSH tunnel (#9494)
* add EdDSA support

* verify EdDSA support works correct

Co-authored-by: Yurii Bidiuk <yura.bidyuk@gmail.com>
2022-06-23 10:36:59 +03:00
Lake Mossman
c6d83b3239 Fix per stream state protocol backward compatibility (#14032)
* rename state type field to fix backwards compatibility issue

* replace usages of stateType with type
2022-06-22 17:42:02 -07:00
Yevhen Sukhomud
52d6e8d95e 13535 Fixed bastion network for integration tests (#14007) 2022-06-22 22:17:19 +07:00
Yevhen Sukhomud
de057533fb Reverted changes in SshBastionContainer (#13934) 2022-06-20 19:14:30 +07:00
Yevhen Sukhomud
174f15d0c0 13546 Fix integration tests source-postgres Mac OS (#13872)
* 13546 Fix integration tests source-postgres Mac OS
2022-06-20 15:09:01 +07:00
George Claireaux
da95f50555 updated stacktrace format in java trace messages (#13847)
* updated stacktrace format in java trace messages

* test checks specifically on stacktrace in trace message

* remove unused import
2022-06-16 16:58:53 +01:00
LiRen Tu
973f0b1165 Make connector adaptable based on deployment mode (#13522)
* Add deployment mode to env shared with jobs

* Add adaptive runners

* Migrate postgres source to use adaptive runner

* Add an array of specs in docker image spec definition

* Add copyright

* Parse docker image spec with specs list

* Update spec yaml files

* Pass in DEPLOYMENT_MODE to docker compose file

* Revert "Parse docker image spec with specs list"

This reverts commit 8fe41dd3b7.

* Revert changes in docker image spec

* Read cloud specific spec files based on deployment mode

* Revert "Update spec yaml files"

This reverts commit 059f326432.

* Publish cloud spec file if necessary

* Fix upload script

* Move test files

* Update docker compose file

* Format code

* Add comment about spec filename

* Add unit tests

* Remove redundant jdbc acceptance test

When running `PostgresStrictEncryptJdbcSourceAcceptanceTest`, the `discover` method tests always fail because there are unexpected columns in the catalog:
- `wakeup_at`
- `last_visited_at`
- `last_comment_at`

These columns only exist in `PostgresJdbcSourceAcceptanceTest`. And this failure cannot be reproduced locally.

The hypothesis is that when the JDBC unit tests are run on CI, they are run in parallel, and the same testcontainer is used for both tests. That's why the strict encrypt test can discover columns from the oridinary unit test.

Given that the JDBC strict encrypt test is basically redundant, it is removed.
2022-06-15 08:23:54 -07:00
Charles
dd3178ed77 Update destinations to handle new state messages (#13670) 2022-06-14 12:31:58 -07:00
Charles
0886ee06d4 Refactor state management out of BufferStrategy (#13669)
Co-authored-by: Edward Gao <edward.gao@airbyte.io>
2022-06-10 17:30:08 -07:00
Jonathan Pearlin
2b31011bce Separate platform and connector testcontainer versions (#13642)
* Separate platform and connector testcontainer versions

* Fix dependency

* Fix dependency

* Fix dependency usage

* Prevent leaking testcontainer dependencies
2022-06-10 09:34:31 -04:00
terencecho
0e06496d61 Fix build: run gradlew format (#13556) 2022-06-07 10:57:38 -04:00
Yevhen Sukhomud
3ad489eefc 13547 Fixed integration tests source-sftp Mac OS (#13551) 2022-06-07 17:44:15 +07:00
Davin Chia
eb99f47746 Fat Jar: Rename Dir Part 2 (#13478)
## What
Part 2 of https://github.com/airbytehq/airbyte/pull/13122.

Follow up to #13476 .

Explanation for what is happening:

Identically named subprojects have the following issues:

* publishing as is leads to classpath confusion when the jars with the same names are placed in the Java distribution. This leads to NoClassDefFound errors on runtime.
* deconflicting the jar names without changing directory names leads to dependency errors as the OSS jar pom files are generated using project dependencies (suggesting a dependency a sibling subproject in the same repo) that use subprojects group and name as a reference. This means the generated jars look for Jars that do not exists (as their names have been changed) and cannot compile.
* the workaround to changing a subproject's name involves resetting the subproject's name in the settings.gradle and depending on the new name in each build.gradle. This increases configuration burden and decreases the ease of reading, since one will have to check the settings.gradle to know what the right subproject name is. See https://github.com/gradle/gradle/issues/847 for more info.
* given that Gradle itself doesn't have support for identically named subprojects (see the linked issue), the simplest solution is to not allow duplicated directories. I've only renamed conflicting directories here to keep things simple. I will create a follow up issues to enforce non-identical subproject names in our builds.

* Rename airbyte-config:models to airbyte-config:config-models.
* Rename airbyte-config:persistence to airbyte-config:config-persistence.
2022-06-06 02:21:54 +08:00