Skip to content

Commit 472a3f2

Browse files
committed
Merge branch 'master' into arymkhan/migrate-hubspot-to-cdk
2 parents 0a944a6 + ce5c007 commit 472a3f2

File tree

204 files changed

+4083
-2891
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+4083
-2891
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.35.31-alpha
2+
current_version = 0.35.32-alpha
33
commit = False
44
tag = False
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-[a-z]+)?

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
### SHARED ###
13-
VERSION=0.35.31-alpha
13+
VERSION=0.35.32-alpha
1414

1515
# When using the airbyte-db via default docker image
1616
CONFIG_ROOT=/data

.github/actions/ci-java-tests/action.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ inputs:
99
runs:
1010
using: "composite"
1111
steps:
12-
- name: Install Java
13-
uses: actions/setup-java@v1
14-
with:
15-
java-version: '17'
16-
1712
- name: "Build"
1813
shell: bash
1914
run: |

.github/actions/ci-py-tests/action.yml

Lines changed: 10 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -27,57 +27,26 @@ runs:
2727
- name: Build Coverage Reports
2828
id: build-coverage-reports
2929
shell: bash
30-
working-directory: ${{ inputs.module-folder }}
3130
run: |
32-
virtualenv .venv
33-
source .venv/bin/activate
34-
JSON_CONFIG='{"module": "${{ inputs.module-name }}", "folder": "${{ inputs.module-folder }}", "lang": "py"}'
35-
pip install coverage[toml]~=6.2
36-
mkdir -p .venv/source-acceptance-test
37-
mkdir -p reports
38-
SAT_DIR=$(git rev-parse --show-toplevel)/airbyte-integrations/bases/source-acceptance-test
39-
PYPROJECT_CONFIG=$(git rev-parse --show-toplevel)/pyproject.toml
40-
git ls-tree -r HEAD --name-only $SAT_DIR | while read src; do cp -f $src .venv/source-acceptance-test; done
41-
pip install build
42-
python -m build .venv/source-acceptance-test
43-
pip install .venv/source-acceptance-test/dist/source_acceptance_test-*.whl
44-
[ -f requirements.txt ] && pip install --quiet -r requirements.txt
45-
pip install .[tests]
46-
coverage run --rcfile=${PYPROJECT_CONFIG} -m pytest ./unit_tests || true
47-
coverage xml --rcfile=${PYPROJECT_CONFIG} -o reports/coverage.xml || true
31+
GRADLE_JOB=$(source ./tools/lib/lib.sh; full_path_to_gradle_path ${{ inputs.module-folder }} "unitTest")
32+
REPORT_FOLDER="${{ inputs.module-folder }}/coverage/"
33+
./gradlew --no-daemon -Preports_folder=${REPORT_FOLDER} ${GRADLE_JOB}
4834
49-
rm -rf .venv
50-
echo "::set-output name=coverage-paths::reports/coverage.xml"
35+
echo "::set-output name=coverage-paths::coverage/coverage.xml"
5136
5237
- name: Upload coverage to Codecov
53-
if: ${{ always() }}
5438
uses: codecov/codecov-action@v2
39+
with:
40+
file: ${{ steps.build-coverage-reports.outputs.coverage-paths }}
41+
name: "UnitTests of ${{ inputs.module-name }}"
5542

