1
0
mirror of synced 2026-01-05 21:02:13 -05:00
Commit Graph

73 Commits

Author SHA1 Message Date
Davin Chia
8a0d12fc80 Add migrations to support progress bar. (#19191)
Follow up to #18953.

Implement all the DB migrations required for a progress bar.

The main change here is to support saving:

the estimated records/bytes at the sync level
the estimated records/bytes and emitted records/bytes at the stream level
After this, I'll put up a PR for the persistence layer changes, which will writing to and reading from these columns.

Finally, I'll wire this into the API changes, which are currently stubs.

- add the estimated_records and estimated_bytes columns to the SyncStats table.
- create a stream_stats table
  - estimated and emitted records/bytes column
  - contains attempt_id and stream_name columns. Unique constraints on these two columns.
  - foreign key to the attempt_id table.
  - this table hopefully sets us up for the parallel sync work.
2022-11-10 22:35:15 -08:00
perangel
2cb8c984bd Add missing indices for status columns (#19234)
* Add missing indices for `status` columns

* Remove TODO and delete .class files

* Dump schema

* Run gradle format

* Bump database schema version in Bootloader test
2022-11-10 09:21:57 -05:00
VitaliiMaltsev
c72b75e608 Postgres/MySQL Source Strict Encrypt: stop enforce SSL if ssl mode disabled (#19025)
* Postgres/MySQL Source Strict Encrypt: stop enforce SSL if ssl mode disabled

* fixed checkstyle

* updated changelog

* add tests

* replaced MySQL test to mysql-strict-encrypt module

* fixed Connection Refused for mysql test

* replaced Postgres Source strict-encrypt tests into new class

* bump version

* auto-bump connector version

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-11-10 00:59:18 +02:00
Ryan Fu
804af5d8ed Adds TLS check to mongodb destination and migrates util constants (#18892)
* Adds TLS check to mongodb destination and migrates util constants

* Migrates MongodbSourceUitls to general purprose Utils file

* Updates expected_spec.json to include SSH tunnel

* Bumps connector version and removes connector from being hidden in UI

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-11-08 13:21:15 -08:00
andriikorotkov
350d5443a1 Add normalization to destination definition and actor definition table (#18300)
* updated StandardDestinationDefinition.yaml, added normalization and tags to the destination_definition.yaml and added information about normalization and DBT to the ACTOR_DEFINITION table

* updated docs

* updated BootloaderAppTest.java for new migration

* updated schema dump

* Update normalization version and fix bigquery

* Use varchar 255

* Update migration version to the latest

* Update normalized table schema file and add comment

* Revert "Use varchar 255"

This reverts commit e182466e66.

* Use varchar 255

* Add unit test for migration

* Format code

Co-authored-by: Liren Tu <tuliren@gmail.com>
2022-11-04 14:19:50 -07:00
Liren Tu
104c91c519 Fix migration dev center schema dump by run db-specific initialization script (#18984)
* Run db-specific initialization script

* Refactor code

* Use constants

* Add unit test for dev center
2022-11-04 13:28:54 -07:00
Jimmy Ma
74792c1336 Add unsupported_protocol_version column to Connection (#18876) 2022-11-02 16:43:16 -07:00
Ivica Taseski
d9acf47efa 🎉 New destination: Yugabytedb (#18039)
* add yugabytedb destination connector

* add dest def + add changelog

* auto-bump connector version

Co-authored-by: marcosmarxm <marcosmarxm@gmail.com>
Co-authored-by: Marcos Marx <marcosmarxm@users.noreply.github.com>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-10-28 09:16:03 -03:00
Eugene
a3c00fadb3 fixed check-style (#18390) 2022-10-24 21:02:23 +03:00
Eugene
5ab81e6ced 🎉Destination-elasticsearch: added custom sertificate support (#18177)
* [11356] Destination-elasticsearch: added custom certificate support
2022-10-24 19:45:37 +03: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
Benoit Moriceau
adf2c5ff8e Bmoric/remove dep connector worker (#17977)
* test [ci skip]

* Autogenerated files

* Add missing annotation

* Remove unused json2Schema block from worker

* Move tess

* Missing deps and format

* Fix test build

* TMP

* Add missing dependencies

* PR comments

* Tmp

* [ci skip] Tmp

* Fix acceptance test and add the seed dependency

* Fix build

* For diff

* tmp

* Build pass

* make the worker to be  on the platform only

* fix setting.yaml

* remove dependency

* Fix pmd

* Fix Cron

* Add chart

* Fix cron

* Fix server build.gradle

* Fix jar conflict

* PR comments

* Add cron micronaut environemnt

* Update required build path

* remove all dependencies on worker

* Typo

* Add gradle exclusions

* Add exclusion to avoid conflict

* more exclusion

* Move more class

* Exclude worker from the general build

* Fix connector build
2022-10-18 11:51:25 -07:00
Liren Tu
c872042a6b Databricks destination: ensure encrypted JDBC connection (#18032)
* Add ssl=1 to databricks jdbc url

* Bump version

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-10-15 14:10:48 -07:00
Jonathan Pearlin
4ad7c97ac9 Update schema dumps (#17960) 2022-10-13 12:55:30 -04:00
Jonathan Pearlin
27e089eabc Ensure database initialization in test container (#17697)
* Ensure database initialization in test container

* Remove unused import

* Update schema dump

* Add schema dump

Co-authored-by: terencecho <terence@airbyte.io>
2022-10-13 12:17:36 -04:00
Subodh Kant Chaturvedi
4652173311 postgres-source: handle 24:00:00 value for time column (#17782)
* postgres-source: handle 24:00:00 value for time column

* address review comment

* fix test + use LocalTime.MAX

* bump version

* update alloy db as well

* 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-10-12 03:33:35 +05:30
Xiaohan Song
fbead4d7d1 Add a new column in attempts table (#17806)
* migration attempts

* migrator script

* version fix
2022-10-11 11:27:53 -07:00
Michael Siega
7009bbeb82 db migrations to support new webhook operations (#17671) 2022-10-08 00:04:01 +02:00
Anne
b22a4399c8 Add connection migrations for schema changes (#17651) 2022-10-07 13:28:11 -07:00
Jonathan Pearlin
ca302bbc37 Replace env var usage with Flyway configuration (#17628) 2022-10-06 15:38:31 -04:00
terencecho
a7a1c7f916 Create geography_type enum and add geography column in connection and workspace table (#16818)
* init commit of geography_type and column

* add schema dump

* confirm prod database was meant to be changed

* add AUTO to geography

* set default and not nullable, also edit workspace table

* update version number

* update schema dump

Co-authored-by: pmossman <parker@airbyte.io>
2022-10-05 14:39:25 -07:00
Jonathan Pearlin
4ccbc67fff Use constant for keystore prefix in test (#17571) 2022-10-04 13:22:23 -04:00
Rodi Reich Zilberman
d8b0563723 Match entry in client cert keystore to hardcoded postgres driver value (#17515)
* Match entry in client cert keystore to hardcoded postgres driver value

* Match entry in client cert keystore to hardcoded postgres driver value

* auto-bump connector version [ci skip]

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-10-03 19:02:38 -07:00
Greg Solovyev
5f25d2d069 Greg/clickhouse polishing (#17483)
* add icon for clickhouse in destination folder

* use http port only in clickhouse

* declare driver: http for dbt explicitly

* bump destination clickhouse version

Co-authored-by: restrry <restrry@gmail.com>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-10-01 12:40:19 -07:00
Jimmy Ma
89558542f5 Fix format (#17066) 2022-09-22 15:23:20 -07:00
Oleksandr Sheheda
6465aae0dc [16617] Source BigQuery: added user agent header (#16902)
* [16617] Source BigQuery: added user agent header

* [16617] Source BigQuery: added user agent header

* [16617] Source BigQuery: added user agent header
updated image tag, added changelog

* [16617] Source BigQuery: added user agent header
fixed NPE

* auto-bump connector version [ci skip]

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-09-22 21:45:06 +03:00
Anne
e462f695a2 Normalization Summaries table and read/write methods (#16655)
* Add migration to create normalization summaries table
- read/write methods for normalization summary
2022-09-14 14:47:05 -07:00
Jonathan Pearlin
474642868c Convert airbyte-workers to Micronaut (#16434)
* WIP Convert airbyte-workers to Micronaut framework

* Rebase cleanup

* Fix broken tests

* Simplify code

* Support control vs data plane configuration

* make WORFKLOW_PROXY_CACHE non-static to avoid cacheing mocks in unit tests

* Formatting

* Pairing on Worker Micronaut (#16364)

* add RouteToSyncTaskQueue activity

* use new route activity in connection manager workflow

* format

* call router service for task queue

* Revert temporal proxy changes

* Formatting

* Fix default value

* register new route activity in test

* fix SyncWorkflowTest now that it isn't doing any routing

* Update dependencies

* More dependency updates

* Update dependencies

* Improve conditional bean check

* Match existing Optional functionality

* Add notEquals check

* Add missing env var to Helm chart

* Fix typo

* Mark LogConfigs as Singleton

* Env vars for log/state storage type

* Remove use of Optional in bean declarations

* Fix typo in config property name

* Support Temporal Cloud namespace

* Change to @Value

* Use correct value for conditional check

* Upgrade Micronaut

* Fix merge conflict

* Formatting

* Add missing env var

* Use sync task queue environment variable

* Handle sync task queue as set

* format and force http

* Handle case where sync task queue is empty

* Add correct path to config property

* Remove unused import

* Remove unused parameter

* Formatting

* Use pattern for condition process factory beans

* Cleanup

* PR feedback

* Revert hack for testing

Co-authored-by: pmossman <parker@airbyte.io>
2022-09-14 13:10:23 -04:00
VitaliiMaltsev
022b8db345 Destination: BigQuery (denormalized typed struct) - Could not evaluate union, field is expected to be one of these: NULL, STRING. (#16401)
* Fixed bucket naming for S3

* removed redundant configs

* BigQuery Denormalized: Could not evaluate union on Mongo formatted type

* add test

* fixed BigQuery tests

* updated changelog

* replaced star import

* bump version

* auto-bump connector version [ci skip]

* fixed compilation error

* bump mongodb-strict-encrypt

* auto-bump connector version [ci skip]

* removed unused method

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-09-13 19:10:09 +03:00
Subodh Kant Chaturvedi
43076ee3ce improve error message for tables with invalid columns as cursor (#15317)
* implement validation for cursor type before reading data

* rename class

* add test

* fix merge conflicts

* address review comments

* fix test
2022-09-13 12:06:38 +05:30
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
Evan Tahler
834ac1a3bb Remove shared getDockerBuildTask to enable parallel docker builds (#16384)
Define logic in root build.gradle to create a task in each subproject if the subproject contains dockerImageName in the gradle.properties file.

Some caveats:
- We also define a copyGeneratedTar task that is applied to all subprojects with the dockerImageName property.
- This does not need to be used in each subproject. We leave it up to each subproject to define what task is depends on since some projects have more custom copy logic.
2022-09-09 18:40:35 -07:00
Anne
3fc673090d Populate and read from SyncStats table (#16476)
- Populate sync stats table when job is complete
- Method to read from sync stats table
2022-09-08 22:33:29 -07:00
Anne
d856731029 Implement more Error Prone PMD rules (#15491)
* AvoidFieldNameMatchingTypeName rule
* AvoidInstanceofChecksInCatchClause
* compareObjectsWithEquals
* DoNotTerminateVM and ConstructorCallsOverridableMethod
* EmptyIfStmt and EmptyStatementNotInLoop
* ImplicitSwitchFallThrough, InvalidLogMessageFormat, and MoreThanOneLogger
2022-09-07 13:20:32 -07:00
Anne
4ef54ad62f Sync stats migration (#16285)
* Sync stats migration
2022-09-07 12:07:56 -07:00
Pedro S. Lopez
d83abd6672 Remove foreign key constraint for actor_definition_id in actor_oauth_param (#16118)
* add migration

* fmt

* test migration

* update expected migration version

* update schema

* allow specifying a target migration version for the baseline

* run previous migrations in test

* fix pmd

* update migration version
2022-09-01 13:38:30 -04:00
Anne
827e7a55ac Add protocol version migration (#16145)
* Add protocol version migration
2022-08-31 16:01:24 -07:00
Pedro S. Lopez
944b168b2e Fix error finding PostgreSQLContainer in migration tasks (#16146)
* mark libs.platform.testcontainers.postgresql as implementation dep

* use migrations configuration for mig task dependencies

* shuffle things around

* Update build.gradle
2022-08-31 16:42:59 -04:00
Ryan Fu
e560ed7bfe Handle SQLSTATE Exception (08006) when reading records (#15869) 2022-08-31 07:15:53 -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
Subodh Kant Chaturvedi
828285d332 fix temporal type default value bug postgres (#15877)
* fix temporal datatype bug for columns with default in postgres cdc

* fix test

* add test for date and time as well

* add more logs for unknown classes

* review comments

* bump version

* auto-bump connector version [ci skip]

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-08-24 00:00:37 +05:30
Ryan Fu
4572b75845 Moved getConnection into a try-with block and ran gradlew format (#15805) 2022-08-22 19:54:00 -07:00
mkhokh-33
5776dcc949 Mkhokh/8858 cursor fields for incremental update (#14356)
* add logic to skip incremental mode for tables which do not have a field types that could not be used as cursor

* added tests for cursor fields incremental updates

* remove not used methods

* fix tests

* fix formatting

* revert RedshiftInsertDestinationAcceptanceTest

* fix ssl clickhouse test

* fix codereview comments

* fix clickhouse strict encrypt test

* fix postgres source after merge from master

* optimize ssl clickhouse test logic

* fix db2 test

* added check for cursor field should be not nullable, fix formatting

* fixed tests, formatting, issue after merge from master

* fix merge issues

* fix test for source-jdbc and remove some code used for local testing

* added description for cockroach db tests

* test changes

* refactoring for cursor field tests after code review comments

* refactoring for cursor field tests after code review comments

* fix code review comments

* remove unused imports

* fix formatting

* fix compilation error

* fix postgres and postgress ssl test

* Fixed bucket naming for S3

* remove CHAR, NCHAR from possible cursor types

* remove SYMBOL from possible cursor types

* removed redundant configs

* fixed mysql-strict-encrypt tests

* fixed mongodb-v2 tests

* minor format changes

* bump version

* 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]

* auto-bump connector version [ci skip]

Co-authored-by: vmaltsev <ihbectop@gmail.com>
Co-authored-by: subodh <subodh1810@gmail.com>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-08-18 19:48:22 +03: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
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
Subodh Kant Chaturvedi
0092712845 fix postgres data handling from WAL logs in CDC mode (#15481)
* fix postgres data handling from WAL logs in CDC mode

* format

* use formatter for dates also (#15485)

* format

* change test structure

* change log to debug

Co-authored-by: Edward Gao <edward.gao@airbyte.io>
2022-08-10 21:48:57 +05:30
Anne
e9afa9bef3 Error Prone PMD rules (#15010)
* Implement ErrorProne PMD rules:
AssignmentInOperand
AvoidAccessibilityAlteration
AvoidBranchingStatementAsLastInLoop
AvoidCatchingNPE
AvoidCatchingThrowable
AvoidDuplicateLiterals rule
2022-08-09 15:30:48 -07:00
Ryan Fu
23bdd61b43 Make connectionTimeoutMs configurable (#15226)
* Extract connectionTimeout from jdbc_url_params along with corresponding tests

* Fixed linter issues

* Reverted createDataSourceWithConnectionTimeout and migrated logic to get operation

* Fixed dangling createDataSourceWithConnectionTimeout and linter issues

* Fixed import to use java standard library

* Bump Postgres Source and Postgres Source Strict Encrypt versions

* Fixed import ordering issues

* Bumped the connector version [CI fix] for definitions not generated
2022-08-04 16:30:38 -07:00
Yurii Bidiuk
708802d01f 🎉Source Postgres: 13608, 12026, 14590 - Align regular and CDC integration tests and data mappers; improve BCE date handling (#14534)
* 13608 & 12026 - align regular and CDC integration tests and data mappers

* format code

* update int handling

* fix build

* fix PR remarks

* revert changes for money type that are broken by #7338

* bump version

* 🐛 Source Postgres: Improve BCE date handling (#15187)

* 13608 & 12026 - align regular and CDC integration tests and data mappers

* format code

* update int handling

* borked merge - re-delete deleted methods

* enable catalog tests for postgres

* fix build

* fix PR remarks

* revert changes for money type that are broken by #7338

* update BCE handling in JDBC

* reuse existing method

* handle bce dates

* inline methods

* fix JDBC BCE year inconsistency

* use correct data type in test

* format

* Update airbyte-integrations/connectors/source-postgres/src/test-integration/java/io/airbyte/integrations/io/airbyte/integration_tests/sources/AbstractPostgresSourceDatatypeTest.java

Co-authored-by: Edward Gao <edward.gao@airbyte.io>

* pmd fix

* use class.getname()

* fix pmd

* format

* bump version

* handle incremental mode

* clean up diff

* more comments

* unused imports

* format

* versions+changelog

Co-authored-by: Yurii Bidiuk <yura.bidyuk@gmail.com>
Co-authored-by: Yurii Bidiuk <35812734+yurii-bidiuk@users.noreply.github.com>

* auto-bump connector version [ci skip]

Co-authored-by: Edward Gao <edward.gao@airbyte.io>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-08-03 11:39:09 -07:00