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

48 Commits

Author SHA1 Message Date
Benoit Moriceau
434a556dd8 Fix the tag in openAPI (#18445)
* Fix the tag

* remove unused
2022-10-25 14:23:47 -07:00
terencecho
a714175997 Change port for acceptance test destination db (#18391) 2022-10-24 15:38:55 -07:00
Augustin
b564f3eb78 Protocol: make supported_sync_modes a required not empty list on AirbyteStream (#15591) 2022-10-19 15:22:25 +02:00
terencecho
e51756bb23 Skip psql stop in acceptance test for gke (#18023) 2022-10-17 09:48:55 -07:00
Benoit Moriceau
3c457e051d Bmoric/restore temporal cleaning cron (#17258)
* Revert "Revert "Bmoric/temporal cleaning cron (#16414)" (#17192)"

This reverts commit 751667949e.

* Generate an artifact

* Change missing property from value to property
2022-09-27 10:59:39 -07:00
Benoit Moriceau
751667949e Revert "Bmoric/temporal cleaning cron (#16414)" (#17192)
This reverts commit bbb59d8675.
2022-09-26 16:58:23 -07:00
Parker Mossman
e30476e4fd Remove default value from namespaceDefinitionType (#17177)
* remove default value from namespaceDefinitionType

* fix test

* switch some tests to use PATCH-style connection update

* add default logic to connection creation

Co-authored-by: Michael Siega <michael@airbyte.io>
2022-09-26 15:43:17 -07:00
Benoit Moriceau
bbb59d8675 Bmoric/temporal cleaning cron (#16414)
* 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

* 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

* 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

* Add the injected temporal client to airbyte-cron

* Update cron to make it work

* Remove useless Bean factory

* PR comments

* 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

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

* Remove unused parameter

* Formatting

* Use pattern for condition process factory beans

* Cleanup

* PR feedback

* Revert hack for testing

* Fix temporal restart by status (#16447)

* Update application.yml

* Re add worker dep

* Add missing env var

* PR comments

* Bmoric/move temporal client (#16778)

* tmp

* tmp

* View diff

* Move part of the temporal client

* tmp

* copy Temporal Utils test

* Uniq Temporal Utils

* Uniq Temporal Workflow Utils

* Move CancellationHandler

* Move commons-temporal to being shared between platform, connector and CLI

* Rm worker dependency from cron

* Fix build

* Update with right value for cron.

* Fix dep conflict

Co-authored-by: jdpgrailsdev <jpearlin1@gmail.com>
Co-authored-by: pmossman <parker@airbyte.io>
Co-authored-by: Jonathan Pearlin <jonathan@airbyte.io>
2022-09-26 15:14:35 -07:00
Parker Mossman
1a0ea82c34 Change ConnectionUpdate to PATCH behavior (#16157)
* remove operationIds from WebBackendConnectionUpdate, just use operations

* refactor connection updates to patch-style update, where null fields remain unchanged

* better comment and arg name

* format

* make sure we are still 'dual-writing' to the old schedule column, even when the patch doesn't specify anything for it

* update acceptance test to update with new schedule syntax

* add catalog sorting to preserve stream order during patch, and more tests

* format

* add description, throw runtime exception for impossible branches, move streamReset to private helper

* PR suggestions

* add nested test classes and write a test for the catalog sorting method

* format

* add comment clarifying that the catalog sort is for UX, and isn't critical

* format

* format

* update acceptance tests to send proper catalog patches instead of whole new catalog

* format

* format

* simplify catalog patching - now, if a catalog is present on the request, replace the entire catalog with it.
Otherwise, if catalog on the request is null, leave the catalog unchanged

* format

* format

* Revert "update acceptance tests to send proper catalog patches instead of whole new catalog"

This reverts commit 71922648b4e070f46ff6c468813b7ab8dd9d6651.

* adjust description
2022-09-19 18:36:34 -05: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
Michael Siega
3dfe362406 update acceptance tests to use new connection scheduling format (#16167)
* update acceptance tests to use new scheduling format now that frontend has moved over

* readability improvements in sync schedule tests

* fix pmd issues in new acceptance test
2022-09-13 17:11:24 +02:00
terencecho
d9089ed2ce Add is_test db config to test harness (#16117)
* Add is_test db config to test harness

* Add more comments
2022-08-29 16:41:27 -07:00
terencecho
d1f44cc0f5 Revert "Refactor test harness in preparation for cloud acceptance tests (#15932)"
This reverts commit dae056c552.
2022-08-29 14:25:02 -07:00
terencecho
dae056c552 Refactor test harness in preparation for cloud acceptance tests (#15932)
* Add is_test to dbConfig

* temp fix pmd just for testing

* remove strict-enforce postgres specifics

* cleanup spacing

* move common vars to test harness

* Add comment
2022-08-29 09:04:51 -07:00
Lake Mossman
377a1499cf Move 'updateNew' logic into 'update', and remove 'updateNew' (#15863)
* save

* clean up more usages and remove withRefreshedCatalog

* make webapp use correct endpoint

* add back intercept

* fix acceptance test

* fix log

* remove 'new' from test name
2022-08-23 11:36:48 -07:00
Davin Chia
c1d9ff0c7c Fix Kube Acceptance Tests and properly close the created database. (#15587)
Bug fix from #14310 . The build was broken then from before #15497 so this was hidden.

- Add the new env vars to the integration test yamls.
- Also make sure to properly close the destination test container db.
2022-08-11 21:58:00 -07:00
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
terencecho
dd23156ac8 Remove forced ssl_key config in acceptance test harness (#15396) 2022-08-09 10:28:11 -07:00
Davin Chia
fd0b7699a4 Add JUnit Test Reports to build outputs. (#15271)
It's difficult today to parse all the logs from tests. Engineers waste time scrolling through the log outputs and looking for the relevant stack trace.

This PR adds an action to generate a JUnit report so devs can understand test results at a glance. This generates 3 reports for each of the main build jobs when the build completes. We leave the frontend build out since this is aggregated by cypress.

See https://github.com/airbytehq/airbyte/pull/15271/checks?check_run_id=7683783016 for an example of how this works.

Use the https://github.com/dorny/test-reporter action and configure this to look at the Jacoco test report output for top level and second level builds. Note that most of the parameters into the action don't work.

Comment out the trap commands to output logs. Though this can be useful for debugging, there is little practical use in the day-to-day, and results in extremely noisy logs.
2022-08-08 17:04:36 -07:00
Anne
555efd5360 Best Practices PMD rules (#14904)
* Implement BestPractices PMD rules:
- LiteralsFirstInComparisons
- PreserveStackTrace
- SystemPrintln rule
- switch statement should have default
- Use isEmpty rule
- UseVarargs rule
2022-07-22 11:00:36 -07:00
terencecho
08fd5ee3ac Specify postgres destination creation in acceptance tests (#14749)
* remove ssl in config

* edit postgres destination and allow for strict-enforce db schema

* fix order of params

* Fix naming

* Update new tests
2022-07-21 17:20:17 -07: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
Anne
76f9fbaa54 Apply more Best Practices PMD rules (#14772)
* implement PMD rules: 
* AbstractClassWithoutAbstractMethod
* ArrayIsStoredDirectly
* AvoidPrintStackTrace, AvoidReassigningLoopVariables, AvoidReassigningParameters, AvoidUsingHardCodedIP and CheckResultSet
* DoubleBraceInitialization
* MissingOverride
* ForLoopCanBeForeach
*JUnitTest rules
2022-07-20 14:28:47 -07:00
Benoit Moriceau
243d2f0c85 Bmoric/add non cdc partial reset acceptance test (#14764)
* set per stream feature flag to true for testing

* add a second table to cdc acceptance tests

* add partial reset test

* format

* add partial reset cdc tests

* test incremental after partial reset

* remove dev image from acceptance test

* fix flag and add comment

* Revert "set per stream feature flag to true for testing"

This reverts commit 164d7da05990268b09e315eb88ff297d3a9f52f4.

* set USE_STREAM_CAPABLE_STATE flag to true in acceptance test script

* call new update endpoint

* use methods in test harness instead

* remove comment

* add env var to worker container

* format

* fix state check in basic acceptance test

* use test info for test name logging

* Re-add acceptance test

* Re-adda acceptance test

* Format

* Fix acceptance test

* Add log

* remove unwanted changes

Co-authored-by: lmossman <lake@airbyte.io>
2022-07-18 13:29:53 -07:00
Anne
e698710118 Apply Best Practices PMD rules (#14753)
* Apply Unused* Best Practices PMD rules
2022-07-15 15:01:04 -07:00
Lake Mossman
1ccd69a596 lower sleep after wait for successful job (#14725) 2022-07-14 13:14:39 -07:00
Benoit Moriceau
2f0acbf24a Add configuration diff (#14603)
* Add configuration diff

* Change stream descriptor type

* PR comments

* PR comments

* Format

* move to set

* increase waiting time

* Wait after success

* increase sleep
2022-07-14 11:32:12 -07:00
Jimmy Ma
5a7b3a5961 Move helper test functions to AirbyteAcceptanceTestHarness (#14656) 2022-07-14 11:16:45 -07:00
Jimmy Ma
d0649c993c Add legacy update test (#14432)
* Add acceptance test for legacy state when updating a connection with new streams.
2022-07-12 14:48:42 -07:00
Lake Mossman
f8092708bb CDC Acceptance Test (#14370)
* Use Debezium Postgres image for CDC tests

* Formatting

* add cdc acceptance tests

* make method public

* format

* add update destination definition version method

* wait for successful job

* add acceptance tests for incremental with old dest, and for delete + some refactoring

* format

* fix assignment of sourceDbConfig

* fix init

* remove logs

* increase timeout on deleteConnection test to prevent transient failures

* TEMPORARY add logs to help with debugging CI failures

* add -i to acceptance test for debugging

* add back destinationPsql start to see if it fixes the issue

* Revert "add -i to acceptance test for debugging"

This reverts commit 693a955041.

* Revert "TEMPORARY add logs to help with debugging CI failures"

This reverts commit a30efd2c54.

* fix timestamp comparison

Co-authored-by: jdpgrailsdev <jpearlin1@gmail.com>
2022-07-08 13:45:44 -07:00
Lake Mossman
139e822968 Use single state aggregator when per-stream feature flag is off (#14507)
* use single state aggregator when per-stream feature flag is off

* make var final

* add acceptance test for multiple stream incremental sync
2022-07-07 13:01:28 -07:00
Jonathan Pearlin
8fda5879ae Use Debezium Postgres image for CDC tests (#14318)
* Use Debezium Postgres image for CDC tests

* Formatting
2022-07-05 12:47:23 -04:00
Jonathan Pearlin
6dadd1b4b8 Add acceptance tests for per-stream state updates (#14263)
* Add acceptance tests for per-stream state updates

* PR feedback

* Formatting

* More PR feedback

* PR feedback

* Remove unused constant
2022-06-30 15:03:45 -04:00
Jonathan Pearlin
f4e2b8e949 Add ability to provide source/destination connector docker image (#14266)
* Add ability to provide source/destination connector docker image

* Make constant public
2022-06-29 14:13:10 -04:00
terencecho
77423b4568 Refactor acceptance tests and utils (#13950)
* Refactor Basic acceptance tests and utils

* Refactor Advanced acceptance tests and utils

* Remove unused code

* Clear destination db data during cleanup

* Cleanup comments

* cleanup init code

* test creating new desintation db for each test

* cleanup desintation db init

* Allow to edit api client

* pull in temporal cloud changes

* Rename helper to harness; set some funcs to private; turn init into constructor

* add func to set env vars instead of using static vars and move some functionality out of init into acceptance tests

* update javadoc

Co-authored-by: Davin Chia <davinchia@gmail.com>

* fix javadoc formatting

* fix var naming

Co-authored-by: Davin Chia <davinchia@gmail.com>
2022-06-25 15:55:32 -04:00
LiRen Tu
545a7a3eb6 🎉 JDBC source: adjust fetch size based on max memory and max row size (#13435)
* Switch to measure max row byte size

* Reduce fetch size change logs

* Update unit tests

* Determine jdbc buffer size based on max memory

* Bump postgres version

* Bump postgres version

* Bump mysql version

* Bump mssql version

* Format java code

* Increase hikari connection timeout

* Update data source default parameters

* auto-bump connector version

* Mark postgres 0.4.21 as not published

* Revert "Bump mysql version"

This reverts commit ad9135258c.

* Fix unit test

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
2022-06-07 14:29:34 -07:00
Alexandre Girard
3894134d11 Bump year in license short to 2022 (#13191)
* Bump to 2022

* format
2022-05-25 17:56:49 -07: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
Benoit Moriceau
bcab466d1b Add integration test annotations (#8035)
Add annotations to run Integration and slow integration test.
2021-11-22 16:28:43 -08:00
Charles
ba44f700b9 add final for params, local variables, and fields (#7084) 2021-10-15 16:41:04 -07:00
Michel Tricot
1773e41e47 Shorten our headers + adds contributors file (#6478) 2021-09-27 10:45:50 -07:00
Eugene
4399656ec9 🎉 Source Cockroachdb: Added new source for Cockroachdb (#4382)
* [1705] Added cockroachdb source connector
2021-07-01 22:04:21 +03:00
Davin Chia
b04c080c95 Kube Queueing POC (#3464)
* Use CDK to generate source that can be configured to emit a certain number of records and always works.

* Checkpoint: socat works from inside the docker container.

* Override the entry point.

* Clean up and add ReadMe.

* Clean up socat.

* Checkpoint: connect to Kube cluster and list all the pods.

* Checkpoint: Sync worker pod is able to send output to the destination pod.

* Checkpoint: Sync worker creates Dest pod if none existed previously. It also waits for the pod to be ready before doing anything else. Sync worker will also remove the pod on termination.

* update readme

* Checkpoint: Dest pod does nott restart after finishing. Comment out delete command in Sync worker.

* working towards named pipes

* named pipes working

* update readme

* WIP named pipe / socat sidecar kube port forwarding (#3518)

* nearly working sources

* update

* stdin example

* move all kube testing yamls into the airbyte-workers directories. sort the airbyte-workers resource folder; place all the poc yamls together.

* Format.

* Put back the original KubeProcessBuilderFactory.

* Fix slight errors.

* Checkpoint: Worker pod knows its own IP. Successfully starts and writes to Dest pod after refactor.

* remove unused file and update readme

* Dest pod loops back into worker pod. However, the right messages do not seem to be passing in.

* Switch back to worker ip.

* SWEET VICTORY!.

* wrap kube pod in process (#3540)

also clean up kubernetes deploys.

* More clean up. (#3586)

The first 6 points of #3464.

The only interesting thing about this PR is the kube pod shutdown. For whatever reason, the OkHttpPool isn't respecting the evictAll call and 1 idle thread remains. So instead of shutting down immediately, the worker pod shuts down after 5 mins when the idle thread id reaped. There isn't an easy way to modify the pool's idle reap configuration now. I do not think this issue is blocking since it's relatively benign, so I vote we create a ticket and come back to this once we do an e2e test.

* Implements redirecting standard error as well. (#3623)

* Clean up before next implementation.

* kube process launching (#3790)

* processes must handle file mounting

* remove comment

* default to base entrypoint

* use process builder factory / select stdin / use a pool of ports

* fix up

* add super hacky copying example

* Checkpoint: Works end to end!

* Checkpoint: Use API to make sure init container is ready instead of blind sleep. Propagate exception in DefaultCheckConnectionWorker.

* Refactor KubePodProcess. Checked to make sure everything still works.

* Format.

* Clean up code. Begin putting this into variables and breaking up long constructor function.

* Add comments to explain what is happening.

* fix normalization test

* increase timeout for initcontainer

Co-authored-by: Davin Chia <davinchia@gmail.com>

* facepalm moment

* clean up kube poc pr (#3834)

* clean up

* remove source-always-works

* create separate commons-docker

* fix test

* enable kube e2e tests (#3866)

* enable kube e2e tests

* use more generally accepted env definition

* use new runners

* use its own runner and install minikube differently

* update name

* use kubectl alias

* use link instead of alias that doesn't propagate

* start minikube

* use driver=none

* go back to using action

* mess with versions

* revert runner

* install socat

* print logs after run

* also try re-runnining tasks

* always wait for file transfer

* use ports

* increase wait timeout for kube

* use different localhost ips and bump normalization to include an entrypoint

* proposed fix

* all working locally

* revert temporary changes

* revert normalization image change that's happening in a separate pr

* readability

* final comment

* Working Kube Cancel. (#3983)

* Port over the basic changes.

* Add logic to return proper exit code in the event of termination. Add comments to explain why.

* revert envs change and merge master to fix kube acceptance tests (#4012)

* use older env format

* fix build

Co-authored-by: jrhizor <me@jaredrhizor.com>
Co-authored-by: Jared Rhizor <jared@dataline.io>
2021-06-09 18:12:39 -07:00
Charles
e4d0707781 Destination Checkpointing: Add StateMessage handing to BufferedStreamConsumer (#3230) 2021-05-07 13:05:52 -07:00
Davin Chia
b9014acfca :tada Namespace support. Supported source-destination pairs will now sync data into the same namespace as the source. (#2862)
This PR introduces the following behavior for JDBC sources:
Instead of streamName = schema.tableName,  this is now streamName = tableName and namespace = schema. This means that, when replicating from these sources, data will be replicated into a form matching the source. e.g. public.users (postgres source) -> public.users (postgres destination) instead of current behaviour of public.public_users. Since MySQL does not have schemas, the MySQL source uses the database as it's namespace.

To do so:
- Make namespace a field class concept in Airbyte Protocol. This allows the source to propagate namespace and destinations to write to a source-defined namespace. Also sets us up for future namespace related configurability.
- Add an optional namespace field to the AirbyteRecordMessage. This field will be set by sources that support namespace.
- Introduce AirbyteStreamNameNamespacePair as a type-safe manner of identifying streams throughout our code base.
- Modify base_normalisation to better support source defined namespace, specifically allowing normalisation of tables with the same name to different schemas.
2021-04-17 15:33:22 +08:00
Davin Chia
e11ccfd0a1 Revert "Remove schema from stream name. (#2807)" (#2857)
This reverts commit 6e9d6fce59.
2021-04-12 14:56:11 -07:00
Davin Chia
6e9d6fce59 Remove schema from stream name. (#2807)
Last step (besides documentation) of namespace changes. This is a follow up to #2767 .

After this change, the following JDBC sources will change their behaviour to the behaviour described in the above document.

Namely, instead of streamName = schema.tableName, this will become streamName = tableName and namespace = schema. This means that, when replicating from these sources, data will be replicated into a form matching the source. e.g. public.users (postgres source) -> public.users (postgres destination) instead of current behaviour of public.public_users. Since MySQL does not have schemas, the MySQL source uses the database as it's namespace.

I cleaned up some bits of the CatalogHelpers. This affected the destinations, so I'm also running the destination tests.
2021-04-12 21:02:29 +08:00
Michel Tricot
e3737a2c06 Introducing Airbyte (#348) 2020-09-18 20:41:09 -07:00