5643
- name: Build Linter Reports
5744
id: build-linter-reports
5845
shell: bash
59-
working-directory: ${{ inputs.module-folder }}
6046
run: |
61-
JSON_CONFIG='{"module": "${{ inputs.module-name }}", "folder": "${{ inputs.module-folder }}", "lang": "py"}'
62-
REPORT_FOLDER=reports
63-
PYPROJECT_CONFIG=$(git rev-parse --show-toplevel)/pyproject.toml
64-
65-
# run mypy
66-
pip install lxml~=4.7 mypy~=0.910 .
67-
mypy . --config-file=${PYPROJECT_CONFIG} | tee reports/mypy.log || true
68-
69-
# run black
70-
pip install black~=21.12b0
71-
XDG_CACHE_HOME=/dev/null black --config ${PYPROJECT_CONFIG} --diff . | tee reports/black.diff
72-
73-
# run isort
74-
pip install isort~=5.10.1
75-
cp ${PYPROJECT_CONFIG} ./pyproject.toml
76-
isort --diff . | tee reports/isort.diff
77-
78-
# run flake8
79-
pip install mccabe~=0.6.1 pyproject-flake8~=0.0.1a2
80-
pflake8 --exit-zero . | grep ^. | tee reports/flake.txt
47+
GRADLE_JOB=$(source ./tools/lib/lib.sh; full_path_to_gradle_path ${{ inputs.module-folder }} "airbytePythonReport")
48+
REPORT_FOLDER="${{ inputs.module-folder }}/reports/"
49+
./gradlew --no-daemon -Preports_folder=${REPORT_FOLDER} ${GRADLE_JOB}
8150
8251
echo "::set-output name=mypy-logs::reports/mypy.log"
8352
echo "::set-output name=black-diff::reports/black.diff"

.github/actions/ci-tests-runner/action.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,18 @@ runs:
3232
with:
3333
python-version: 3.7
3434

