From 79e4c1cf78259c2c878fafaa16097ed3e93475c6 Mon Sep 17 00:00:00 2001 From: Lake Mossman Date: Tue, 3 Dec 2024 15:37:08 -0800 Subject: [PATCH] chore: update CDK version following release (manual) (#14729) Update the platform's CDK version to v6.7.2. This PR was manually created by running the commands that used to run as part of a github action, modified slightly to hardcode the new version and work when running locally on a mac (i.e. adding `''` after `-i` in `sed`, see [this SO post](https://stackoverflow.com/a/42667816) for why): ``` PREVIOUS_VERSION=$(cat oss/airbyte-connector-builder-resources/CDK_VERSION) NEW_VERSION=6.7.2 sed -i '' "s/${PREVIOUS_VERSION}/${NEW_VERSION}/g" oss/airbyte-connector-builder-server/Dockerfile sed -i '' "s/${PREVIOUS_VERSION}/${NEW_VERSION}/g" cloud/airbyte-connector-builder-server-wrapped/Dockerfile sed -i '' "s/airbyte-cdk==${PREVIOUS_VERSION}/airbyte-cdk==${NEW_VERSION}/g" oss/airbyte-connector-builder-server/requirements.in echo ${NEW_VERSION} > oss/airbyte-connector-builder-resources/CDK_VERSION cd oss/airbyte-connector-builder-server pip install pip-tools pip-compile --upgrade ``` This will be automated again soon; see [this issue](https://github.com/airbytehq/airbyte-python-cdk/issues/79) --- .../CDK_VERSION | 2 +- airbyte-connector-builder-server/Dockerfile | 2 +- .../requirements.in | 2 +- .../requirements.txt | 2 +- .../Builder/StreamConfigView.tsx | 2 ++ .../convertManifestToBuilderForm.ts | 21 +++++++++++-------- .../src/components/connectorBuilder/types.ts | 4 +++- 7 files changed, 21 insertions(+), 14 deletions(-) diff --git a/airbyte-connector-builder-resources/CDK_VERSION b/airbyte-connector-builder-resources/CDK_VERSION index 5e3ec53ea67..2dd517aa61c 100644 --- a/airbyte-connector-builder-resources/CDK_VERSION +++ b/airbyte-connector-builder-resources/CDK_VERSION @@ -1 +1 @@ -6.5.2 +6.7.2 diff --git a/airbyte-connector-builder-server/Dockerfile b/airbyte-connector-builder-server/Dockerfile index ea6e3a08a26..f2402e59009 100644 --- a/airbyte-connector-builder-server/Dockerfile +++ b/airbyte-connector-builder-server/Dockerfile @@ -2,7 +2,7 @@ ARG JAVA_PYTHON_BASE_IMAGE_VERSION=2.2.1 FROM airbyte/airbyte-base-java-python-image:${JAVA_PYTHON_BASE_IMAGE_VERSION} AS connector-builder-server # Set up CDK requirements -ARG CDK_VERSION=6.7.1 +ARG CDK_VERSION=6.7.2 ENV CDK_PYTHON=${PYENV_ROOT}/versions/${PYTHON_VERSION}/bin/python ENV CDK_ENTRYPOINT ${PYENV_ROOT}/versions/${PYTHON_VERSION}/lib/python3.10/site-packages/airbyte_cdk/connector_builder/main.py # Set up CDK diff --git a/airbyte-connector-builder-server/requirements.in b/airbyte-connector-builder-server/requirements.in index a180b944cfc..b50fbe2f9c4 100644 --- a/airbyte-connector-builder-server/requirements.in +++ b/airbyte-connector-builder-server/requirements.in @@ -1 +1 @@ -airbyte-cdk==6.7.1 +airbyte-cdk==6.7.2 diff --git a/airbyte-connector-builder-server/requirements.txt b/airbyte-connector-builder-server/requirements.txt index 761f3dc868a..b4560f06287 100644 --- a/airbyte-connector-builder-server/requirements.txt +++ b/airbyte-connector-builder-server/requirements.txt @@ -4,7 +4,7 @@ # # pip-compile # -airbyte-cdk==6.7.1 +airbyte-cdk==6.7.2 # via -r requirements.in airbyte-protocol-models-dataclasses==0.14.1 # via airbyte-cdk diff --git a/airbyte-webapp/src/components/connectorBuilder/Builder/StreamConfigView.tsx b/airbyte-webapp/src/components/connectorBuilder/Builder/StreamConfigView.tsx index 3ae5997428a..7d9944a172b 100644 --- a/airbyte-webapp/src/components/connectorBuilder/Builder/StreamConfigView.tsx +++ b/airbyte-webapp/src/components/connectorBuilder/Builder/StreamConfigView.tsx @@ -12,6 +12,7 @@ import { Pre } from "components/ui/Pre"; import { Text } from "components/ui/Text"; import { + GzipJsonDecoderType, IterableDecoderType, JsonDecoderType, JsonlDecoderType, @@ -109,6 +110,7 @@ export const StreamConfigView: React.FC = React.memo(({ s XmlDecoderType.XmlDecoder, JsonlDecoderType.JsonlDecoder, IterableDecoderType.IterableDecoder, + GzipJsonDecoderType.GzipJsonDecoder, ]} /> { + const supportedDecoderTypes: Array = [ + undefined, + JsonDecoderType.JsonDecoder, + JsonlDecoderType.JsonlDecoder, + XmlDecoderType.XmlDecoder, + IterableDecoderType.IterableDecoder, + GzipJsonDecoderType.GzipJsonDecoder, + ]; const decoderType = decoder?.type; - if ( - ![ - undefined, - JsonDecoderType.JsonDecoder, - JsonlDecoderType.JsonlDecoder, - XmlDecoderType.XmlDecoder, - IterableDecoderType.IterableDecoder, - ].includes(decoderType) - ) { + if (!supportedDecoderTypes.includes(decoderType)) { throw new ManifestCompatibilityError(streamName, "decoder is not supported"); } @@ -406,6 +407,8 @@ const manifestDecoderToBuilder = (decoder: SimpleRetrieverDecoder | undefined, s return "JSON Lines"; case IterableDecoderType.IterableDecoder: return "Iterable"; + case GzipJsonDecoderType.GzipJsonDecoder: + return "gzip JSON"; default: return "JSON"; } diff --git a/airbyte-webapp/src/components/connectorBuilder/types.ts b/airbyte-webapp/src/components/connectorBuilder/types.ts index c57336b4120..ffde91d1ead 100644 --- a/airbyte-webapp/src/components/connectorBuilder/types.ts +++ b/airbyte-webapp/src/components/connectorBuilder/types.ts @@ -88,7 +88,7 @@ export interface BuilderFormInput { type BuilderHttpMethod = "GET" | "POST"; -export const BUILDER_DECODER_TYPES = ["JSON", "XML", "JSON Lines", "Iterable"] as const; +export const BUILDER_DECODER_TYPES = ["JSON", "XML", "JSON Lines", "Iterable", "gzip JSON"] as const; export type BuilderDecoder = (typeof BUILDER_DECODER_TYPES)[number]; interface BuilderRequestOptions { @@ -896,6 +896,8 @@ const builderDecoderToManifest = (decoder: BuilderDecoder): SimpleRetrieverDecod return { type: "JsonlDecoder" }; case "Iterable": return { type: "IterableDecoder" }; + case "gzip JSON": + return { type: "GzipJsonDecoder" }; } };