Skip to content

Commit

Permalink
chore: update CDK version following release (manual) (#14729)
Browse files Browse the repository at this point in the history
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](airbytehq/airbyte-python-cdk#79)
  • Loading branch information
lmossman committed Dec 3, 2024
1 parent 882b3f0 commit 79e4c1c
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion airbyte-connector-builder-resources/CDK_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.5.2
6.7.2
2 changes: 1 addition & 1 deletion airbyte-connector-builder-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion airbyte-connector-builder-server/requirements.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
airbyte-cdk==6.7.1
airbyte-cdk==6.7.2
2 changes: 1 addition & 1 deletion airbyte-connector-builder-server/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { Pre } from "components/ui/Pre";
import { Text } from "components/ui/Text";

import {
GzipJsonDecoderType,
IterableDecoderType,
JsonDecoderType,
JsonlDecoderType,
Expand Down Expand Up @@ -109,6 +110,7 @@ export const StreamConfigView: React.FC<StreamConfigViewProps> = React.memo(({ s
XmlDecoderType.XmlDecoder,
JsonlDecoderType.JsonlDecoder,
IterableDecoderType.IterableDecoder,
GzipJsonDecoderType.GzipJsonDecoder,
]}
/>
<BuilderField
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import {
XmlDecoderType,
IterableDecoderType,
SimpleRetrieverDecoder,
GzipJsonDecoderType,
} from "core/api/types/ConnectorManifest";

import {
Expand Down Expand Up @@ -384,16 +385,16 @@ function requesterToRequestBody(requester: HttpRequester): BuilderRequestBody {
}

const manifestDecoderToBuilder = (decoder: SimpleRetrieverDecoder | undefined, streamName: string): BuilderDecoder => {
const supportedDecoderTypes: Array<string | undefined> = [
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");
}

Expand All @@ -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";
}
Expand Down
4 changes: 3 additions & 1 deletion airbyte-webapp/src/components/connectorBuilder/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -896,6 +896,8 @@ const builderDecoderToManifest = (decoder: BuilderDecoder): SimpleRetrieverDecod
return { type: "JsonlDecoder" };
case "Iterable":
return { type: "IterableDecoder" };
case "gzip JSON":
return { type: "GzipJsonDecoder" };
}
};

Expand Down

0 comments on commit 79e4c1c

Please sign in to comment.