1
0
mirror of synced 2025-12-21 02:51:29 -05:00
Commit Graph

249 Commits

Author SHA1 Message Date
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
Davin Chia
83a89aa843 Fat Jar: Rename Dir Part 1 (#13476)
Part 1 of #13122.

Rename airbyte-db:lib to airbyte-db:db-lib.
Rename airbyte-metrics:lib to airbyte-metrics:metrics-lib
Rename airbyte-protocol:models to airbyte-protocol:protocol-models.

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 Projects with same name lead to unintended conflict resolution gradle/gradle#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.
2022-06-06 00:35:43 +08:00
Alexandre Girard
3894134d11 Bump year in license short to 2022 (#13191)
* Bump to 2022

* format
2022-05-25 17:56:49 -07:00
Evan Tahler
91d6d29085 AirbyteExceptionHandler should exit with a non-0 exit code (#12856) 2022-05-16 11:17:40 -07:00
George Claireaux
2af780db3e base-java: Add utility for AirbyteTraceMessage and naively emit on any connector error (#12614)
* added AirbyteLoggedException class

* adding in int runr

* changes

* refactored to AirbyteTracedException to align with python impl.

* added catch for Exceptions that are already AirbyteTracedException

* refactor to static class & catch with UncaughtExceptionHandler

* testing ExceptionHandler

* add tests

* added docs section on using AirbyteTraceMessageUtility

* made AirbyteMessage maker methods more intuitive

* fix spotbugs errors

* format
2022-05-12 11:08:52 +01:00
Jonathan Pearlin
ebb9f3e1ac Prepare Database Access Layer for Dependency Injection (#12546)
* Prepare database access objects for dependency injection

* Replace duplicate code

* Remove unused imports

* Remove redundant validation call

* Remove unused imports

* Use constants

* Disable fast fail during connection pool initialization

* Remove typo

* Add missing test dependency

* Add missing test dependency

* Add missing test dependency

* Fix issue caused by rebase

* Add method for cloud

* Autoclose DSL context during migration

* Better connection close handling

* Fix typo in dependency

* Fix SpotBugs issue

* React to rebase

* Fix typo

* Update JavaDoc

* Fix database close calls

* Pass configs to getServer

* Fix typo

* Fix call to removed method

* Fix typo

* Use catalog to manage versions

* PR feedback

* Centralize shutdown hook

* Fix rebase issues

* Document test cases

* Document test cases

* Formatting

* Properly close database resources

* Rebase cleanup
2022-05-09 15:26:54 -04:00
Edward Gao
3d416129c7 🐛 Prevent sources from hanging if they have orphaned threads (#12544) 2022-05-03 18:48:43 -07:00
Greg Solovyev
53e625a511 Bump mina-sshd from 2.7.0 to 2.8.0 (#12376)
this is an attempt to merge the main change
from  https://github.com/airbytehq/airbyte/pull/11514,
which now has multiple conflicts.

The gist of the change

When creating a Postgres destination connector with SSH tunnel method 'SSH Key Authentication', one is required to provide a RSA key. Creating a rsa-sha2-256 or rsa-sha2-512 key, will result in the error SshException: KeyExchange signature verification failed for key type=ssh-rsa, if you haven't enabled ssh-rsa in the SSH server's host key algorithms.

mina-sshd in version 2.7.0 uses the wrong server key signature algorithm during DH group key exchange. https://issues.apache.org/jira/browse/SSHD-1163.

Bumping mina-sshd to version 2.8.0 addresses this issue. Changelog https://github.com/apache/mina-sshd/blob/master/docs/changes/2.8.0.md.
2022-04-26 14:37:50 -07:00
Parker Mossman
884a94ed29 Un-Revert OSS branch build for Cloud workflow (#11808)
* Revert "Revert "Build OSS branch for deploying to Cloud env (#11474)""

This reverts commit 55e3c1e051.

* add action to get dev branch tag to OSS project instead of doing it in cloud

* remove dev branch version action, going to do this in cloud afterall
2022-04-08 15:17:04 -07:00
LiRen Tu
8bd2d9b518 🎉 BigQuery destination: use serialized buffer for gcs staging (#11776)
* Rebase bigquery changes to master

* Add comments

* Uncomment test code

* Format code

* Bump versions

* Fix denormalized destination target table name

* Fix avro schema for denormalized destination

* Remove unnecessary params from consumer factory

* Add back previous version

* Add warning about standard mode

* auto-bump connector version

* Bump version for bigquery in seed

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-04-07 16:59:19 -07:00
lmossman
55e3c1e051 Revert "Build OSS branch for deploying to Cloud env (#11474)"
This reverts commit 189efe7b42.
2022-04-05 15:44:31 -07:00
Parker Mossman
189efe7b42 Build OSS branch for deploying to Cloud env (#11474)
* add VERSION buildArg to Dockerfiles, default to current airbyte version but overwritable

* use VERSION env var consistently as Dockerfile buildArg, jar version, and tag

pass version and image_tag into docker build task function

* add github action for building and pushing an OSS branch for Cloud to consume

* allow AirbyteVersion to validate versions containing 'oss-branch' prefix

* change oss-branch prefix to dev for branch-based versions

* better action name

* add docker-compose-cloud.build.yaml to define minimum set of cloud images that are pushed by oss branch action

* update local dev docs to describe optional usage of VERSION env var

* make branch_version_tag input optional, if not provided, generates dev-<commit_hash>

* fix typo

* fix missed merge conflict

* update docker docs

* update integrationRunner isDev check
2022-04-05 15:06:17 -07:00
Christophe Duong
848bb349b5 🎉 Change destination-s3 buffering to reduce/stabilize memory/thread consumption (#11294)
* Refactor destination-s3 to use the new serialization strategy and get memory usage under control
2022-03-28 17:40:44 +02:00
LiRen Tu
21ec23cc31 🐞 Fix invalid char in snowflake & bigquery namespace (#10793)
* Add namespace test for snowflake

* Enable namespace test for bigquery

* Format code

* Capitalize test case id

* Update exception message to point to test case file

* Update snowflake name transformer to prepend underscore

* Override convertStreamName instead of getIdentifier

* Add missing state message

* Remove unused import

* Disable more namespace test cases

We don't want to introduce changes that will affect existing connections for now.

* Dry method that mutates namespace

* Pass through null

* Normalize namespace

* Fix test case

* Revert consumer factory changes

* Normalize namespace in catalog

* Revert catalog normalization

* Enable namespace test for all snowflake destination tests

* Test namespace for both bigquery destination tests

* Add unit test for bigquery name transformer

* Transform bigquery schema name

* Fix avro name transformer

* Normalize avro namespace

* Standardize namespace in gcs utils

* Bump version for snowflake and bigquery

* Enable namespace test for bigquery denormalized

* Dry bigquery denormalized acceptance test

* Revert some of the variable scope change

* Fix unit test

* Bump version

* Introduce getNamespace method

* Implement getNamespace method for bigquery

* Switch to getNamespace methods

* Update comments

* Fix bigquery denormalized acceptance test

* Format code

* Dry bigquery destination test

* Skip partition test for gcs mode

* Bump version
2022-03-19 17:47:24 -07:00
Christophe Duong
298551d501 🎉 Change destination-snowflake buffering when staging to reduce/stabilize memory/thread consumption (#10866)
* Refactor Snowflake internal Staging as model to share staging abilities in jdbc destinations

* Switch Snowflake Copy Destination for Staging destination based off Internal Staging

Co-authored-by: LiRen Tu <tuliren.git@outlook.com>

* Bumpversion of destination-snowflake
2022-03-19 00:13:59 +01:00
LiRen Tu
462cdd6aad Remove sentry flag in integration runner (#11224)
When Sentry is not initialized it will just do nothing. So it is always safe to call the captureMessage method.
2022-03-17 02:32:44 -07:00
Charles
5fde59fdbd add spotbugs (#10522) 2022-03-11 12:05:17 -08:00