Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mostly incremental builds #817

Merged
merged 50 commits into from
Nov 9, 2020
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
060ec70
support cached builds for base -> base-java -> snowflake
jrhizor Nov 4, 2020
b94f4ab
use plugin for image building
jrhizor Nov 5, 2020
24171c3
fix matching on COPY from
jrhizor Nov 5, 2020
edd36dc
remove docker.gradle
jrhizor Nov 6, 2020
2016a73
tmp commit
jrhizor Nov 6, 2020
36ead13
update connectors
jrhizor Nov 6, 2020
9fdd284
finish rest of build files
jrhizor Nov 6, 2020
d6d09f9
fix ide errors
jrhizor Nov 6, 2020
be95f42
more build fixes
jrhizor Nov 6, 2020
03a1393
clean up
jrhizor Nov 6, 2020
208f0af
Merge branch 'master' into jrhizor/cached-builds
jrhizor Nov 6, 2020
b6e076a
clean up for new soruces
jrhizor Nov 6, 2020
27f1e28
fix spotless
jrhizor Nov 6, 2020
1ff42a9
fix flake problems
jrhizor Nov 6, 2020
e9cef8a
add recommended empty file
jrhizor Nov 6, 2020
ca1dabe
python caching
jrhizor Nov 6, 2020
8352dc3
fixes upon review
jrhizor Nov 6, 2020
4eedce6
clean up docker and build test files
jrhizor Nov 6, 2020
f9cba3e
clean up python
jrhizor Nov 6, 2020
e0a998a
clean up
jrhizor Nov 6, 2020
b3bef1f
fix integration test dependencies
jrhizor Nov 6, 2020
2428b31
fix standard tests
jrhizor Nov 6, 2020
1180db1
fix
jrhizor Nov 6, 2020
04790b8
remove symlink
jrhizor Nov 6, 2020
4fd0188
re-add requirements to fix normalizatioon build
jrhizor Nov 6, 2020
04095ba
fix symlink
jrhizor Nov 6, 2020
a630943
fix dumbest build problem of all
jrhizor Nov 7, 2020
6084b9e
add missing integration test def
jrhizor Nov 7, 2020
f00b926
fix missing dep
jrhizor Nov 7, 2020
0e876a9
remove class exclusion
jrhizor Nov 9, 2020
0b20853
move trim so null source versions are allowed
jrhizor Nov 9, 2020
846d644
rename map
jrhizor Nov 9, 2020
7a3bd26
fix hardcoded value
jrhizor Nov 9, 2020
03748c4
remove unnecessary dep
jrhizor Nov 9, 2020
28a7842
use dashes for salesforce package name
jrhizor Nov 9, 2020
36b0624
fix typo
jrhizor Nov 9, 2020
a4a7247
DRY and fix test image name
jrhizor Nov 9, 2020
fa68d84
Fix edit
jrhizor Nov 9, 2020
91bf92a
assert string is not empty
jrhizor Nov 9, 2020
f55b21d
build integration test image only for integrationTest
jrhizor Nov 9, 2020
807928d
move code generator to tools and rename docker build tasks
jrhizor Nov 9, 2020
3cab313
make source test depend on integration test build, not the other way
jrhizor Nov 9, 2020
2e77962
remove guard because the docker build should exist before the integra…
jrhizor Nov 9, 2020
33e8163
remove comment
jrhizor Nov 9, 2020
2105e73
DRY up airbyte-source-test
jrhizor Nov 9, 2020
fc500d5
fix plugin compilation
jrhizor Nov 9, 2020
742e32d
Merge branch 'master' into jrhizor/cached-builds
jrhizor Nov 9, 2020
0d6b376
add missing dependency
jrhizor Nov 9, 2020
c3b6c5d
rename getTaggedImage to getDevTaggedImage
jrhizor Nov 9, 2020
a5dee9d
fix test vs main docker build bug
jrhizor Nov 9, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ build
!tools/build
.DS_Store
data
.dockerversions

secrets

Expand Down
15 changes: 10 additions & 5 deletions airbyte-integrations/bases/airbyte-protocol/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
project.ext.pyModule = 'airbyte_protocol'
apply from: rootProject.file('tools/gradle/commons/integrations/python.gradle')
apply from: rootProject.file('tools/gradle/commons/integrations/image.gradle')
plugins {
id 'airbyte-python'
id 'airbyte-docker'
}

airbytePython {
moduleDirectory 'airbyte_protocol'
}

