Skip to content

Commit

Permalink
Merge branch 'master' into grubberr/issue-12173-issue-12266-source-gi…
Browse files Browse the repository at this point in the history
…thub
  • Loading branch information
grubberr committed Apr 27, 2022
2 parents d31510d + c0c27f4 commit b9f1eda
Show file tree
Hide file tree
Showing 54 changed files with 1,271 additions and 395 deletions.
2 changes: 1 addition & 1 deletion .env
Expand Up @@ -40,7 +40,7 @@ DATABASE_PASSWORD=docker
DATABASE_HOST=db
DATABASE_PORT=5432
DATABASE_DB=airbyte
# translate manually DATABASE_URL=jdbc:postgresql://${DATABASE_HOST}:${DATABASE_PORT/${DATABASE_DB} (do not include the username or password here)
# translate manually DATABASE_URL=jdbc:postgresql://${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DB} (do not include the username or password here)
DATABASE_URL=jdbc:postgresql://db:5432/airbyte
JOBS_DATABASE_MINIMUM_FLYWAY_MIGRATION_VERSION=0.29.15.001

Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/documentation.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/publish-command.yml
Expand Up @@ -228,6 +228,7 @@ jobs:
run: |
git add -u
git commit -m "auto-bump connector version"
git pull origin ${{ github.event.inputs.gitref }}
git push origin ${{ github.event.inputs.gitref }}
- name: Add Version Bump Success Comment
if: github.event.inputs.comment-id && github.event.inputs.auto-bump-version == 'true' && success()
Expand Down
Expand Up @@ -167,7 +167,7 @@
- name: Postgres
destinationDefinitionId: 25c5221d-dce2-4163-ade9-739ef790f503
dockerRepository: airbyte/destination-postgres
dockerImageTag: 0.3.18
dockerImageTag: 0.3.19
documentationUrl: https://docs.airbyte.io/integrations/destinations/postgres
icon: postgresql.svg
- name: Pulsar
Expand Down
Expand Up @@ -3047,7 +3047,7 @@
supported_destination_sync_modes:
- "overwrite"
- "append"
- dockerImage: "airbyte/destination-postgres:0.3.18"
- dockerImage: "airbyte/destination-postgres:0.3.19"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/destinations/postgres"
connectionSpecification:
Expand Down
Expand Up @@ -42,7 +42,7 @@
- name: Apify Dataset
sourceDefinitionId: 47f17145-fe20-4ef5-a548-e29b048adf84
dockerRepository: airbyte/source-apify-dataset
dockerImageTag: 0.1.9
dockerImageTag: 0.1.11
documentationUrl: https://docs.airbyte.io/integrations/sources/apify-dataset
icon: apify.svg
sourceType: api
Expand Down Expand Up @@ -529,7 +529,7 @@
- name: OpenWeather
sourceDefinitionId: d8540a80-6120-485d-b7d6-272bca477d9b
dockerRepository: airbyte/source-openweather
dockerImageTag: 0.1.1
dockerImageTag: 0.1.4
documentationUrl: https://docs.airbyte.io/integrations/sources/openweather
sourceType: api
- name: Oracle DB
Expand Down Expand Up @@ -751,7 +751,7 @@
- name: Snowflake
sourceDefinitionId: e2d65910-8c8b-40a1-ae7d-ee2416b2bfa2
dockerRepository: airbyte/source-snowflake
dockerImageTag: 0.1.10
dockerImageTag: 0.1.11
documentationUrl: https://docs.airbyte.io/integrations/sources/snowflake
icon: snowflake.svg
sourceType: database
Expand Down
153 changes: 129 additions & 24 deletions airbyte-config/init/src/main/resources/seed/source_specs.yaml
Expand Up @@ -511,7 +511,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-apify-dataset:0.1.9"
- dockerImage: "airbyte/source-apify-dataset:0.1.11"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/sources/apify-dataset"
connectionSpecification:
Expand Down Expand Up @@ -5637,7 +5637,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-openweather:0.1.1"
- dockerImage: "airbyte/source-openweather:0.1.4"
spec:
documentationUrl: "https://docsurl.com"
connectionSpecification:
Expand Down Expand Up @@ -7955,7 +7955,7 @@
- - "client_secret"
oauthFlowOutputParameters:
- - "refresh_token"
- dockerImage: "airbyte/source-snowflake:0.1.10"
- dockerImage: "airbyte/source-snowflake:0.1.11"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/sources/snowflake"
connectionSpecification:
Expand All @@ -7968,69 +7968,174 @@
- "warehouse"
- "database"
- "schema"
- "username"
- "password"
additionalProperties: false
additionalProperties: true
properties:
credentials:
title: "Authorization Method"
type: "object"
oneOf:
- type: "object"
title: "OAuth2.0"
order: 0
required:
- "client_id"
- "client_secret"
- "auth_type"
properties:
auth_type:
type: "string"
const: "OAuth"
default: "OAuth"
order: 0
client_id:
type: "string"
title: "Client ID"
description: "The Client ID of your Snowflake developer application."
airbyte_secret: true
order: 1
client_secret:
type: "string"
title: "Client Secret"
description: "The Client Secret of your Snowflake developer application."
airbyte_secret: true
order: 2
access_token:
type: "string"
title: "Access Token"
description: "Access Token for making authenticated requests."
airbyte_secret: true
order: 3
refresh_token:
type: "string"
title: "Refresh Token"
description: "Refresh Token for making authenticated requests."
airbyte_secret: true
order: 4
- title: "Username and Password"
type: "object"
required:
- "username"
- "password"
- "auth_type"
order: 1
properties:
auth_type:
type: "string"
const: "username/password"
default: "username/password"
order: 0
username:
description: "The username you created to allow Airbyte to access\
\ the database."
examples:
- "AIRBYTE_USER"
type: "string"
title: "Username"
order: 1
password:
description: "The password associated with the username."
type: "string"
airbyte_secret: true
title: "Password"
order: 2
order: 0
host:
description: "The host domain of the snowflake instance (must include the\
\ account, region, cloud environment, and end with snowflakecomputing.com)."
examples:
- "accountname.us-east-2.aws.snowflakecomputing.com"
type: "string"
title: "Account Name"
order: 0
order: 1
role:
description: "The role you created for Airbyte to access Snowflake."
examples:
- "AIRBYTE_ROLE"
type: "string"
title: "Role"
order: 1
order: 2
warehouse:
description: "The warehouse you created for Airbyte to access data."
examples:
- "AIRBYTE_WAREHOUSE"
type: "string"
title: "Warehouse"
order: 2
order: 3
database:
description: "The database you created for Airbyte to access data."
examples:
- "AIRBYTE_DATABASE"
type: "string"
title: "Database"
order: 3
order: 4
schema:
description: "The source Snowflake schema tables."
examples:
- "AIRBYTE_SCHEMA"
type: "string"
title: "Schema"
order: 4
username:
description: "The username you created to allow Airbyte to access the database."
examples:
- "AIRBYTE_USER"
type: "string"
title: "Username"
order: 5
password:
description: "The password associated with the username."
type: "string"
airbyte_secret: true
title: "Password"
order: 6
jdbc_url_params:
description: "Additional properties to pass to the JDBC URL string when\
\ connecting to the database formatted as 'key=value' pairs separated\
\ by the symbol '&'. (example: key1=value1&key2=value2&key3=value3)."
title: "JDBC URL Params"
type: "string"
order: 7
order: 6
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
advanced_auth:
auth_flow_type: "oauth2.0"
predicate_key:
- "credentials"
- "auth_type"
predicate_value: "OAuth"
oauth_config_specification:
oauth_user_input_from_connector_config_specification:
type: "object"
additionalProperties: false
properties:
host:
type: "string"
path_in_connector_config:
- "host"
complete_oauth_output_specification:
type: "object"
additionalProperties: false
properties:
access_token:
type: "string"
path_in_connector_config:
- "credentials"
- "access_token"
refresh_token:
type: "string"
path_in_connector_config:
- "credentials"
- "refresh_token"
complete_oauth_server_input_specification:
type: "object"
additionalProperties: false
properties:
client_id:
type: "string"
client_secret:
type: "string"
complete_oauth_server_output_specification:
type: "object"
additionalProperties: false
properties:
client_id:
type: "string"
path_in_connector_config:
- "credentials"
- "client_id"
client_secret:
type: "string"
path_in_connector_config:
- "credentials"
- "client_secret"
- dockerImage: "airbyte/source-square:0.1.4"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/sources/square"
Expand Down
Expand Up @@ -140,6 +140,13 @@ protected StandardCheckConnectionOutput runCheck() throws Exception {
.run(new StandardCheckConnectionInput().withConnectionConfiguration(getConfig()), jobRoot);
}

