Skip to content

Commit

Permalink
Updated doc and bumped version
Browse files Browse the repository at this point in the history
  • Loading branch information
etsybaev committed Mar 23, 2022
1 parent 9eddce9 commit 3fc926c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private static HikariDataSource createDataSource(final JsonNode config) {
final JsonNode credentials = config.get("credentials");
if (credentials != null && credentials.has("auth_type") && "OAuth2.0".equals(
credentials.get("auth_type").asText())) {
LOGGER.info("OAuth login mode is used");
LOGGER.debug("OAuth login mode is used");
// OAuth login option is selected on UI
final String accessToken;
try {
Expand All @@ -83,11 +83,11 @@ private static HikariDataSource createDataSource(final JsonNode config) {
properties.put("username", username);

// thread to keep the refresh token up to date
SnowflakeDestination.SCHEDULED_EXECUTOR_SERVICE.schedule(getRefreshTokenTask(dataSource),
PAUSE_BETWEEN_TOKEN_REFRESH_MIN, TimeUnit.MINUTES);
SnowflakeDestination.SCHEDULED_EXECUTOR_SERVICE.scheduleAtFixedRate(getRefreshTokenTask(dataSource),
PAUSE_BETWEEN_TOKEN_REFRESH_MIN, PAUSE_BETWEEN_TOKEN_REFRESH_MIN, TimeUnit.MINUTES);

} else if (credentials != null && credentials.has("password")) {
LOGGER.info("User/password login mode is used");
LOGGER.debug("User/password login mode is used");
// Username and pass login option is selected on UI
dataSource.setUsername(username);
dataSource.setPassword(credentials.get("password").asText());
Expand Down

1 comment on commit 3fc926c

@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(#11093)

Measures

Name Value Name Value Name Value
Reliability Rating A Bugs 1 Lines to Cover 188
Code Smells 12 Security Rating A Duplicated Blocks 2
Vulnerabilities 0 Lines of Code 1265 Quality Gate Status ERROR
Duplicated Lines (%) 4.3 Coverage 0.0 Blocker Issues 0
Critical Issues 10 Major Issues 20 Minor Issues 4

Detected Issues

Rule File Description Message
common-java:DuplicatedBlocks (MAJOR) snowflake/SnowflakeInternalStagingDestination.java Source files should not have any duplicated blocks 1 duplicated blocks of code must be removed.
java:S1192 (CRITICAL) snowflake/SnowflakeInternalStagingSqlOperations.java:91 String literals should not be duplicated Define a constant instead of duplicating this literal "stage" 5 times.
java:S112 (MAJOR) snowflake/SnowflakeInternalStagingSqlOperations.java:96 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S1192 (CRITICAL) snowflake/SnowflakeInternalStagingSqlOperations.java:98 String literals should not be duplicated Define a constant instead of duplicating this literal "Executing query: {}" 6 times.
java:S112 (MAJOR) snowflake/SnowflakeInternalStagingSqlOperations.java:102 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S3457 (MAJOR) snowflake/SnowflakeInternalStagingSqlOperations.java:163 Printf-style format strings should be used correctly Format specifiers should be used instead of string concatenation.
java:S1155 (MINOR) snowflake/SnowflakeSqlOperations.java:66 Collection.isEmpty() should be used to test for emptiness Use isEmpty() to check whether the collection is empty or not.
common-java:DuplicatedBlocks (MAJOR) snowflake/SnowflakeS3StagingDestination.java Source files should not have any duplicated blocks 1 duplicated blocks of code must be removed.
java:S117 (MINOR) snowflake/SnowflakeS3StagingDestination.java:45 Local variable and method parameter names should comply with a naming convention Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.
java:S112 (MAJOR) snowflake/SnowflakeS3StagingDestination.java:66 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S1192 (CRITICAL) snowflake/SnowflakeS3StagingSqlOperations.java:70 String literals should not be duplicated Define a constant instead of duplicating this literal "stage" 4 times.
java:S1172 (MAJOR) snowflake/SnowflakeS3StagingSqlOperations.java:109 Unused method parameters should be removed Remove this unused method parameter "stageName".
java:S1192 (CRITICAL) snowflake/SnowflakeDatabase.java:89 String literals should not be duplicated Define a constant instead of duplicating this literal "password" 3 times.
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:S1192 (CRITICAL) snowflake/SnowflakeDatabase.java:71 String literals should not be duplicated Define a constant instead of duplicating this literal "client_id" 4 times.
java:S1192 (CRITICAL) snowflake/SnowflakeDatabase.java:72 String literals should not be duplicated Define a constant instead of duplicating this literal "refresh_token" 6 times.
java:S1192 (CRITICAL) snowflake/SnowflakeDatabase.java:72 String literals should not be duplicated Define a constant instead of duplicating this literal "client_secret" 4 times.
java:S112 (MAJOR) snowflake/SnowflakeDatabase.java:74 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S112 (MAJOR) snowflake/SnowflakeDatabase.java:164 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S2142 (MAJOR) snowflake/SnowflakeDatabase.java:167 "InterruptedException" should not be ignored Either re-interrupt this method or rethrow the "InterruptedException" that can be caught here.
java:S1104 (MINOR) snowflake/SnowflakeDestination.java Class variable fields should not have public accessibility Make isAlive a static final constant or non-public and provide accessors if needed.
java:S1444 (MINOR) snowflake/SnowflakeDestination.java "public static" fields should be constant Make this "public static isAlive" field final
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 Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S1192 (CRITICAL) snowflake/SnowflakeInternalStagingSqlOperations.java String literals should not be duplicated Define a constant instead of duplicating this literal "stage" 3 times.
java:S112 (MAJOR) snowflake/SnowflakeInternalStagingDestination.java Generic exceptions should never be thrown Define and throw a dedicated exception instead of using a generic one.
java:S5361 (CRITICAL) snowflake/SnowflakeInternalStagingDestination.java:66 "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 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:36 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/SnowflakeS3StagingDestination.java 0.0 src/main/java/io/airbyte/integrations/destination/snowflake/SnowflakeS3StagingSqlOperations.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

Please sign in to comment.