task generateProtocolClassFilesWithoutLicense(type: Exec) {
environment 'ROOT_DIR', rootDir.absolutePath
commandLine 'bin/generate-protocol-files.sh'
dependsOn ':airbyte-integrations:bases:airbyte-protocol:code-generator:buildImage'
dependsOn ':airbyte-integrations:bases:code-generator:airbyteDocker'
}

// todo: figure out dependencies
task generateProtocolClassFiles(dependsOn: [generateProtocolClassFilesWithoutLicense, rootProject.spotlessPython])
rootProject.spotlessPython.mustRunAfter(generateProtocolClassFilesWithoutLicense)

rootProject.build.dependsOn generateProtocolClassFiles

This file was deleted.

7 changes: 3 additions & 4 deletions airbyte-integrations/bases/base-java/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
plugins {
id 'java-library'
id 'airbyte-docker'
}

apply from: rootProject.file('tools/gradle/commons/integrations/image.gradle')

dependencies {
implementation 'commons-cli:commons-cli:1.4'

implementation project(':airbyte-config:models')
implementation project(':airbyte-protocol:models')
}

buildImage.dependsOn ':airbyte-integrations:bases:base:buildImage'
implementation files(project(':airbyte-integrations:bases:base').airbyteDocker.outputs)
}
19 changes: 9 additions & 10 deletions airbyte-integrations/bases/base-normalization/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
project.ext.pyModule = 'normalization'
apply from: rootProject.file('tools/gradle/commons/integrations/python.gradle')
apply from: rootProject.file('tools/gradle/commons/integrations/image.gradle')
plugins {
id 'airbyte-docker'
id 'airbyte-python'
}

task unitTest(type: PythonTask){
command = "setup.py test"
airbytePython {
moduleDirectory 'normalization'
}

unitTest.dependsOn(installReqs)
build.dependsOn(unitTest)
build.dependsOn ':airbyte-integrations:bases:airbyte-protocol:build'
buildImage.dependsOn ':airbyte-integrations:bases:base:buildImage'
buildImage.dependsOn ':airbyte-integrations:bases:airbyte-protocol:buildImage'
dependencies {
implementation files(project(':airbyte-integrations:bases:airbyte-protocol').airbyteDocker.outputs)
}
4 changes: 3 additions & 1 deletion airbyte-integrations/bases/base-normalization/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@
install_requires=["airbyte-protocol", "dbt==0.18.1"],
package_data={"": ["*.yml"]},
setup_requires=["pytest-runner"],
tests_require=["pytest"],
entry_points={
"console_scripts": [
"transform-config=normalization.transform_config.transform:main",
"transform-catalog=normalization.transform_catalog.transform:main",
],
},
extras_require={
"tests": ["airbyte-protocol", "pytest"],
},
)

This file was deleted.

16 changes: 11 additions & 5 deletions airbyte-integrations/bases/base-python-test/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
project.ext.pyModule = 'base_python_test'
apply from: rootProject.file('tools/gradle/commons/integrations/python.gradle')
apply from: rootProject.file('tools/gradle/commons/integrations/image.gradle')
plugins {
id 'airbyte-docker'
id 'airbyte-python'
}

build.dependsOn(':airbyte-integrations:bases:base-python:build')
buildImage.dependsOn(':airbyte-integrations:bases:base-python:buildImage')
airbytePython {
moduleDirectory 'base_python_test'
}

dependencies {
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
}
18 changes: 12 additions & 6 deletions airbyte-integrations/bases/base-python/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
project.ext.pyModule = 'base_python'
apply from: rootProject.file('tools/gradle/commons/integrations/python.gradle')
apply from: rootProject.file('tools/gradle/commons/integrations/image.gradle')
plugins {
id 'airbyte-docker'
id 'airbyte-python'
}

build.dependsOn ':airbyte-integrations:bases:airbyte-protocol:build'
buildImage.dependsOn ':airbyte-integrations:bases:base:buildImage'
buildImage.dependsOn ':airbyte-integrations:bases:airbyte-protocol:buildImage'
airbytePython {
moduleDirectory 'base_python'
}

dependencies {
implementation files(project(':airbyte-integrations:bases:airbyte-protocol').airbyteDocker.outputs)
implementation files(project(':airbyte-integrations:bases:base').airbyteDocker.outputs)
}
17 changes: 11 additions & 6 deletions airbyte-integrations/bases/base-singer/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
project.ext.pyModule = 'base_singer'
apply from: rootProject.file('tools/gradle/commons/integrations/python.gradle')
apply from: rootProject.file('tools/gradle/commons/integrations/image.gradle')
plugins {
id 'airbyte-docker'
id 'airbyte-python'
}

