-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Changes from 22 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 b94f4ab
use plugin for image building
jrhizor 24171c3
fix matching on COPY from
jrhizor edd36dc
remove docker.gradle
jrhizor 2016a73
tmp commit
jrhizor 36ead13
update connectors
jrhizor 9fdd284
finish rest of build files
jrhizor d6d09f9
fix ide errors
jrhizor be95f42
more build fixes
jrhizor 03a1393
clean up
jrhizor 208f0af
Merge branch 'master' into jrhizor/cached-builds
jrhizor b6e076a
clean up for new soruces
jrhizor 27f1e28
fix spotless
jrhizor 1ff42a9
fix flake problems
jrhizor e9cef8a
add recommended empty file
jrhizor ca1dabe
python caching
jrhizor 8352dc3
fixes upon review
jrhizor 4eedce6
clean up docker and build test files
jrhizor f9cba3e
clean up python
jrhizor e0a998a
clean up
jrhizor b3bef1f
fix integration test dependencies
jrhizor 2428b31
fix standard tests
jrhizor 1180db1
fix
jrhizor 04790b8
remove symlink
jrhizor 4fd0188
re-add requirements to fix normalizatioon build
jrhizor 04095ba
fix symlink
jrhizor a630943
fix dumbest build problem of all
jrhizor 6084b9e
add missing integration test def
jrhizor f00b926
fix missing dep
jrhizor 0e876a9
remove class exclusion
jrhizor 0b20853
move trim so null source versions are allowed
jrhizor 846d644
rename map
jrhizor 7a3bd26
fix hardcoded value
jrhizor 03748c4
remove unnecessary dep
jrhizor 28a7842
use dashes for salesforce package name
jrhizor 36b0624
fix typo
jrhizor a4a7247
DRY and fix test image name
jrhizor fa68d84
Fix edit
jrhizor 91bf92a
assert string is not empty
jrhizor f55b21d
build integration test image only for integrationTest
jrhizor 807928d
move code generator to tools and rename docker build tasks
jrhizor 3cab313
make source test depend on integration test build, not the other way
jrhizor 2e77962
remove guard because the docker build should exist before the integra…
jrhizor 33e8163
remove comment
jrhizor 2105e73
DRY up airbyte-source-test
jrhizor fc500d5
fix plugin compilation
jrhizor 742e32d
Merge branch 'master' into jrhizor/cached-builds
jrhizor 0d6b376
add missing dependency
jrhizor c3b6c5d
rename getTaggedImage to getDevTaggedImage
jrhizor a5dee9d
fix test vs main docker build bug
jrhizor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ build | |
!tools/build | ||
.DS_Store | ||
data | ||
.dockerversions | ||
|
||
secrets | ||
|
||
|
24 changes: 0 additions & 24 deletions
24
airbyte-integrations/bases/airbyte-protocol/airbyte_protocol/models/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,2 @@ | ||
""" | ||
MIT License | ||
|
||
Copyright (c) 2020 Airbyte | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
""" | ||
|
||
# generated by generate-protocol-files | ||
from .airbyte_message import * |
24 changes: 0 additions & 24 deletions
24
airbyte-integrations/bases/airbyte-protocol/airbyte_protocol/models/airbyte_message.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
2 changes: 0 additions & 2 deletions
2
airbyte-integrations/bases/airbyte-protocol/code-generator/build.gradle
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
19
airbyte-integrations/bases/base-normalization/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
plugins { | ||
jrhizor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
id 'airbyte-docker' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 6 additions & 9 deletions
15
airbyte-integrations/connector-templates/java-destination/build.gradle.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
36 changes: 8 additions & 28 deletions
36
airbyte-integrations/connector-templates/source-python/build.gradle.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
37 changes: 8 additions & 29 deletions
37
airbyte-integrations/connector-templates/source-singer/build.gradle.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry about these, need to rerun formatting.