Skip to content

Commit

Permalink
Merge branch 'master' into liren/destination-namespace-charset
Browse files Browse the repository at this point in the history
  • Loading branch information
tuliren committed Mar 18, 2022
2 parents 7c6fdc2 + 6f93470 commit 668e0fe
Show file tree
Hide file tree
Showing 751 changed files with 20,364 additions and 7,185 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.35.43-alpha
current_version = 0.35.57-alpha
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-[a-z]+)?
Expand Down
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


### SHARED ###
VERSION=0.35.43-alpha
VERSION=0.35.57-alpha

# When using the airbyte-db via default docker image
CONFIG_ROOT=/data
Expand Down
5 changes: 4 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Frontend code
/airbyte-webapp/ @airbytehq/frontend
/airbyte-webapp-e2e-tests/ @airbytehq/frontend
/airbyte-webapp/ @airbytehq/frontend
## Exclude the package(-lock).json from code ownership to prevent version bump PRs from triggering codeowners review
/airbyte-webapp/package.json
/airbyte-webapp/package-lock.json
42 changes: 42 additions & 0 deletions .github/actions/cache-build-artifacts/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Cache Build Artifacts"
description: "Cache Java, Javascript and Python build artifacts to reduce build time"
inputs:
cache-key:
description: "Key to use for caching"
required: true
cache-python:
description: "Whether to cache Python dependencies. Only relevant if building connector modules. true or false"
default: "true"
required: true

runs:
using: "composite"
steps:
- name: Pip Caching
if: ${{ inputs.cache_python }} == 'true'
uses: actions/cache@v2
with:
path: |
~/.cache/pip
key: ${{ inputs.cache-key }}-pip-${{ runner.os }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ inputs.cache-key }}-pip-${{ runner.os }}-
- name: Npm Caching
uses: actions/cache@v2
with:
path: |
~/.npm
key: ${{ inputs.cache-key }}-npm-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ inputs.cache-key }}-npm-${{ runner.os }}-
# this intentionally does not use restore-keys so we don't mess with gradle caching
- name: Gradle and Python Caching
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
**/.venv
key: ${{ inputs.cache-key }}-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/requirements.txt') }}
5 changes: 4 additions & 1 deletion .github/actions/ci-tests-runner/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,11 @@ runs:
[ -f ${{ steps.ci-py-tests.outputs.coverage-paths }} ] && OPTIONS+=("-Dsonar.python.coverage.reportPaths=${{ steps.ci-py-tests.outputs.coverage-paths }}")
[ -f ${{ steps.ci-py-tests.outputs.flake8-logs }} ] && OPTIONS+=("-Dsonar.python.flake8.reportPaths=${{ steps.ci-py-tests.outputs.flake8-logs }}")
# TODO: figure out how to make this check work for Java-based connectors
# See more in https://github.com/airbytehq/airbyte/issues/10924
cat ${REPORT_FOLDER}/*
fi
cat ${REPORT_FOLDER}/*
if [ ${{ inputs.module-lang }} == 'java' ]; then
[ -d "./src/main/java" ] && OPTIONS+=("-Dsonar.sources=./src/main/java")
[ -d "./src/test/java" ] && OPTIONS+=("-Dsonar.tests=./src/test/java")
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/start-aws-runner/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ inputs:
github-token:
required: true
ec2-image-id:
# github-self-hosted-runner-ubuntu-20-100g-disk
default: "ami-0ccd67e0abd945eec"
# github-self-hosted-runner-ubuntu-20-100g-disk-with-cypress-deps
default: "ami-08927c058921b27f4"
required: true
ec2-instance-type:
default: "c5.2xlarge"
Expand Down
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ If this is a community PR, the Airbyte engineer reviewing this PR is responsible

- [ ] Create a non-forked branch based on this PR and test the below items on it
- [ ] Build is successful
- [ ] Credentials added to Github CI. [Instructions](https://docs.airbyte.io/connector-development#using-credentials-in-ci).
- [ ] If new credentials are required for use in CI, add them to GSM. [Instructions](https://docs.airbyte.io/connector-development#using-credentials-in-ci).
- [ ] [`/test connector=connectors/<name>` command](https://docs.airbyte.io/connector-development#updating-an-existing-connector) is passing
- [ ] New Connector version released on Dockerhub by running the `/publish` command described [here](https://docs.airbyte.io/connector-development#updating-an-existing-connector)
- [ ] After the connector is published, connector added to connector index as described [here](https://docs.airbyte.io/connector-development#publishing-a-connector)
Expand Down Expand Up @@ -66,7 +66,7 @@ If this is a community PR, the Airbyte engineer reviewing this PR is responsible

- [ ] Create a non-forked branch based on this PR and test the below items on it
- [ ] Build is successful
- [ ] Credentials added to Github CI. [Instructions](https://docs.airbyte.io/connector-development#using-credentials-in-ci).
- [ ] If new credentials are required for use in CI, add them to GSM. [Instructions](https://docs.airbyte.io/connector-development#using-credentials-in-ci).
- [ ] [`/test connector=connectors/<name>` command](https://docs.airbyte.io/connector-development#updating-an-existing-connector) is passing
- [ ] New Connector version released on Dockerhub by running the `/publish` command described [here](https://docs.airbyte.io/connector-development#updating-an-existing-connector)
- [ ] After the new connector version is published, connector version bumped in the seed directory as described [here](https://docs.airbyte.io/connector-development#publishing-a-connector)
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/gke-kube-test-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ on:
- cron: '0 */6 * * *'
workflow_dispatch:
inputs:
repo:
description: "Repo to check out code from. Defaults to the main airbyte repo. Set this when building connectors from forked repos."
required: false
default: "airbytehq/airbyte"
gitref:
description: "The git ref to check out from the specified repository."
required: false
default: master
comment-id:
description: 'The comment-id of the slash command. Used to update the comment with the status.'
required: false
Expand All @@ -19,6 +27,9 @@ jobs:
steps:
- name: Checkout Airbyte
uses: actions/checkout@v2
with:
repository: ${{ github.event.inputs.repo }}
ref: ${{ github.event.inputs.gitref }}
- name: Start AWS Runner
id: start-ec2-runner
uses: ./.github/actions/start-aws-runner
Expand All @@ -43,6 +54,9 @@ jobs:
- name: Checkout Airbyte
uses: actions/checkout@v2
with:
repository: ${{ github.event.inputs.repo }}
ref: ${{ github.event.inputs.gitref }}

