1
0
mirror of synced 2025-12-20 10:32:35 -05:00
Commit Graph

238 Commits

Author SHA1 Message Date
Ryan Fu
73900fad3e JDBC connections to support checkpointing (#24604)
* Shifted logic within JDBC connections to support checkpointing

* Bumped version numbers and updated changelog
2023-04-05 18:32:28 +00:00
Rodi Reich Zilberman
cd928a7844 Fix all tests to pass on local and CI environments (#24683)
* test docker behavior on CI env

* Automated Change

* test docker behavior on CI env

* Make all unit and integration tests in source-postgres pass locally

* Fix mysql ssh integration test

* Fix failing test

* Fix source-mssql build

* source-mssql runss tests locally.
Fix compilation errors

---------

Co-authored-by: rodireich <rodireich@users.noreply.github.com>
2023-04-03 12:30:11 -07:00
Greg Solovyev
5f1eb87444 Fix destination integration tests (#24431)
* MS SQL does not support schema change in incremental model
* make schema change test optional
* fix compilation errors in postgres-strict-encrypt destination
* deparallelize integration tests for destination postgres
* deparalellize MS SQL integration tests
* remove broken SSH tunnel test from destination-postgres-strict-encrypt
2023-03-24 10:41:47 -07:00
Akash Kulkarni
245b1f1ce3 Running the formatter (#23919)
Running "./gradlew :spotlessJavaApply" on the codebase
2023-03-09 20:59:00 +00:00
Sherif A. Nada
e85eda088e Remove ExtendedNameTrasformer (#23655) 2023-03-07 17:22:08 -08:00
Peter Hu
e5eac0a4cc use published protocol models jar (#22498)
* add airbyte-protocol to deps.toml

* use published protocol jar for platform

* use published protocol jar for connectors

* point at published jar

* fix dep

* bump gcs storage

* fix build failures in standard-source-test

* fix deps

* downgrade alloy db because it is missing strictness tests

* Revert "downgrade alloy db because it is missing strictness tests"

This reverts commit cc6089d053.

---------

Co-authored-by: cgardens <charles@airbyte.io>
2023-02-13 12:50:43 -06:00
Cole Snodgrass
2e099acc52 update headers from 2022 -> 2023 (#22594)
* It's 2023!

* 2022 -> 2023

---------

Co-authored-by: evantahler <evan@airbyte.io>
2023-02-08 13:01:16 -08:00
Cole Snodgrass
2385175495 remove unused test utils (#22464)
* wip; rem unused code

* change visibibility of helper classes; move test code to usage sites

* replace SchemaTableNamePair with record class

* rename io.airbyte.test.airbyte_test_container -> io.airbyte.test.container

* pr-feedback; remove references to deleted annotations

* remove deprecated gh actions
2023-02-07 11:33:51 -08:00
Augustin
6c2b9a164b destination acceptance tests: get normalization and dbt support from definition (#21299) 2023-01-18 20:00:47 +01:00
Yevhen Sukhomud
2a5d0344e7 Fix formatting (#20570)
* Fix formatting

* try fixing quote escapes?

* unignore sql files

Co-authored-by: Edward Gao <edward.gao@airbyte.io>
2022-12-16 13:43:42 -08:00
Jimmy Ma
094aff1520 Java connectors use protocol v0 objects (#20404)
* Dupl v0 objects

* v0 namespace swap

* Introduce some object conversions in the tests

* Update source-java-jdbc template

* Use v0 objects in db-lib

* Fix more protocol object references

* Fix arg capture in tests
2022-12-15 13:39:50 -08:00
Eugene
33dfd5d6be Fixed "Ensure no file change" build issue. Only checkstyle changes, no logic chnages (#17885) 2022-10-12 15:06:28 +03:00
Pedro S. Lopez
938436bcc9 update connector specs and definitions with new .com documentation urls (#17585)
* update definitions with new .com docs urls

* update docs urls in specs

* update generators

* regenerate scaffold connectors

* remove unrelated changes

* update more urls

* update specs

* fix tests

* run `:airbyte-config:specs:generateSeedConnectorSpecs` to fix formatting

* revert docs changes to make pr more reviewable

* revert generator readme changes to make more reviewable

* fix mysql strict encrypt expected spec

* fix postgres expected spec
2022-10-11 11:04:23 -04:00
Evan Tahler
49cb3360de Remove redundant title labels from connector specs (#17544)
* Remove redundant title labels from connector specs

* Manually update specs

* add env variable

* Remove debugging log
2022-10-05 12:58:38 -07:00
Rodi Reich Zilberman
248da78ba7 Make error more descriptive in case of no encryption state (#17299)
* Make error more descriptive in case of no encryption state

* Fix failing test

* Change error message on strict-encrypt postgres destination as well. Fix failing test

* update versions and changelogs

* auto-bump connector version [ci skip]

* 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-09-28 15:26:09 -07: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
Adam Fletcher
80397adbe1 🐛 Destination Postgres: fix missing database name URL Encoding (#16046)
* Fix missing database name URL Encoding in Postgres destination

* add unit test

* bump connector version and update doc

* auto-bump connector version [ci skip]

Co-authored-by: marcosmarxm <marcosmarxm@gmail.com>
Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-09-08 21:17:29 -03:00
Rodi Reich Zilberman
fc13413c9b Enforce secure connection in destination-postgres-strict-encrypt (#16260)
* Enforce secure connection in destination-postgres-strict-encrypt

* bump docker image values and update changelog.

* Typo

* auto-bump connector version [ci skip]

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-09-02 00:47: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
Eugene
36319d70b2 [15245] Destination-mysql: fixed normalization tests after changes in python part (#15362)
Destination-mysql: fixed normalization tests after changes in python part
2022-08-05 15:14:20 +03:00
Eugene
9110bd9f3b 🐛Destination-postgres: fixed normalization java tests after changes in Python part (#15289)
* [15236] destination-Postgres: fixed normalization java tests after changes in Python part. Now datetime is stored as a datetime type in db after normalization, previously it was a String
2022-08-04 12:36:29 +03:00
George Claireaux
dd234974a6 fix HikariPool error on postgres destination integration tests (#15165)
* add ed's hikari fix

* fix maybe?

* remove debug lines

* revert bandaid
2022-08-01 17:57:51 +01:00
mkhokh-33
2d0640a8cd fixed formatting (#14958) 2022-07-22 16:00:26 +03:00
Ryan Fu
063b01f51c De-duplicate config parameters (#14781)
* Migrated 'ssl' string to become a constant in JdbcUtils

* Migrated 'database' string to become a constant in JdbcUtils

* Migrated 'username' string to become a constant in JdbcUtils

* Migrated 'password' string to become a constant in JdbcUtils

* Migrated 'schema' string to become a constant in JdbcUtils and updated corresponding config params

* Migrated 'jdbc_url' string to become a constant in JdbcUtils

* Migrated 'connection_properties' string to become a constant in JdbcUtils

* Migrated list of 'host_key' string to become a constant in JdbcUtils

* Migrated list of 'port_key' string to become a constant in JdbcUtils

* Migrated 'host_key' string to become a constant in JdbcUtils and updated corresponding config params

* Migrated 'port_key' string to become a constant in JdbcUtils

* Migrated 'tls' string to become a constant in JdbcUtils

* Migrated 'schemas' string to become a constant in JdbcUtils

* Migrated 'encryption' string to become a constant in JdbcUtils

* Migrated 'jdbc_url_params' string to become a constant in JdbcUtils and fixed uncaught parenthesis

* Fixed linter issues with comments on AcceptanceTest and failed import statement
2022-07-21 16:05:21 -07:00
Ryan Fu
5edf3fed71 🚨 Validate source JDBC url parameters 🚨 (#14586)
* Moved toDatabaseConfigStatic subfunction into the main toDatabaseConfig function

* Moved Postgres JDBC_URL_PARAMS_KEY into JdbcUtils to reduce redundancy

* Migrated useSsl method into JdbcUtils to remove duplication

* Created constants for config parameters to match PostgresDestination

* Add validation check for overwritten connection properties

* Added test coverage for useSsl and clarifying javadoc comments

* Updated useSsl tests to match linter and javadoc comments for useSsl

* Fixed isCDC method with proper PostgresUtil function and corresponding imports

* Bumping Dockerfile and adding changelog description

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-07-15 11:24:59 -07:00
Jimmy Ma
6653cd30a3 Bump destination-postgres to 0.3.21 (#14479)
* Bump destination-postgres to 0.3.21

Goal is to trigger a publish of the arm64 build

* Update destination/postgres changelog

* auto-bump connector version

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-07-14 16:58:46 -07:00
Yevhen Sukhomud
52d6e8d95e 13535 Fixed bastion network for integration tests (#14007) 2022-06-22 22:17:19 +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
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
Oleksandr Sheheda
44a43f0338 Improve check connection performance for all JDBC-related DBs (#12820)
* removed redundant read permission check for destination

* bump docker image versions, update definitions and changelog

* bump docker image versions, update definitions and changelog

* update changelog

* fix for MSSQL and Oracle tests

* fix for MSSQL strict encrypt

* fixed conflicts

* revert versions that were not published
2022-05-24 16:06:01 +03:00
Topher Lubaway
013a886f4f Fixes Spotless and runs spotless (#13040)
zipped files with JSON extension made this task sad
2022-05-20 07:26:55 -05:00
Jonathan Pearlin
fdaf335279 Better database connection handling for connectors (#12743)
* Better database connection handling for connectors

* Log connection error

* Properly close connection

* Remove unused method

* Close data source

* Use utility to close data source

* Use utility to close data source

* PR feedback

* Add Databricks driver

* Use driver class enum

* Use correct config

* Ensure config created before use

* Fix failing integration test

* Create DSLContext before use

* Address integration test failures

* Ensure DSLContext is closed

* Fix compile error

* Use correct datasource

* Use correct connection properties

* Close DSLContext

* Close DSLContext

* Fix integration test failures

* Properly close datasource

* Fix compilation issues

* Use existing database object

* Wrap close in try/finally

* Update test

* Wrap close in try/finally

* Ensure DSLContext is created

* Revert change to test

* Use correct data source

* Remove unused import

* More cleanup

* Add missing annotation

* Only initialize data source once

* Remove unused import

* Force testcontainers version

* Fix testcontainer issue

* Fix failing test

* Properly close all data sources

* Clear data sources after closing

* Fix compile error

* Fix compilation error

* Add missing method
2022-05-13 16:28:38 -04: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
Andrii Leonets
ade0056236 Destination Postgres : Enable DAT and fix the data fetch. (#12543)
* Enable DAT for Postgres and fix the data fetch.
Move JDBC abstract part for tests to the JdbcDestinationAcceptanceTest.java

* Remove unnecessary deserialization + add jsonb to json transformation.

* Remove unnecessary deserialization from ssh
2022-05-04 14:27:21 +03:00
noahkawasaki-airbyte
d46058e456 🎉 Destination Postgres: Add jdbc_url_params input (#12195)
* Add jdbc_url_params input for Destination Postgres
2022-04-25 08:12:31 -07:00
Greg Solovyev
63f6fc5712 Update destination-postgres version in Dockerfile and docs (#12290)
* Update destination-postgres version in Dockerfile and docs

* Manually bump destination-postgres version
2022-04-22 18:44:52 -07:00
Yurii Bidiuk
af1d087d22 Revert "DAT: verify that a destination is able to write any ISO8601-compliant date string (#9816)" (#11802)
This reverts commit 2f850b98ac.
2022-04-08 19:39:40 +03:00
VitaliiMaltsev
a0b7dd0289 🐛 Destination Redshift and Postgres handle custom namespace with '-' (#11729)
* fix for jdk 17

* add CHANGELOG

* JdbcBufferedConsumerFactory resolve namespace with dash

* add CHANGELOG

* bump versions

* bump postgres version

* update destination-jdbc version

Co-authored-by: vmaltsev <vitalii.maltsev@globallogic.com>
2022-04-07 13:08:57 +03:00
Yurii Bidiuk
2f850b98ac DAT: verify that a destination is able to write any ISO8601-compliant date string (#9816)
* added format_reference.txt, edited edge_case_messages.txt, edge_case_catalog.json

* updated due to comments

* fix message order for destiantion acceptance tests

* remove unused import

* handle date-time messages for destiantion acceptance tests

* refactoring

* format code

* remove non iso8601 date

* add comments

* fixed pubsub tests

* add test date with microseconds

* fix comments

* fixed PR remarks

* fix assertion for nested objects

* format code

* fix remarks

* format code

* add additional check to convert only datetime values

* changed key structure for saved date-time fieds

* format code

* add comments

* refactored iteration

* format code

* pubsub bump version

Co-authored-by: Oleksandr Bazarnov <oleksandr.bazarnov@globallogic.com>
2022-04-05 14:04:02 +03:00
Charles
5fde59fdbd add spotbugs (#10522) 2022-03-11 12:05:17 -08:00
Christophe Duong
744e0d5f13 Refactor Snowflake internal Staging as a base class for other staging classes (#10865)
* Refactor Snowflake internal Staging as model to share staging abilities in jdbc destinations
2022-03-11 15:29:12 +01:00
girarda
5d8cb41150 Refactor to enable support for optional JDBC parameters for all JDBC destinations (#10421)
* refactoring to allow testing

* MySQLDestination uses connection property map instead of url arguments

* Update jdbc destinations

* A little more generic

* reset to master

* reset to master

* move to jdbcutils

* Align when multiline

* Align when multiline

* Update postgres to use property map

* Move tests to AbstractJdbcDestinationTest

* clean

* Align when multiline

* return property map

* Add postgres tests

* update clickhouse

* reformat

* reset

* reformat

* fix test

* reformat

* fix bug

* Add mssql tests

* refactor test

* fix oracle destination test

* oracle tests

* fix redshift acceptance test

* Pass string

* Revert "Pass string"

This reverts commit 697821738c.

* Double deserialization

* Revert "Double deserialization"

This reverts commit ee8d75245b.

* try updating json_operations

* Revert "try updating json_operations"

This reverts commit c8022c2994.

* json parse

* Revert "json parse"

This reverts commit 11a6725eaa.

* Revert "Revert "Double deserialization""

This reverts commit 213f47acc4.

* Revert "Revert "Revert "Double deserialization"""

This reverts commit 66822454af.

* move to constant

* Add comment

* map can be constant

* Add comment

* move map

* hide in method

* no need to create new map

* no need to create new map

* no need to create new map

* enably mysql test

* Update changelogs

* Update changelog

* update changelog

* Bump versions

* bump version

* disable dbt support

* update spec

* update other oracle tests

* update doc

* bump seed

* fix source test

* update seed spec file

* fix expected spec
2022-02-28 09:25:04 -08:00
LiRen Tu
6301cfa91f 🎉 Destination snowflake: reduce memory consumption (#10297)
* Avoid redundant adapter construction

* Remove unused logger

* Avoid redundant creation of buffer map

* Decrease max batch byte size to 128 mb

* Format code

* Move data adapter to an instance variable

* Bump version

* Bump version in seed
2022-02-14 23:37:54 -08:00
Lake Mossman
3d8a0dc048 Add ExitOnOutOfMemoryError to java connectors and bump versions (#10256) 2022-02-14 15:49:15 -08:00
VitaliiMaltsev
e30d8348b2 Change JsonSchemaPrimitive to a class (#9913)
* fix for jdk 17

* add JsonSchemaType class

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix Oracle tests

* fix Redshift tests

* fix Redshift tests

* fix checkstyle

* fix MSSQL tests

* fix cockroachdb tests

* fix checkstyle

* fix checkstyle

* replace star imports

* replace star imports

* replace star imports

* update JsonSchemaType | fixed checkstyle

* Remove unused variables in test

* Fix imports

* Expand imports

* Fix more imports

Co-authored-by: vmaltsev <vitalii.maltsev@globallogic.com>
Co-authored-by: Liren Tu <tuliren.git@outlook.com>
2022-02-14 02:12:37 -08:00
Serhii Chvaliuk
844dd93122 Use multi-stage builds in dockerfiles to reduce java images (#9077)
* use multi-stage to reduce image size

Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
2021-12-23 22:27:05 +02:00
Oleksandr Sheheda
f0a9945f80 Revert "Change copy to add in dockerfiles to reduce container size (#8516)" (#8997)
This reverts commit 8ac2c6f4
2021-12-21 16:01:17 +02:00
Haoran Yu
8ac2c6f4a7 Change copy to add in dockerfiles to reduce container size (#8516)
Co-authored-by: Oleksandr Sheheda <alexandr-shegeda@users.noreply.github.com>
2021-12-16 23:52:59 -03:00
oneshcheret
fcf7491fee 🐛 Validate incorrect handling '\n' symbols in ssh key (#8371)
* 🐛 Validate \n in ssh key

* bump versions for ssh key connectors

* update versions for ssh key connectors

* temporal fix for checking failed tests

* revert temp changes and destination oracle version

* bump versions in config for ssh key related connectors
2021-12-03 20:11:51 +02:00