Skip to content

Commit

Permalink
1705 p0 revert regex (#24405)
Browse files Browse the repository at this point in the history
* Revert "Destination-snowflake: added host validation by pattern on UI (#23904)"

This reverts commit e89f946.

* bump dockerfile version

* bump dockerfile version

* Update connectors.md

* Update destination_definitions.yaml

* Update destination_specs.yaml

* Automated Change

---------

Co-authored-by: rodireich <rodireich@users.noreply.github.com>
  • Loading branch information
rodireich and rodireich authored Mar 23, 2023
1 parent 2703a44 commit 59c842e
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
- name: Snowflake
destinationDefinitionId: 424892c4-daac-4491-b35d-c6688ba547ba
dockerRepository: airbyte/destination-snowflake
dockerImageTag: 0.4.56
dockerImageTag: 0.4.57
documentationUrl: https://docs.airbyte.com/integrations/destinations/snowflake
icon: snowflake.svg
normalizationConfig:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6161,7 +6161,7 @@
supported_destination_sync_modes:
- "overwrite"
- "append"
- dockerImage: "airbyte/destination-snowflake:0.4.56"
- dockerImage: "airbyte/destination-snowflake:0.4.57"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/destinations/snowflake"
connectionSpecification:
Expand All @@ -6185,9 +6185,6 @@
- "accountname.snowflakecomputing.com"
type: "string"
title: "Host"
pattern: "^([^./?#]+\\.)?([^./?#]+\\.)?([^./?#]+\\.snowflakecomputing\\\
.com)$"
pattern_descriptor: "{account_name}.snowflakecomputing.com or {accountname}.{aws_location}.aws.snowflakecomputing.com"
order: 0
role:
description: "Enter the <a href=\"https://docs.snowflake.com/en/user-guide/security-access-control-overview.html#roles\"\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ RUN tar xf ${APPLICATION}.tar --strip-components=1

ENV ENABLE_SENTRY true

LABEL io.airbyte.version=0.4.56
LABEL io.airbyte.version=0.4.57
LABEL io.airbyte.name=airbyte/destination-snowflake
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
],
"type": "string",
"title": "Host",
"pattern": "^([^./?#]+\\.)?([^./?#]+\\.)?([^./?#]+\\.snowflakecomputing\\.com)$",
"pattern_descriptor": "{account_name}.snowflakecomputing.com or {accountname}.{aws_location}.aws.snowflakecomputing.com",
"order": 0
},
"role": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
import io.airbyte.commons.json.Jsons;
import io.airbyte.commons.resources.MoreResources;
import io.airbyte.integrations.destination.snowflake.SnowflakeDestination.DestinationType;
import io.airbyte.protocol.models.v0.ConnectorSpecification;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Stream;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
Expand All @@ -29,33 +26,6 @@ public class SnowflakeDestinationTest {

private static final ObjectMapper mapper = MoreMappers.initMapper();

private static Stream<Arguments> urlsDataProvider() {
return Stream.of(
arguments("ab12345.us-east-2.aws.snowflakecomputing.com", true),

arguments("example.snowflakecomputing.com/path/to/resource", false),
arguments("example.snowflakecomputing.com:8080", false),
arguments("example.snowflakecomputing.com:12345", false),
arguments("example.snowflakecomputing.com//path/to/resource", false),
arguments("example.snowflakecomputing.com/path?query=string", false),
arguments("example.snowflakecomputing.com/#fragment", false),
arguments("ab12345.us-east-2.aws.snowflakecomputing. com", false),
arguments("ab12345.us-east-2.aws.snowflakecomputing..com", false),
arguments("www.ab12345.us-east-2.aws.snowflakecomputing.com", false),
arguments("http://ab12345.us-east-2.aws.snowflakecomputing.com", false),
arguments("https://ab12345.us-east-2.aws.snowflakecomputing.com", false));
}

@ParameterizedTest
@MethodSource({"urlsDataProvider"})
void testUrlPattern(final String url, final boolean isMatch) throws Exception {
final ConnectorSpecification spec = new SnowflakeDestination(OssCloudEnvVarConsts.AIRBYTE_OSS).spec();
final Pattern pattern = Pattern.compile(spec.getConnectionSpecification().get("properties").get("host").get("pattern").asText());

Matcher matcher = pattern.matcher(url);
assertEquals(isMatch, matcher.find());
}

@Test
@DisplayName("When given S3 credentials should use COPY")
public void useS3CopyStrategyTest() {
Expand Down
2 changes: 1 addition & 1 deletion connectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@
| **S3 Glue** | <img alt="S3 Glue icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/s3-glue.svg" height="30" height="30"/> | Destination | airbyte/destination-s3-glue:0.1.3 | alpha | [link](https://docs.airbyte.com/integrations/destinations/s3-glue) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/destination-s3-glue) | <small>`471e5cab-8ed1-49f3-ba11-79c687784737`</small> |
| **SFTP-JSON** | <img alt="SFTP-JSON icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/sftp.svg" height="30" height="30"/> | Destination | airbyte/destination-sftp-json:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/destinations/sftp-json) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/destination-sftp-json) | <small>`e9810f61-4bab-46d2-bb22-edfc902e0644`</small> |
| **Scylla** | <img alt="Scylla icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/scylla.svg" height="30" height="30"/> | Destination | airbyte/destination-scylla:0.1.3 | alpha | [link](https://docs.airbyte.com/integrations/destinations/scylla) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/destination-scylla) | <small>`3dc6f384-cd6b-4be3-ad16-a41450899bf0`</small> |
| **Snowflake** | <img alt="Snowflake icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/snowflake.svg" height="30" height="30"/> | Destination | airbyte/destination-snowflake:0.4.56 | generally_available | [link](https://docs.airbyte.com/integrations/destinations/snowflake) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/destination-snowflake) | <small>`424892c4-daac-4491-b35d-c6688ba547ba`</small> |
| **Snowflake** | <img alt="Snowflake icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/snowflake.svg" height="30" height="30"/> | Destination | airbyte/destination-snowflake:0.4.57 | generally_available | [link](https://docs.airbyte.com/integrations/destinations/snowflake) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/destination-snowflake) | <small>`424892c4-daac-4491-b35d-c6688ba547ba`</small> |
| **Streamr** | <img alt="Streamr icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/streamr.svg" height="30" height="30"/> | Destination | ghcr.io/devmate-cloud/streamr-airbyte-connectors:0.0.1 | alpha | [link](https://docs.airbyte.com/integrations/destinations/streamr) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/devmate-cloud) | <small>`eebd85cf-60b2-4af6-9ba0-edeca01437b0`</small> |
| **Teradata Vantage** | <img alt="Teradata Vantage icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/teradata.svg" height="30" height="30"/> | Destination | airbyte/destination-teradata:0.1.1 | alpha | [link](https://docs.airbyte.io/integrations/destinations/teradata) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/destination-teradata) | <small>`58e6f9da-904e-11ed-a1eb-0242ac120002`</small> |
| **TiDB** | <img alt="TiDB icon" src="https://raw.githubusercontent.com/airbytehq/airbyte/master/airbyte-config/init/src/main/resources/icons/tidb.svg" height="30" height="30"/> | Destination | airbyte/destination-tidb:0.1.0 | alpha | [link](https://docs.airbyte.com/integrations/destinations/tidb) | [code](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/destination-tidb) | <small>`06ec60c7-7468-45c0-91ac-174f6e1a788b`</small> |
Expand Down
3 changes: 2 additions & 1 deletion docs/integrations/destinations/snowflake.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ Otherwise, make sure to grant the role the required permissions in the desired n
| Version | Date | Pull Request | Subject |
|:--------|:-----------|:-----------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------|
| 0.4.56 | 2023-03-22 | [#23904](https://github.com/airbytehq/airbyte/pull/23904) | Added host validation by pattern on UI |
| 0.4.57 | 2023-03-23 | [#23904](https://github.com/airbytehq/airbyte/pull/24405) | Revert host validation change |
| 0.4.56 | 2023-03-22 | [#23904](https://github.com/airbytehq/airbyte/pull/23904) | Added host validation by pattern on UI |
| 0.4.54 | 2023-03-17 | [#23788](https://github.com/airbytehq/airbyte/pull/23788) | S3-Parquet: added handler to process null values in arrays |
| 0.4.53 | 2023-03-15 | [\#24058](https://github.com/airbytehq/airbyte/pull/24058) | added write attempt to internal staging Check method |
| 0.4.52 | 2023-03-10 | [\#23931](https://github.com/airbytehq/airbyte/pull/23931) | Added support for periodic buffer flush |
Expand Down

0 comments on commit 59c842e

Please sign in to comment.