* Revert "Revert "Destination Bigquery: Scaffolding for destinations v2 (#27268)""
This reverts commit 348c577dbb.
* version bumps+changelog
* Speed up BQ by having 2 queries, and not an OR (#27981)
* 🐛 Destination Bigquery: fix bug in standard inserts for syncs >10K records (#27856)
* only run t+d code if it's enabled
* dockerfile+changelog
* remove changelog entry
* Destinations V2: handle optional fields for `object` and `array` types (#27898)
* catch null schema
* fix null properties
* clean up
* consolidate + add more tests
* try catch
* empty json test
* Automated Commit - Formatting Changes
* remove todo
* destination bigquery: misc updates to 1s1t code (#28057)
* switch to checkedconsumer
* add unit test for buildColumnId
* use flag
* restructure prefix check
* fix build
* more type-parsing fixes (#28100)
* more type-parsing fixes
* handle duplicates
* Automated Commit - Format and Process Resources Changes
* add tests for asColumns
* Automated Commit - Format and Process Resources Changes
* log warnings instead of throwing exception
* better log message
* error level
---------
Co-authored-by: edgao <edgao@users.noreply.github.com>
* Automated Commit - Formatting Changes
* Improve protocol type parsing (#28126)
* Automated Commit - Formatting Changes
* Change from T&D every 10k records to an increasing time based interval (#28130)
* fifteen minute t&d
* add typing and deduping operation valve for increased intervals of typing and deduping
* Automated Commit - Format and Process Resources Changes
* resolve bizarre merge conflict
* Automated Commit - Format and Process Resources Changes
---------
Co-authored-by: jbfbell <jbfbell@users.noreply.github.com>
* Simplify and speed up CDC delete support [DestinationsV2] (#28029)
* Simplify and speed up CDC delete support [DestinationsV2]
* better QUOTE
* spotbugs?
* recompile dbt image for local arch and use that when building images
* things compile, but tests fail
* tests working-ish
* comment
* fix logic to re-insert deleted records for cursor comparison.
tests pass!
* remove comment
* Skip CDC re-include logic if there are no CDC columns
* stop hardcoding pk (#28092)
* wip
* remove TODOs
---------
Co-authored-by: Edward Gao <edward.gao@airbyte.io>
* update method name
* Automated Commit - Formatting Changes
* depend on pinned normalization version
* implement 1s1t DATs for destination-bigquery (#27852)
* intiial implementation
* Automated Commit - Formatting Changes
* add second sync to test
* do concurrent things
* Automated Commit - Formatting Changes
* clarify comment
* minor tweaks
* more stuff
* Automated Commit - Formatting Changes
* minor cleanup
* lots of fixes
* handle sql vs json null better
* verify extra columns
* only check deleted_at if in DEDUP mode and the column exists
* add full refresh append test case
* Automated Commit - Formatting Changes
* add tests for the remaining sync modes
* Automated Commit - Formatting Changes
* readability stuff
* Automated Commit - Formatting Changes
* add test for gcs mode
* remove static fields
* Automated Commit - Formatting Changes
* add more test cases, tweak test scaffold
* cleanup
* Automated Commit - Formatting Changes
* extract recorddiffer
* and use it in the sql generator test
* fix
* comment
* naming+comment
* one more comment
* better assert
* remove unnecessary thing
* one last thing
* Automated Commit - Formatting Changes
* enable concurrent execution on all java integration tests
* add test for default namespace
* Automated Commit - Formatting Changes
* implement a 2-stream test
* Automated Commit - Formatting Changes
* extract methods
* invert jsonNodesNotEquivalent
* Automated Commit - Formatting Changes
* fix conditional
* pull out diffSingleRecord
* Automated Commit - Formatting Changes
* handle nulls correctly
* remove raw-specific handling; break up methods
* Automated Commit - Formatting Changes
---------
Co-authored-by: edgao <edgao@users.noreply.github.com>
Co-authored-by: octavia-approvington <octavia-approvington@users.noreply.github.com>
* Destinations V2: move create raw tables earlier (#28255)
* move create raw tables
* better log message
* stop building normalization (#28256)
* fix ability to run tests
* disable incremental t+d for now
* Automated Commit - Formatting Changes
---------
Co-authored-by: Evan Tahler <evan@airbyte.io>
Co-authored-by: Cynthia Yin <cynthia@airbyte.io>
Co-authored-by: cynthiaxyin <cynthiaxyin@users.noreply.github.com>
Co-authored-by: edgao <edgao@users.noreply.github.com>
Co-authored-by: Joe Bell <joseph.bell@airbyte.io>
Co-authored-by: jbfbell <jbfbell@users.noreply.github.com>
Co-authored-by: octavia-approvington <octavia-approvington@users.noreply.github.com>
162 lines
7.5 KiB
Groovy
162 lines
7.5 KiB
Groovy
import org.apache.tools.ant.taskdefs.condition.Os
|
|
|
|
plugins {
|
|
id 'airbyte-docker'
|
|
id 'airbyte-python'
|
|
}
|
|
|
|
airbytePython {
|
|
moduleDirectory 'normalization'
|
|
}
|
|
|
|
dependencies {
|
|
implementation project(':airbyte-connector-test-harnesses:acceptance-test-harness')
|
|
}
|
|
|
|
// we need to access the sshtunneling script from airbyte-workers for ssh support
|
|
task copySshScript(type: Copy, dependsOn: [project(':airbyte-connector-test-harnesses:acceptance-test-harness').processResources]) {
|
|
from "${project(':airbyte-connector-test-harnesses:acceptance-test-harness').buildDir}/resources/main"
|
|
into "${buildDir}"
|
|
include "sshtunneling.sh"
|
|
}
|
|
|
|
// make sure the copy task above worked (if it fails, it fails silently annoyingly)
|
|
task checkSshScriptCopy(type: Task, dependsOn: copySshScript) {
|
|
doFirst {
|
|
assert file("${buildDir}/sshtunneling.sh").exists() :
|
|
"Copy of sshtunneling.sh failed, check that it is present in airbyte-workers."
|
|
}
|
|
}
|
|
|
|
airbyteDocker.dependsOn(checkSshScriptCopy)
|
|
assemble.dependsOn(checkSshScriptCopy)
|
|
test.dependsOn(checkSshScriptCopy)
|
|
|
|
integrationTest.dependsOn(build)
|
|
|
|
|
|
static def getDockerfile(String customConnector) {
|
|
return "${customConnector}.Dockerfile"
|
|
}
|
|
|
|
static def getDockerImageName(String customConnector) {
|
|
return "airbyte/normalization-${customConnector}"
|
|
}
|
|
|
|
static def getImageNameWithTag(String customConnector) {
|
|
return "${getDockerImageName(customConnector)}:dev"
|
|
}
|
|
|
|
|
|
def buildAirbyteDocker(String customConnector) {
|
|
// def baseCommand = ['docker', 'build', '.', '-f', getDockerfile(customConnector), '-t', getImageNameWithTag(customConnector)]
|
|
// As the base dbt image (https://hub.docker.com/r/fishtownanalytics/dbt/tags) we are using is only build for amd64, we need to use buildkit to force builds for your local environment
|
|
// We are lucky that all the python code dbt uses is mutli-arch compatible
|
|
|
|
def arch = 'linux/amd64'
|
|
if (Os.isArch("aarch_64") || Os.isArch("aarch64")) {
|
|
arch = 'linux/arm64'
|
|
}
|
|
|
|
def cmdArray = ['docker', 'buildx', 'build', '--load', '--platform', arch, '-f', getDockerfile(customConnector), '-t', getImageNameWithTag(customConnector), '.']
|
|
// println("Building normalization container: " + cmdArray.join(" "))
|
|
|
|
return {
|
|
commandLine cmdArray
|
|
}
|
|
}
|
|
|
|
task airbyteDockerMSSql(type: Exec, dependsOn: checkSshScriptCopy) {
|
|
configure buildAirbyteDocker('mssql')
|
|
dependsOn assemble
|
|
}
|
|
task airbyteDockerMySql(type: Exec, dependsOn: checkSshScriptCopy) {
|
|
configure buildAirbyteDocker('mysql')
|
|
dependsOn assemble
|
|
}
|
|
task airbyteDockerOracle(type: Exec, dependsOn: checkSshScriptCopy) {
|
|
configure buildAirbyteDocker('oracle')
|
|
dependsOn assemble
|
|
}
|
|
task airbyteDockerClickhouse(type: Exec, dependsOn: checkSshScriptCopy) {
|
|
configure buildAirbyteDocker('clickhouse')
|
|
dependsOn assemble
|
|
}
|
|
task airbyteDockerSnowflake(type: Exec, dependsOn: checkSshScriptCopy) {
|
|
configure buildAirbyteDocker('snowflake')
|
|
dependsOn assemble
|
|
}
|
|
task airbyteDockerRedshift(type: Exec, dependsOn: checkSshScriptCopy) {
|
|
configure buildAirbyteDocker('redshift')
|
|
dependsOn assemble
|
|
}
|
|
task airbyteDockerTiDB(type: Exec, dependsOn: checkSshScriptCopy) {
|
|
configure buildAirbyteDocker('tidb')
|
|
dependsOn assemble
|
|
}
|
|
task airbyteDockerDuckDB(type: Exec, dependsOn: checkSshScriptCopy) {
|
|
configure buildAirbyteDocker('duckdb')
|
|
dependsOn assemble
|
|
}
|
|
|
|
airbyteDocker.dependsOn(airbyteDockerMSSql)
|
|
airbyteDocker.dependsOn(airbyteDockerMySql)
|
|
airbyteDocker.dependsOn(airbyteDockerOracle)
|
|
airbyteDocker.dependsOn(airbyteDockerClickhouse)
|
|
airbyteDocker.dependsOn(airbyteDockerSnowflake)
|
|
airbyteDocker.dependsOn(airbyteDockerRedshift)
|
|
airbyteDocker.dependsOn(airbyteDockerTiDB)
|
|
airbyteDocker.dependsOn(airbyteDockerDuckDB)
|
|
|
|
task("customIntegrationTestPython", type: PythonTask, dependsOn: installTestReqs) {
|
|
module = "pytest"
|
|
command = "-s integration_tests"
|
|
|
|
dependsOn ':airbyte-integrations:bases:base-normalization:airbyteDocker'
|
|
dependsOn ':airbyte-integrations:connectors:destination-bigquery:airbyteDocker'
|
|
dependsOn ':airbyte-integrations:connectors:destination-mysql:airbyteDocker'
|
|
dependsOn ':airbyte-integrations:connectors:destination-postgres:airbyteDocker'
|
|
dependsOn ':airbyte-integrations:connectors:destination-redshift:airbyteDocker'
|
|
dependsOn ':airbyte-integrations:connectors:destination-snowflake:airbyteDocker'
|
|
dependsOn ':airbyte-integrations:connectors:destination-oracle:airbyteDocker'
|
|
dependsOn ':airbyte-integrations:connectors:destination-mssql:airbyteDocker'
|
|
dependsOn ':airbyte-integrations:connectors:destination-clickhouse:airbyteDocker'
|
|
dependsOn ':airbyte-integrations:connectors:destination-tidb:airbyteDocker'
|
|
dependsOn ':airbyte-integrations:connectors:destination-duckdb:airbyteDocker'
|
|
}
|
|
|
|
// not really sure what this task does differently from customIntegrationTestPython, but it seems to also run integration tests
|
|
// and as such it depends on the docker images.
|
|
project.tasks.findByName('_customIntegrationTestsCoverage').dependsOn ':airbyte-integrations:bases:base-normalization:airbyteDocker'
|
|
project.tasks.findByName('_customIntegrationTestsCoverage').dependsOn ':airbyte-integrations:connectors:destination-bigquery:airbyteDocker'
|
|
project.tasks.findByName('_customIntegrationTestsCoverage').dependsOn ':airbyte-integrations:connectors:destination-mysql:airbyteDocker'
|
|
project.tasks.findByName('_customIntegrationTestsCoverage').dependsOn ':airbyte-integrations:connectors:destination-postgres:airbyteDocker'
|
|
project.tasks.findByName('_customIntegrationTestsCoverage').dependsOn ':airbyte-integrations:connectors:destination-redshift:airbyteDocker'
|
|
project.tasks.findByName('_customIntegrationTestsCoverage').dependsOn ':airbyte-integrations:connectors:destination-snowflake:airbyteDocker'
|
|
project.tasks.findByName('_customIntegrationTestsCoverage').dependsOn ':airbyte-integrations:connectors:destination-oracle:airbyteDocker'
|
|
project.tasks.findByName('_customIntegrationTestsCoverage').dependsOn ':airbyte-integrations:connectors:destination-mssql:airbyteDocker'
|
|
project.tasks.findByName('_customIntegrationTestsCoverage').dependsOn ':airbyte-integrations:connectors:destination-clickhouse:airbyteDocker'
|
|
project.tasks.findByName('_customIntegrationTestsCoverage').dependsOn ':airbyte-integrations:connectors:destination-tidb:airbyteDocker'
|
|
project.tasks.findByName('_customIntegrationTestsCoverage').dependsOn ':airbyte-integrations:connectors:destination-duckdb:airbyteDocker'
|
|
|
|
// DATs have some additional tests that exercise normalization code paths,
|
|
// so we want to run these in addition to the base-normalization integration tests.
|
|
// If you add more items here, make sure to also to have CI fetch their credentials.
|
|
// See git history for an example.
|
|
// TODO reenable these - they're causing flakiness in our test results, need to figure that out
|
|
// integrationTest.dependsOn(":airbyte-integrations:connectors:destination-bigquery:integrationTest")
|
|
// integrationTest.dependsOn(":airbyte-integrations:connectors:destination-postgres:integrationTest")
|
|
// integrationTest.dependsOn(":airbyte-integrations:connectors:destination-snowflake:integrationTest")
|
|
|
|
integrationTest.dependsOn("customIntegrationTestPython")
|
|
customIntegrationTests.dependsOn("customIntegrationTestPython")
|
|
|
|
// TODO fix and use https://github.com/airbytehq/airbyte/issues/3192 instead
|
|
task('mypyCheck', type: PythonTask) {
|
|
module = "mypy"
|
|
command = "normalization --config-file ${project.rootProject.file('pyproject.toml').absolutePath}"
|
|
|
|
dependsOn 'blackFormat'
|
|
}
|
|
check.dependsOn mypyCheck
|