- uses: actions/setup-java@v1
with:
Expand Down
Loading

2 comments on commit 668e0fe

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SonarQube Report

SonarQube report for Airbyte Connectors Destination Snowflake(#10793)

Measures

Name Value Name Value Name Value
Lines to Cover 326 Bugs 0 Quality Gate Status OK
Code Smells 13 Security Rating A Duplicated Blocks 0
Lines of Code 867 Reliability Rating A Duplicated Lines (%) 0.0
Vulnerabilities 0 Coverage 0.0 Blocker Issues 0
Critical Issues 3 Major Issues 10 Minor Issues 0

Detected Issues

Rule File Description Message
java:S112 (MAJOR) snowflake/SnowflakeAzureBlobStorageStreamCopier.java:61 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S1192 (CRITICAL) snowflake/SnowflakeDestinationResolver.java:28 String literals should not be duplicated Define a constant instead of duplicating this literal "loading_method" 9 times.
java:S1118 (MAJOR) snowflake/SnowflakeDestinationResolver.java:13 Utility classes should not have public constructors Add a private constructor to hide the implicit public one.
java:S112 (MAJOR) snowflake/SnowflakeGcsStreamCopier.java:79 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S112 (MAJOR) snowflake/SnowflakeParallelCopyStreamCopier.java:40 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S112 (MAJOR) snowflake/SnowflakeS3StreamCopier.java:119 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S112 (MAJOR) snowflake/SnowflakeInternalStagingSqlOperations.java:79 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S1192 (CRITICAL) snowflake/SnowflakeInternalStagingSqlOperations.java:90 String literals should not be duplicated Define a constant instead of duplicating this literal "stage" 3 times.
java:S112 (MAJOR) snowflake/SnowflakeInternalStagingDestination.java:61 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S5361 (CRITICAL) snowflake/SnowflakeInternalStagingDestination.java:64 "String#replace" should be preferred to "String#replaceAll" Replace this call to "replaceAll()" by a call to the "replace()" method.
java:S112 (MAJOR) snowflake/SnowflakeInternalStagingSqlOperations.java:75 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S1068 (MAJOR) snowflake/SnowflakeInsertDestination.java:19 Unused "private" fields should be removed Remove this unused "LOGGER" private field.
java:S1118 (MAJOR) snowflake/SnowflakeDatabase.java:19 Utility classes should not have public constructors Add a private constructor to hide the implicit public one.

Coverage (0.0%)

File Coverage File Coverage
src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeAzureBlobStorageStreamCopier.java 0.0 src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeAzureBlobStorageStreamCopierFactory.java 0.0
src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeCopyAzureBlobStorageDestination.java 0.0 src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeCopyGcsDestination.java 0.0
src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeCopyS3Destination.java 0.0 src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeDatabase.java 0.0
src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeDestination.java 0.0 src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeDestinationResolver.java 0.0
src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeGcsStreamCopier.java 0.0 src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeGcsStreamCopierFactory.java 0.0
src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeInsertDestination.java 0.0 src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeInternalStagingDestination.java 0.0
src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeInternalStagingSqlOperations.java 0.0 src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeParallelCopyStreamCopier.java 0.0
src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeS3StreamCopier.java 0.0 src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeS3StreamCopierFactory.java 0.0
src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeSQLNameTransformer.java 0.0 src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeSqlOperations.java 0.0

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SonarQube Report

SonarQube report for Airbyte Connectors Destination Bigquery(#10793)

Measures

Name Value Name Value Name Value
Security Rating A Bugs 2 Vulnerabilities 0
Reliability Rating C Lines of Code 1212 Duplicated Blocks 0
Duplicated Lines (%) 0.0 Code Smells 36 Lines to Cover 570
Quality Gate Status OK Coverage 0.0 Blocker Issues 0
Critical Issues 3 Major Issues 31 Minor Issues 3

Detected Issues

Rule File Description Message
java:S112 (MAJOR) bigquery/BigQueryRecordConsumer.java:69 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S112 (MAJOR) writer/BigQueryTableWriter.java:34 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S1452 (CRITICAL) uploader/BigQueryUploaderFactory.java:39 Generic wildcard types should not be used in return types Remove usage of generic wildcard type.
java:S5993 (MAJOR) formatter/BigQueryRecordFormatter.java:31 Constructors of an "abstract" class should not be declared "public" Change the visibility of this constructor to "protected".
java:S1116 (MINOR) formatter/BigQueryRecordFormatter.java:39 Empty statements should be removed Remove this empty statement.
java:S112 (MAJOR) uploader/AbstractBigQueryUploader.java:56 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S112 (MAJOR) uploader/AbstractBigQueryUploader.java:70 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S3457 (MAJOR) uploader/AbstractBigQueryUploader.java:88 Printf-style format strings should be used correctly %n should be used in place of \n to produce the platform-specific line separator.
java:S112 (MAJOR) uploader/AbstractBigQueryUploader.java:90 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S125 (MAJOR) uploader/AbstractBigQueryUploader.java:111 Sections of code should not be commented out This block of commented-out lines of code should be removed.
java:S112 (MAJOR) uploader/AbstractBigQueryUploader.java:120 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S2142 (MAJOR) uploader/AbstractBigQueryUploader.java:166 "InterruptedException" should not be ignored Either re-interrupt this method or rethrow the "InterruptedException" that can be caught here.
java:S112 (MAJOR) uploader/AbstractBigQueryUploader.java:185 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S2142 (MAJOR) uploader/AbstractGscBigQueryUploader.java:84 "InterruptedException" should not be ignored Either re-interrupt this method or rethrow the "InterruptedException" that can be caught here.
java:S112 (MAJOR) uploader/AbstractGscBigQueryUploader.java:86 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S1124 (MINOR) uploader/AbstractGscBigQueryUploader.java:90 Modifiers should be declared in the correct order Reorder the modifiers to comply with the Java Language Specification.
java:S1117 (MAJOR) uploader/AbstractGscBigQueryUploader.java:98 Local variables should not shadow class fields Rename "gcsDestinationConfig" which hides the field declared at line 33.
java:S1068 (MAJOR) uploader/BigQueryDirectUploader.java:18 Unused "private" fields should be removed Remove this unused "LOGGER" private field.
java:S1118 (MAJOR) uploader/BigQueryUploaderFactory.java:35 Utility classes should not have public constructors Add a private constructor to hide the implicit public one.
java:S1068 (MAJOR) uploader/BigQueryUploaderFactory.java:37 Unused "private" fields should be removed Remove this unused "LOGGER" private field.
java:S107 (MAJOR) uploader/BigQueryUploaderFactory.java:88 Methods should not have too many parameters Method has 8 parameters, which is greater than 7 authorized.
java:S1068 (MAJOR) config/UploaderConfig.java:20 Unused "private" fields should be removed Remove this unused "config" private field.
java:S1068 (MAJOR) config/UploaderConfig.java:21 Unused "private" fields should be removed Remove this unused "configStream" private field.
java:S1068 (MAJOR) config/UploaderConfig.java:22 Unused "private" fields should be removed Remove this unused "targetTableName" private field.
java:S1068 (MAJOR) config/UploaderConfig.java:23 Unused "private" fields should be removed Remove this unused "tmpTableName" private field.
java:S1068 (MAJOR) config/UploaderConfig.java:24 Unused "private" fields should be removed Remove this unused "bigQuery" private field.
java:S1068 (MAJOR) config/UploaderConfig.java:25 Unused "private" fields should be removed Remove this unused "formatterMap" private field.
java:S1068 (MAJOR) config/UploaderConfig.java:26 Unused "private" fields should be removed Remove this unused "isDefaultAirbyteTmpSchema" private field.
java:S1068 (MAJOR) writer/BigQueryTableWriter.java:21 Unused "private" fields should be removed Remove this unused "LOGGER" private field.
java:S1186 (CRITICAL) writer/BigQueryTableWriter.java:30 Methods should not be empty Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.
java:S1118 (MAJOR) bigquery/BigQueryConsts.java:7 Utility classes should not have public constructors Add a private constructor to hide the implicit public one.
java:S115 (CRITICAL) bigquery/BigQueryConsts.java:9 Constant names should comply with a naming convention Rename this constant name to match the regular expression '^[A-Z][A-Z0-9](_[A-Z0-9]+)$'.
java:S1450 (MINOR) bigquery/BigQueryRecordConsumer.java:27 Private fields only used as local variables in methods should become local variables Remove the "lastStateMessage" field and declare it as a local variable in the relevant methods.
java:S1135 (INFO) bigquery/BigQueryRecordConsumer.java:37 Track uses of "TODO" tags Complete the task associated to this TODO comment.
java:S1118 (MAJOR) bigquery/BigQueryUtils.java:45 Utility classes should not have public constructors Add a private constructor to hide the implicit public one.
java:S112 (MAJOR) bigquery/BigQueryUtils.java:60 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S112 (MAJOR) bigquery/BigQueryUtils.java:75 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S112 (MAJOR) bigquery/BigQueryDestination.java:117 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.

Coverage (0.0%)

File Coverage File Coverage
src/main/java/io/airbyte/integrations/destination/bigquery/BigQueryConsts.java 0.0 src/main/java/io/airbyte/integrations/destination/bigquery/BigQueryDestination.java 0.0
src/main/java/io/airbyte/integrations/destination/bigquery/BigQueryRecordConsumer.java 0.0 src/main/java/io/airbyte/integrations/destination/bigquery/BigQuerySQLNameTransformer.java 0.0
src/main/java/io/airbyte/integrations/destination/bigquery/BigQueryUtils.java 0.0 src/main/java/io/airbyte/integrations/destination/bigquery/formatter/BigQueryRecordFormatter.java 0.0
src/main/java/io/airbyte/integrations/destination/bigquery/formatter/DefaultBigQueryRecordFormatter.java 0.0 src/main/java/io/airbyte/integrations/destination/bigquery/formatter/GcsAvroBigQueryRecordFormatter.java 0.0
src/main/java/io/airbyte/integrations/destination/bigquery/formatter/GcsCsvBigQueryRecordFormatter.java 0.0 src/main/java/io/airbyte/integrations/destination/bigquery/helpers/LoggerHelper.java 0.0
src/main/java/io/airbyte/integrations/destination/bigquery/uploader/AbstractBigQueryUploader.java 0.0 src/main/java/io/airbyte/integrations/destination/bigquery/uploader/AbstractGscBigQueryUploader.java 0.0
src/main/java/io/airbyte/integrations/destination/bigquery/uploader/BigQueryDirectUploader.java 0.0 src/main/java/io/airbyte/integrations/destination/bigquery/uploader/BigQueryUploaderFactory.java 0.0
src/main/java/io/airbyte/integrations/destination/bigquery/uploader/GcsAvroBigQueryUploader.java 0.0 src/main/java/io/airbyte/integrations/destination/bigquery/uploader/GcsCsvBigQueryUploader.java 0.0
src/main/java/io/airbyte/integrations/destination/bigquery/writer/BigQueryTableWriter.java 0.0

Please sign in to comment.