protected String runCheckAndGetStatusAsString(JsonNode config) throws Exception {
return new DefaultCheckConnectionWorker(
workerConfigs,
new AirbyteIntegrationLauncher(JOB_ID, JOB_ATTEMPT, getImageName(), processFactory, workerConfigs.getResourceRequirements()))
.run(new StandardCheckConnectionInput().withConnectionConfiguration(config), jobRoot).getStatus().toString();
}

protected AirbyteCatalog runDiscover() throws Exception {
return new DefaultDiscoverCatalogWorker(
workerConfigs,
Expand Down
Expand Up @@ -15,7 +15,6 @@ public class DatabricksConstants {
"delta.autoOptimize.optimizeWrite = true",
"delta.autoOptimize.autoCompact = true");

private DatabricksConstants() {
}
private DatabricksConstants() {}

}

1 comment on commit b9f1eda

@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 Source Github(#12294)

Measures

Name Value Name Value Name Value
Security Rating A Code Smells 4 Lines to Cover 38
Vulnerabilities 0 Lines of Code 984 Duplicated Blocks 10
Reliability Rating A Duplicated Lines (%) 26.0 Bugs 0
Quality Gate Status ERROR Coverage 97.4 Blocker Issues 0
Critical Issues 2 Major Issues 2 Minor Issues 0

Detected Issues

Rule File Description Message
python:S3776 (CRITICAL) source_github/streams.py:90 Cognitive Complexity of functions should not be too high Refactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed.
python:S5886 (MAJOR) source_github/streams.py:83 Function return types should be consistent with their type hint Return a value of type "Union[int, float]" instead of "NoneType" or update function "backoff_time" type hint.
python:S5797 (CRITICAL) fixtures/github.py:79 Constants should not be used as conditions Replace this expression; used as a condition it will always be constant.
python:S112 (MAJOR) source_github/source.py:77 "Exception" and "BaseException" should not be raised Replace this generic exception class with a more specific one.

Coverage (97.4%)

File Coverage File Coverage
fixtures/github.py 0.0 fixtures/main.py 0.0
source_github/init.py 100.0 source_github/source.py 70.7
source_github/streams.py 95.2

Please sign in to comment.