Skip to content

Commit ec8e3a0

Browse files
authored
Merge branch 'main' into aj/ci/tests/new-smoke-tests-dsl-config-dialect
2 parents 5ca54c9 + 6504148 commit ec8e3a0

File tree

65 files changed

+4205
-940
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+4205
-940
lines changed

.github/workflows/publish.yml

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,7 @@ jobs:
342342
url: https://github.com/airbytehq/airbyte-platform-internal/pulls?q=is%3Apr+automatic-cdk-release+
343343
needs:
344344
- build
345-
- publish_cdk
346-
- publish_sdm
345+
- publish_manifest_server
347346
if: >
348347
(github.event_name == 'push' &&
349348
needs.build.outputs.IS_PRERELEASE == 'false' &&
@@ -355,9 +354,6 @@ jobs:
355354
IS_PRERELEASE: ${{ needs.build.outputs.IS_PRERELEASE }}
356355
runs-on: ubuntu-24.04
357356
steps:
358-
- uses: actions/setup-python@v5
359-
with:
360-
python-version: "3.10"
361357
- name: Authenticate as GitHub App
362358
uses: actions/create-github-app-token@v2
363359
id: get-app-token
@@ -372,24 +368,20 @@ jobs:
372368
repository: airbytehq/airbyte-platform-internal
373369
token: ${{ steps.get-app-token.outputs.token }}
374370
- name: Update Builder's CDK version to ${{ env.VERSION }}
375-
# PyPI servers aren't immediately updated so we may need to retry a few times.
376-
uses: nick-fields/retry@v3
377-
with:
378-
shell: bash
379-
max_attempts: 5
380-
retry_wait_seconds: 30
381-
timeout_minutes: 7
382-
command: |
383-
set -euo pipefail
384-
PREVIOUS_VERSION=$(cat oss/airbyte-connector-builder-resources/CDK_VERSION)
385-
sed -i "s/${PREVIOUS_VERSION}/${VERSION}/g" "oss/airbyte-connector-builder-server/Dockerfile"
386-
sed -i "s/airbyte-cdk==${PREVIOUS_VERSION}/airbyte-cdk==${VERSION}/g" oss/airbyte-connector-builder-server/requirements.in
387-
sed -i "s/tag: ${PREVIOUS_VERSION}/tag: ${VERSION}/g" "oss/charts/v2/airbyte/values.yaml"
388-
sed -i "s/refs\/tags\/v${PREVIOUS_VERSION}/refs\/tags\/v${VERSION}/g" "oss/airbyte-api/manifest-server-api/build.gradle.kts"
389-
echo ${VERSION} > oss/airbyte-connector-builder-resources/CDK_VERSION
390-
cd oss/airbyte-connector-builder-server
391-
python -m pip install --no-cache-dir pip-tools
392-
pip-compile --upgrade
371+
# The manifest-server Docker image already includes the CDK version.
372+
# We just need to update the image tag in the Helm values file.
373+
run: |
374+
set -euo pipefail
375+
VALUES_FILE="oss/charts/v2/airbyte/values.yaml"
376+
# Get the current manifest-server tag from the values.yaml file
377+
PREVIOUS_VERSION=$(grep -A15 "^manifestServer:" "$VALUES_FILE" | grep -A4 "image:" | grep "tag:" | awk '{print $2}')
378+
echo "Previous version: ${PREVIOUS_VERSION}"
379+
echo "New version: ${VERSION}"
380+
# Update the manifest-server tag in the Helm values file (preserves formatting)
381+
sed -i "/^manifestServer:/,/^[a-zA-Z]/ s/tag: ${PREVIOUS_VERSION}/tag: ${VERSION}/" "$VALUES_FILE"
382+
# Also update the CDK version in the manifest-server-api build file
383+
sed -i "s/refs\/tags\/v${PREVIOUS_VERSION}/refs\/tags\/v${VERSION}/g" "oss/airbyte-api/manifest-server-api/build.gradle.kts"
384+
echo ${VERSION} > oss/airbyte-connector-builder-resources/CDK_VERSION
393385
- name: Create Pull Request
394386
id: create-pull-request
395387
uses: peter-evans/create-pull-request@v7

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# A new version of source-declarative-manifest is built for every new Airbyte CDK release, and their versions are kept in sync.
66
#
77

8-
FROM docker.io/airbyte/python-connector-base:4.0.2@sha256:9fdb1888c4264cf6fee473649ecb593f56f58e5d0096a87ee0b231777e2e3e73
8+
FROM docker.io/airbyte/python-connector-base:4.1.0@sha256:1d1aa21d34e851df4e8a87b391c27724c06e2597608e7161f4d167be853bd7b6
99

1010
WORKDIR /airbyte/integration_code
1111

@@ -24,8 +24,8 @@ RUN pip install dist/*.whl
2424
RUN mkdir -p source_declarative_manifest \
2525
&& echo 'from source_declarative_manifest.run import run\n\nif __name__ == "__main__":\n run()' > main.py \
2626
&& touch source_declarative_manifest/__init__.py \
27-
&& cp /usr/local/lib/python3.11/site-packages/airbyte_cdk/cli/source_declarative_manifest/_run.py source_declarative_manifest/run.py \
28-
&& cp /usr/local/lib/python3.11/site-packages/airbyte_cdk/cli/source_declarative_manifest/spec.json source_declarative_manifest/
27+
&& cp /usr/local/lib/python3.13/site-packages/airbyte_cdk/cli/source_declarative_manifest/_run.py source_declarative_manifest/run.py \
28+
&& cp /usr/local/lib/python3.13/site-packages/airbyte_cdk/cli/source_declarative_manifest/spec.json source_declarative_manifest/
2929

3030
# Remove unnecessary build files
3131
RUN rm -rf dist/ pyproject.toml poetry.lock README.md

airbyte_cdk/destinations/vector_db_based/document_processor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
from typing import Any, Dict, List, Mapping, Optional, Tuple
99

1010
import dpath
11-
from langchain.text_splitter import Language, RecursiveCharacterTextSplitter
12-
from langchain.utils import stringify_dict
1311
from langchain_core.documents.base import Document
12+
from langchain_core.utils.strings import stringify_dict
13+
from langchain_text_splitters import Language, RecursiveCharacterTextSplitter
1414

1515
from airbyte_cdk.destinations.vector_db_based.config import (
1616
ProcessingConfigModel,

airbyte_cdk/destinations/vector_db_based/embedder.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
from dataclasses import dataclass
88
from typing import List, Optional, Union, cast
99

10-
from langchain.embeddings.cohere import CohereEmbeddings
11-
from langchain.embeddings.fake import FakeEmbeddings
12-
from langchain.embeddings.localai import LocalAIEmbeddings
13-
from langchain.embeddings.openai import OpenAIEmbeddings
10+
from langchain_community.embeddings import (
11+
CohereEmbeddings,
12+
FakeEmbeddings,
13+
LocalAIEmbeddings,
14+
OpenAIEmbeddings,
15+
)
1416

1517
from airbyte_cdk.destinations.vector_db_based.config import (
1618
AzureOpenAIEmbeddingConfigModel,
@@ -140,7 +142,9 @@ def __init__(self, config: CohereEmbeddingConfigModel):
140142
super().__init__()
141143
# Client is set internally
142144
self.embeddings = CohereEmbeddings(
143-
cohere_api_key=config.cohere_key, model="embed-english-light-v2.0"
145+
cohere_api_key=config.cohere_key,
146+
model="embed-english-light-v2.0",
147+
user_agent="airbyte-cdk",
144148
) # type: ignore
145149

146150
def check(self) -> Optional[str]:

airbyte_cdk/manifest_server/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Example:
66
# docker build -f airbyte_cdk/manifest_server/Dockerfile -t airbyte/manifest-server .
77

8-
FROM python:3.12-slim-bookworm
8+
FROM python:3.13.9-slim-bookworm@sha256:4c9fe962f6ce46ecf3633a7e9d0a9fb7f5622121ee00d628eff206da024147c9
99

1010
# Install git (needed for dynamic versioning) and poetry
1111
RUN apt-get update && \

airbyte_cdk/manifest_server/api_models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
CheckResponse,
1111
DiscoverRequest,
1212
DiscoverResponse,
13+
ErrorResponse,
1314
FullResolveRequest,
1415
ManifestResponse,
1516
RequestContext,
@@ -40,6 +41,7 @@
4041
"CheckResponse",
4142
"DiscoverRequest",
4243
"DiscoverResponse",
44+
"ErrorResponse",
4345
# Stream models
4446
"AuxiliaryRequest",
4547
"HttpRequest",

airbyte_cdk/manifest_server/api_models/manifest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,9 @@ class FullResolveRequest(BaseModel):
8383
config: ConnectorConfig
8484
stream_limit: int = Field(default=100, ge=1, le=100)
8585
context: Optional[RequestContext] = None
86+
87+
88+
class ErrorResponse(BaseModel):
89+
"""Error response for API requests."""
90+
91+
detail: str

airbyte_cdk/manifest_server/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
app = FastAPI(
1212
title="Manifest Server",
1313
description="A service for running low-code Airbyte connectors",
14-
version="0.1.0",
14+
version="0.2.0",
1515
contact={
1616
"name": "Airbyte",
1717
"url": "https://airbyte.com",

airbyte_cdk/manifest_server/command_processor/utils.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,7 @@ def build_source(
6464
page_limit: Optional[int] = None,
6565
slice_limit: Optional[int] = None,
6666
) -> ConcurrentDeclarativeSource:
67-
# We enforce a concurrency level of 1 so that the stream is processed on a single thread
68-
# to retain ordering for the grouping of the builder message responses.
6967
definition = copy.deepcopy(manifest)
70-
if "concurrency_level" in definition:
71-
definition["concurrency_level"]["default_concurrency"] = 1
72-
else:
73-
definition["concurrency_level"] = {
74-
"type": "ConcurrencyLevel",
75-
"default_concurrency": 1,
76-
}
7768

7869
should_normalize = should_normalize_manifest(manifest)
7970
if should_normalize:

airbyte_cdk/manifest_server/openapi.yaml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ info:
88
contact:
99
name: Airbyte
1010
url: https://airbyte.com/
11-
version: 0.1.0
11+
version: 0.2.0
1212
paths:
1313
/health/:
1414
get:
@@ -62,6 +62,12 @@ paths:
6262
application/json:
6363
schema:
6464
$ref: '#/components/schemas/StreamReadResponse'
65+
'400':
66+
description: Bad Request - Error processing request
67+
content:
68+
application/json:
69+
schema:
70+
$ref: '#/components/schemas/ErrorResponse'
6571
'422':
6672
description: Validation Error
6773
content:
@@ -90,6 +96,12 @@ paths:
9096
application/json:
9197
schema:
9298
$ref: '#/components/schemas/CheckResponse'
99+
'400':
100+
description: Bad Request - Error processing request
101+
content:
102+
application/json:
103+
schema:
104+
$ref: '#/components/schemas/ErrorResponse'
93105
'422':
94106
description: Validation Error
95107
content:
@@ -118,6 +130,12 @@ paths:
118130
application/json:
119131
schema:
120132
$ref: '#/components/schemas/DiscoverResponse'
133+
'400':
134+
description: Bad Request - Error processing request
135+
content:
136+
application/json:
137+
schema:
138+
$ref: '#/components/schemas/ErrorResponse'
121139
'422':
122140
description: Validation Error
123141
content:
@@ -146,6 +164,12 @@ paths:
146164
application/json:
147165
schema:
148166
$ref: '#/components/schemas/ManifestResponse'
167+
'400':
168+
description: Bad Request - Error processing request
169+
content:
170+
application/json:
171+
schema:
172+
$ref: '#/components/schemas/ErrorResponse'
149173
'422':
150174
description: Validation Error
151175
content:
@@ -180,6 +204,12 @@ paths:
180204
application/json:
181205
schema:
182206
$ref: '#/components/schemas/ManifestResponse'
207+
'400':
208+
description: Bad Request - Error processing request
209+
content:
210+
application/json:
211+
schema:
212+
$ref: '#/components/schemas/ErrorResponse'
183213
'422':
184214
description: Validation Error
185215
content:
@@ -353,6 +383,16 @@ components:
353383
- catalog
354384
title: DiscoverResponse
355385
description: Response to discover a manifest.
386+
ErrorResponse:
387+
properties:
388+
detail:
389+
type: string
390+
title: Detail
391+
type: object
392+
required:
393+
- detail
394+
title: ErrorResponse
395+
description: Error response for API requests.
356396
FullResolveRequest:
357397
properties:
358398
manifest:

0 commit comments

Comments
 (0)