build.dependsOn ':airbyte-integrations:bases:airbyte-protocol:build'
build.dependsOn ':airbyte-integrations:bases:base-python:build'
buildImage.dependsOn ':airbyte-integrations:bases:base-python:buildImage'
airbytePython {
moduleDirectory 'base_singer'
}

dependencies {
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
}
4 changes: 3 additions & 1 deletion airbyte-integrations/bases/base/build.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
apply from: rootProject.file('tools/gradle/commons/integrations/image.gradle')
plugins {
id 'airbyte-docker'
}
3 changes: 3 additions & 0 deletions airbyte-integrations/bases/code-generator/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id 'airbyte-docker'
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ dependencies {

implementation 'org.junit.jupiter:junit-jupiter-api:5.4.2'
implementation 'org.junit.jupiter:junit-jupiter-params:5.4.2'

}
11 changes: 4 additions & 7 deletions airbyte-integrations/bases/standard-source-test/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
plugins {
id 'application'
id 'airbyte-docker'
}

apply from: rootProject.file('tools/gradle/commons/integrations/image.gradle')
application {
mainClass = 'io.airbyte.integrations.base.TestPythonSourceMain'
}

dependencies {
implementation project(':airbyte-config:models')
Expand All @@ -15,9 +18,3 @@ dependencies {
implementation 'org.junit.platform:junit-platform-launcher:1.7.0'
implementation 'org.junit.jupiter:junit-jupiter-api:5.4.2'
}

application {
mainClass = 'io.airbyte.integrations.base.TestPythonSourceMain'
}

buildImage.dependsOn(assemble)
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
plugins {
id 'application'
id 'airbyte-docker'
id 'airbyte-integration-test-java'
}

apply from: rootProject.file('tools/gradle/commons/integrations/image.gradle')
apply from: rootProject.file('tools/gradle/commons/integrations/integration-test.gradle')
application {
mainClass = 'io.airbyte.integrations.destination.{{snakeCase name}}.{{properCase name}}Destination'
}

dependencies {
implementation project(':airbyte-config:models')
implementation project(':airbyte-protocol:models')
implementation project(':airbyte-integrations:bases:base-java')

integrationTestImplementation project(':airbyte-integrations:bases:destination-test-lib')
}

application {
mainClass = 'io.airbyte.integrations.destination.{{snakeCase name}}.{{properCase name}}Destination'
implementation files(project(':airbyte-integrations:bases:base-java').airbyteDocker.outputs)
}

buildImage.dependsOn(assemble)
buildImage.dependsOn(':airbyte-integrations:bases:base-java:buildImage')
integrationTest.dependsOn(buildImage)
Original file line number Diff line number Diff line change
@@ -1,33 +1,13 @@
project.ext.pyModule = 'source_{{snakeCase name}}'
apply from: rootProject.file('tools/gradle/commons/integrations/python.gradle')
apply from: rootProject.file('tools/gradle/commons/integrations/image.gradle')
apply from: rootProject.file('tools/gradle/commons/integrations/test-image.gradle')
apply from: rootProject.file('tools/gradle/commons/integrations/integration-test.gradle')
apply from: rootProject.file('tools/gradle/commons/integrations/standard-source-test-python.gradle')


standardSourceTestPython {
ext {
imageName = "${extractImageName(project.file('Dockerfile'))}:dev"
pythonContainerName = "${extractImageName(project.file('Dockerfile.test'))}:dev"
}
plugins {
id 'airbyte-python'
id 'airbyte-docker'
id 'airbyte-source-test'
}

task installTestDeps(type: PythonTask){
module = "pip"
command = "install .[tests]"
airbytePython {
moduleDirectory 'source_{{snakeCase name}}'
}

task unitTest(type: PythonTask){
module = "pytest"
command = "unit_tests"
dependencies {
implementation files(project(':airbyte-integrations:bases:base-python').airbyteDocker.outputs)
}

unitTest.dependsOn(installTestDeps)
build.dependsOn(unitTest)
build.dependsOn ':airbyte-integrations:bases:base-python-test:build'
buildImage.dependsOn ':airbyte-integrations:bases:base-python:buildImage'
integrationTest.dependsOn(buildImage)

buildTestImage.dependsOn ':airbyte-integrations:bases:base-python-test:buildImage'
standardSourceTestPython.dependsOn(buildTestImage)
Original file line number Diff line number Diff line change
@@ -1,34 +1,13 @@
project.ext.pyModule = 'source_{{snakeCase name}}_singer'
apply from: rootProject.file('tools/gradle/commons/integrations/python.gradle')
apply from: rootProject.file('tools/gradle/commons/integrations/image.gradle')
apply from: rootProject.file('tools/gradle/commons/integrations/test-image.gradle')
apply from: rootProject.file('tools/gradle/commons/integrations/integration-test.gradle')
apply from: rootProject.file('tools/gradle/commons/integrations/standard-source-test-python.gradle')


standardSourceTestPython {
ext {
imageName = "${extractImageName(project.file('Dockerfile'))}:dev"
pythonContainerName = "${extractImageName(project.file('Dockerfile.test'))}:dev"
}
plugins {
id 'airbyte-python'
id 'airbyte-docker'
id 'airbyte-source-test'
}

task installTestDeps(type: PythonTask){
module = "pip"
command = "install .[tests]"
airbytePython {
moduleDirectory 'source_{{snakeCase name}}_singer'
}

task unitTest(type: PythonTask){
module = "pytest"
command = "unit_tests"
dependencies {
implementation files(project(':airbyte-integrations:bases:base-singer').airbyteDocker.outputs)
}

unitTest.dependsOn(installTestDeps)
build.dependsOn(unitTest)
build.dependsOn ':airbyte-integrations:bases:base-python-test:build'

buildImage.dependsOn ':airbyte-integrations:bases:base-singer:buildImage'
buildTestImage.dependsOn ':airbyte-integrations:bases:base-python-test:buildImage'

integrationTest.dependsOn(buildImage)
standardSourceTestPython.dependsOn(buildTestImage)
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
plugins {
id 'application'
id 'airbyte-docker'
id 'airbyte-integration-test-java'
}

apply from: rootProject.file('tools/gradle/commons/integrations/image.gradle')
apply from: rootProject.file('tools/gradle/commons/integrations/integration-test.gradle')
application {
mainClass = 'io.airbyte.integrations.destination.bigquery.BigQueryDestination'
}

dependencies {
implementation 'com.google.cloud:google-cloud-bigquery:1.122.2'
Expand All @@ -16,12 +19,5 @@ dependencies {

integrationTestImplementation project(':airbyte-integrations:bases:destination-test-lib')

implementation files(project(':airbyte-integrations:bases:base-java').airbyteDocker.outputs)
}

application {
mainClass = 'io.airbyte.integrations.destination.bigquery.BigQueryDestination'
}

buildImage.dependsOn(assemble)
buildImage.dependsOn(':airbyte-integrations:bases:base-java:buildImage')
integrationTest.dependsOn(buildImage)
15 changes: 6 additions & 9 deletions airbyte-integrations/connectors/destination-csv/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
plugins {
id 'application'
id 'airbyte-docker'
id 'airbyte-integration-test-java'
}

apply from: rootProject.file('tools/gradle/commons/integrations/image.gradle')
apply from: rootProject.file('tools/gradle/commons/integrations/integration-test.gradle')
application {
mainClass = 'io.airbyte.integrations.destination.csv.CsvDestination'
}

dependencies {
implementation 'org.apache.commons:commons-csv:1.4'
Expand All @@ -12,12 +15,6 @@ dependencies {
implementation project(':airbyte-integrations:bases:base-java')

integrationTestImplementation project(':airbyte-integrations:bases:destination-test-lib')
}

application {
mainClass = 'io.airbyte.integrations.destination.csv.CsvDestination'
implementation files(project(':airbyte-integrations:bases:base-java').airbyteDocker.outputs)
}

buildImage.dependsOn(assemble)
buildImage.dependsOn(':airbyte-integrations:bases:base-java:buildImage')
integrationTest.dependsOn(buildImage)
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
plugins {
id 'application'
id 'airbyte-docker'
id 'airbyte-integration-test-java'
}

apply from: rootProject.file('tools/gradle/commons/integrations/image.gradle')
apply from: rootProject.file('tools/gradle/commons/integrations/integration-test.gradle')
application {
mainClass = 'io.airbyte.integrations.destination.postgres.PostgresDestination'
}

dependencies {
implementation project(':airbyte-db')
Expand All @@ -15,12 +18,6 @@ dependencies {

integrationTestImplementation project(':airbyte-integrations:bases:destination-test-lib')
integrationTestImplementation "org.testcontainers:postgresql:1.15.0-rc2"
}

application {
mainClass = 'io.airbyte.integrations.destination.postgres.PostgresDestination'
implementation files(project(':airbyte-integrations:bases:base-java').airbyteDocker.outputs)
}

buildImage.dependsOn(assemble)
buildImage.dependsOn(':airbyte-integrations:bases:base-java:buildImage')
integrationTest.dependsOn(buildImage)
Loading