35+
- name: Install Java
36+
uses: actions/setup-java@v1
37+
with:
38+
java-version: '17'
39+
3540
- name: Tests of CI
3641
shell: bash
3742
run: |
3843
# all CI python packages have the prefix "ci_"
3944
pip install --quiet tox==3.24.4
40-
tox -r -c ./tools/tox_ci.ini
4145
pip install --quiet -e ./tools/ci_*
46+
tox -r -c ./tools/tox_ci.ini
4247
echo "::echo::off"
4348
4449
- name: Auth with gcloud CLI
@@ -109,6 +114,7 @@ runs:
109114
[ -f ${{ steps.ci-py-tests.outputs.coverage-paths }} ] && OPTIONS+=("-Dsonar.python.coverage.reportPaths=${{ steps.ci-py-tests.outputs.coverage-paths }}")
110115
[ -f ${{ steps.ci-py-tests.outputs.flake8-logs }} ] && OPTIONS+=("-Dsonar.python.flake8.reportPaths=${{ steps.ci-py-tests.outputs.flake8-logs }}")
111116
fi
117+
cat ${REPORT_FOLDER}/*
112118
if [ ${{ inputs.module-lang }} == 'java' ]; then
113119
[ -d "./src/main/java" ] && OPTIONS+=("-Dsonar.sources=./src/main/java")
114120
[ -d "./src/test/java" ] && OPTIONS+=("-Dsonar.tests=./src/test/java")
@@ -133,6 +139,7 @@ runs:
133139
MODULE_DIR=$(python -c "print('${{ inputs.module-folder }}'.replace('${ROOT_DIR}', '.'))")
134140
echo "::set-output name=module_dir::${MODULE_DIR}"
135141
142+
136143
- name: SonarQube Scan
137144

138145
uses: sonarsource/sonarqube-scan-action@master
@@ -148,7 +155,7 @@ runs:
148155
-Dsonar.language=${{ inputs.module-lang }}
149156
-Dsonar.sourceEncoding=UTF-8
150157
-Dsonar.projectBaseDir=${{ steps.create-sq-project.outputs.module_dir }}
151-
-Dsonar.exclusions=reports/**,*.toml
158+
-Dsonar.exclusions=reports/**,*.toml,*_tests/**,setup.py,main.py
152159
-Dsonar.externalIssuesReportPaths=${{ steps.sq-options.outputs.external_reports }}
153160
${{ steps.sq-options.outputs.options }}
154161

.github/workflows/sonar-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
sonar-token: ${{ secrets.SONAR_TOKEN }}
7373
sonar-gcp-access-key: ${{ secrets.GCP_SONAR_SA_KEY }}
7474
pull-request-id: "${{ github.repository }}/${{ github.event.pull_request.number }}"
75-
remove-sonar-project: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' }}
75+
remove-sonar-project: ${{ github.event.action == 'closed' }}
7676

7777

7878

airbyte-bootloader/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ ENV APPLICATION airbyte-bootloader
55

66
WORKDIR /app
77

8-
ADD bin/${APPLICATION}-0.35.31-alpha.tar /app
8+
ADD bin/${APPLICATION}-0.35.32-alpha.tar /app
99

10-
ENTRYPOINT ["/bin/bash", "-c", "${APPLICATION}-0.35.31-alpha/bin/${APPLICATION}"]
10+
ENTRYPOINT ["/bin/bash", "-c", "${APPLICATION}-0.35.32-alpha/bin/${APPLICATION}"]

airbyte-bootloader/src/main/java/io/airbyte/bootloader/BootloaderApp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public void load() throws Exception {
114114

115115
final ConfigPersistence configPersistence = DatabaseConfigPersistence.createWithValidation(configDatabase);
116116
final ConfigRepository configRepository =
117-
new ConfigRepository(configPersistence, null, Optional.empty(), Optional.empty());
117+
new ConfigRepository(configPersistence, null, Optional.empty(), Optional.empty(), configDatabase);
118118

119119
createWorkspaceIfNoneExists(configRepository);
120120
LOGGER.info("Default workspace created..");

airbyte-config/init/src/main/resources/seed/source_definitions.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
- name: Cockroachdb
141141
sourceDefinitionId: 9fa5862c-da7c-11eb-8d19-0242ac130003
142142
dockerRepository: airbyte/source-cockroachdb
143-
dockerImageTag: 0.1.7
143+
dockerImageTag: 0.1.8
144144
documentationUrl: https://docs.airbyte.io/integrations/sources/cockroachdb
145145
icon: cockroachdb.svg
146146
sourceType: database
@@ -321,7 +321,7 @@
321321
- name: IBM Db2
322322
sourceDefinitionId: 447e0381-3780-4b46-bb62-00a4e3c8b8e2
323323
dockerRepository: airbyte/source-db2
324-
dockerImageTag: 0.1.7
324+
dockerImageTag: 0.1.8
325325
documentationUrl: https://docs.airbyte.io/integrations/sources/db2
326326
icon: db2.svg
327327
sourceType: database
@@ -432,7 +432,7 @@
432432
- name: Microsoft SQL Server (MSSQL)
433433
sourceDefinitionId: b5ea17b1-f170-46dc-bc31-cc744ca984c1
434434
dockerRepository: airbyte/source-mssql
435-
dockerImageTag: 0.3.15
435+
dockerImageTag: 0.3.16
436436
documentationUrl: https://docs.airbyte.io/integrations/sources/mssql
437437
icon: mssql.svg
438438
sourceType: database
@@ -474,7 +474,7 @@
474474
- name: MySQL
475475
sourceDefinitionId: 435bb9a5-7887-4809-aa58-28c27df0d7ad
476476
dockerRepository: airbyte/source-mysql
477-
dockerImageTag: 0.5.4
477+
dockerImageTag: 0.5.5
478478
documentationUrl: https://docs.airbyte.io/integrations/sources/mysql
479479
icon: mysql.svg
480480
sourceType: database
@@ -508,7 +508,7 @@
508508
- name: Oracle DB
509509
sourceDefinitionId: b39a7370-74c3-45a6-ac3a-380d48520a83
510510
dockerRepository: airbyte/source-oracle
511-
dockerImageTag: 0.3.12
511+
dockerImageTag: 0.3.13
512512
documentationUrl: https://docs.airbyte.io/integrations/sources/oracle
513513
icon: oracle.svg
514514
sourceType: database
@@ -578,7 +578,7 @@
578578
- name: Postgres
579579
sourceDefinitionId: decd338e-5647-4c0b-adf4-da0e75f5a750
580580
dockerRepository: airbyte/source-postgres
581-
dockerImageTag: 0.4.6
581+
dockerImageTag: 0.4.7
582582
documentationUrl: https://docs.airbyte.io/integrations/sources/postgres
583583
icon: postgresql.svg
584584
sourceType: database
@@ -704,7 +704,7 @@
704704
- name: Snowflake
705705
sourceDefinitionId: e2d65910-8c8b-40a1-ae7d-ee2416b2bfa2
706706
dockerRepository: airbyte/source-snowflake
707-
dockerImageTag: 0.1.7
707+
dockerImageTag: 0.1.8
708708
documentationUrl: https://docs.airbyte.io/integrations/sources/snowflake
709709
icon: snowflake.svg
710710
sourceType: database

airbyte-config/init/src/main/resources/seed/source_specs.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,7 +1205,7 @@
12051205
supportsNormalization: false
12061206
supportsDBT: false
12071207
supported_destination_sync_modes: []
1208-
- dockerImage: "airbyte/source-cockroachdb:0.1.7"
1208+
- dockerImage: "airbyte/source-cockroachdb:0.1.8"
12091209
spec:
12101210
documentationUrl: "https://docs.airbyte.io/integrations/sources/cockroachdb"
12111211
connectionSpecification:
@@ -3189,7 +3189,7 @@
31893189
- - "client_secret"
31903190
oauthFlowOutputParameters:
31913191
- - "refresh_token"
3192-
- dockerImage: "airbyte/source-db2:0.1.7"
3192+
- dockerImage: "airbyte/source-db2:0.1.8"
31933193
spec:
31943194
documentationUrl: "https://docs.airbyte.io/integrations/sources/db2"
31953195
connectionSpecification:
@@ -4283,7 +4283,7 @@
42834283
supportsNormalization: false
42844284
supportsDBT: false
42854285
supported_destination_sync_modes: []
4286-
- dockerImage: "airbyte/source-mssql:0.3.15"
4286+
- dockerImage: "airbyte/source-mssql:0.3.16"
42874287
spec:
42884288
documentationUrl: "https://docs.airbyte.io/integrations/destinations/mssql"
42894289
connectionSpecification:
@@ -4982,7 +4982,7 @@
49824982
supportsNormalization: false
49834983
supportsDBT: false
49844984
supported_destination_sync_modes: []
4985-
- dockerImage: "airbyte/source-mysql:0.5.4"
4985+
- dockerImage: "airbyte/source-mysql:0.5.5"
49864986
spec:
49874987
documentationUrl: "https://docs.airbyte.io/integrations/sources/mysql"
49884988
connectionSpecification:
@@ -5371,7 +5371,7 @@
53715371
supportsNormalization: false
53725372
supportsDBT: false
53735373
supported_destination_sync_modes: []
5374-
- dockerImage: "airbyte/source-oracle:0.3.12"
5374+
- dockerImage: "airbyte/source-oracle:0.3.13"
53755375
spec:
53765376
documentationUrl: "https://docs.airbyte.io/integrations/sources/oracle"
53775377
connectionSpecification:
@@ -5961,7 +5961,7 @@
59615961
supportsNormalization: false
59625962
supportsDBT: false
59635963
supported_destination_sync_modes: []
5964-
- dockerImage: "airbyte/source-postgres:0.4.6"
5964+
- dockerImage: "airbyte/source-postgres:0.4.7"
59655965
spec:
59665966
documentationUrl: "https://docs.airbyte.com/integrations/sources/postgres"
59675967
connectionSpecification:
@@ -7410,7 +7410,7 @@
74107410
- - "client_secret"
74117411
oauthFlowOutputParameters:
74127412
- - "refresh_token"
7413-
- dockerImage: "airbyte/source-snowflake:0.1.7"
7413+
- dockerImage: "airbyte/source-snowflake:0.1.8"
74147414
spec:
74157415
documentationUrl: "https://docs.airbyte.io/integrations/sources/snowflake"
74167416
connectionSpecification:

airbyte-config/persistence/src/main/java/io/airbyte/config/persistence/ConfigRepository.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
import io.airbyte.config.persistence.split_secrets.SecretsHelpers;
3131
import io.airbyte.config.persistence.split_secrets.SecretsHydrator;
3232
import io.airbyte.config.persistence.split_secrets.SplitSecretConfig;
33+
import io.airbyte.db.Database;
34+
import io.airbyte.db.ExceptionWrappingDatabase;
3335
import io.airbyte.protocol.models.AirbyteCatalog;
3436
import io.airbyte.protocol.models.ConnectorSpecification;
3537
import io.airbyte.validation.json.JsonSchemaValidator;
@@ -61,15 +63,18 @@ public class ConfigRepository {
6163
private final SecretsHydrator secretsHydrator;
6264
private final Optional<SecretPersistence> longLivedSecretPersistence;
6365
private final Optional<SecretPersistence> ephemeralSecretPersistence;
66+
private final ExceptionWrappingDatabase database;
6467

6568
public ConfigRepository(final ConfigPersistence persistence,
6669
final SecretsHydrator secretsHydrator,
6770
final Optional<SecretPersistence> longLivedSecretPersistence,
68-
final Optional<SecretPersistence> ephemeralSecretPersistence) {
71+
final Optional<SecretPersistence> ephemeralSecretPersistence,
72+
final Database database) {
6973
this.persistence = persistence;
7074
this.secretsHydrator = secretsHydrator;
7175
this.longLivedSecretPersistence = longLivedSecretPersistence;
7276
this.ephemeralSecretPersistence = ephemeralSecretPersistence;
77+
this.database = new ExceptionWrappingDatabase(database);
7378
}
7479

7580
public StandardWorkspace getStandardWorkspace(final UUID workspaceId, final boolean includeTombstone)

airbyte-config/persistence/src/test/java/io/airbyte/config/persistence/ConfigRepositoryTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import io.airbyte.config.State;
2828
import io.airbyte.config.persistence.split_secrets.MemorySecretPersistence;
2929
import io.airbyte.config.persistence.split_secrets.NoOpSecretsHydrator;
30+
import io.airbyte.db.Database;
3031
import io.airbyte.validation.json.JsonValidationException;
3132
import java.io.IOException;
3233
import java.util.ArrayList;
@@ -47,13 +48,16 @@ class ConfigRepositoryTest {
4748

4849
private ConfigPersistence configPersistence;
4950
private ConfigRepository configRepository;
51+
private Database database;
5052

5153
@BeforeEach
5254
void setup() {
5355
configPersistence = mock(ConfigPersistence.class);
56+
database = mock(Database.class);
5457
final var secretPersistence = new MemorySecretPersistence();
5558
configRepository =
56-
spy(new ConfigRepository(configPersistence, new NoOpSecretsHydrator(), Optional.of(secretPersistence), Optional.of(secretPersistence)));
59+
spy(new ConfigRepository(configPersistence, new NoOpSecretsHydrator(), Optional.of(secretPersistence), Optional.of(secretPersistence),
60+
database));
5761
}
5862

5963
@AfterEach

airbyte-container-orchestrator/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ RUN echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] htt
2626
RUN apt-get update && apt-get install -y kubectl
2727

2828
ENV APPLICATION airbyte-container-orchestrator
29-
ENV AIRBYTE_ENTRYPOINT "/app/${APPLICATION}-0.35.31-alpha/bin/${APPLICATION}"
29+
ENV AIRBYTE_ENTRYPOINT "/app/${APPLICATION}-0.35.32-alpha/bin/${APPLICATION}"
3030

3131
WORKDIR /app
3232

3333
# Move orchestrator app
34-
ADD bin/${APPLICATION}-0.35.31-alpha.tar /app
34+
ADD bin/${APPLICATION}-0.35.32-alpha.tar /app
3535

3636
# wait for upstream dependencies to become available before starting server
37-
ENTRYPOINT ["/bin/bash", "-c", "/app/${APPLICATION}-0.35.31-alpha/bin/${APPLICATION}"]
37+
ENTRYPOINT ["/bin/bash", "-c", "/app/${APPLICATION}-0.35.32-alpha/bin/${APPLICATION}"]

0 commit comments

Comments
 (0)