Skip to content

Commit 3c9cc6f

Browse files
authored
Merge branch 'main' into tolik0/file-based/fix-memory-issue-in-excel-parser
2 parents aa26ef9 + e5a1fc2 commit 3c9cc6f

32 files changed

+1198
-343
lines changed

.github/actions/check-docker-tag/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ runs:
2525
echo "The tag '$tag' already exists on DockerHub. Skipping publish to prevent overwrite."
2626
exit 1
2727
fi
28-
echo "No existing tag '$tag' found. Proceeding with publish."
28+
echo "No existing tag '$tag' found. Proceeding with publish."

.github/workflows/pytest_matrix.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ jobs:
2828
strategy:
2929
matrix:
3030
python-version: [
31-
"3.10",
32-
"3.11",
33-
# "3.12", # `requests-cache` blocker: https://github.com/airbytehq/airbyte-python-cdk/issues/299
34-
]
31+
"3.10",
32+
"3.11",
33+
"3.12",
34+
"3.13",
35+
]
3536
os: [
3637
Ubuntu,
3738
# Windows, # For now, we don't include Windows in the test matrix.

.github/workflows/test-command.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ jobs:
5050
needs: [start-workflow]
5151
strategy:
5252
matrix:
53-
python-version: ["3.10", "3.11"]
53+
python-version: [
54+
"3.10",
55+
"3.11",
56+
"3.12",
57+
"3.13",
58+
]
5459
os: [
5560
Ubuntu,
5661
# Windows, # For now, we don't include Windows in the test matrix.

airbyte_cdk/connector_builder/connector_builder_handler.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ def should_normalize_manifest(config: Mapping[str, Any]) -> bool:
6262

6363
def create_source(
6464
config: Mapping[str, Any],
65-
limits: TestLimits,
66-
catalog: Optional[ConfiguredAirbyteCatalog],
67-
state: Optional[List[AirbyteStateMessage]],
68-
) -> ConcurrentDeclarativeSource[Optional[List[AirbyteStateMessage]]]:
65+
limits: TestLimits | None = None,
66+
catalog: ConfiguredAirbyteCatalog | None = None,
67+
state: List[AirbyteStateMessage] | None = None,
68+
) -> ConcurrentDeclarativeSource:
6969
manifest = config["__injected_declarative_manifest"]
7070

7171
# We enforce a concurrency level of 1 so that the stream is processed on a single thread
@@ -88,7 +88,7 @@ def create_source(
8888

8989

9090
def read_stream(
91-
source: ConcurrentDeclarativeSource[Optional[List[AirbyteStateMessage]]],
91+
source: ConcurrentDeclarativeSource,
9292
config: Mapping[str, Any],
9393
configured_catalog: ConfiguredAirbyteCatalog,
9494
state: List[AirbyteStateMessage],
@@ -127,7 +127,7 @@ def read_stream(
127127

128128

129129
def resolve_manifest(
130-
source: ConcurrentDeclarativeSource[Optional[List[AirbyteStateMessage]]],
130+
source: ConcurrentDeclarativeSource,
131131
) -> AirbyteMessage:
132132
try:
133133
return AirbyteMessage(
@@ -146,7 +146,7 @@ def resolve_manifest(
146146

147147

148148
def full_resolve_manifest(
149-
source: ConcurrentDeclarativeSource[Optional[List[AirbyteStateMessage]]], limits: TestLimits
149+
source: ConcurrentDeclarativeSource, limits: TestLimits
150150
) -> AirbyteMessage:
151151
try:
152152
manifest = {**source.resolved_manifest}

airbyte_cdk/connector_builder/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
def get_config_and_catalog_from_args(
3636
args: List[str],
37-
) -> Tuple[str, Mapping[str, Any], Optional[ConfiguredAirbyteCatalog], Any]:
37+
) -> Tuple[str, Mapping[str, Any], Optional[ConfiguredAirbyteCatalog], List[AirbyteStateMessage]]:
3838
# TODO: Add functionality for the `debug` logger.
3939
# Currently, no one `debug` level log will be displayed during `read` a stream for a connector created through `connector-builder`.
4040
parsed_args = AirbyteEntrypoint.parse_args(args)
@@ -70,7 +70,7 @@ def get_config_and_catalog_from_args(
7070

7171

7272
def handle_connector_builder_request(
73-
source: ConcurrentDeclarativeSource[Optional[List[AirbyteStateMessage]]],
73+
source: ConcurrentDeclarativeSource,
7474
command: str,
7575
config: Mapping[str, Any],
7676
catalog: Optional[ConfiguredAirbyteCatalog],

airbyte_cdk/connector_builder/test_reader/reader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def __init__(
8585

8686
def run_test_read(
8787
self,
88-
source: ConcurrentDeclarativeSource[Optional[List[AirbyteStateMessage]]],
88+
source: ConcurrentDeclarativeSource,
8989
config: Mapping[str, Any],
9090
configured_catalog: ConfiguredAirbyteCatalog,
9191
stream_name: str,
@@ -383,7 +383,7 @@ def _get_latest_config_update(
383383

384384
def _read_stream(
385385
self,
386-
source: ConcurrentDeclarativeSource[Optional[List[AirbyteStateMessage]]],
386+
source: ConcurrentDeclarativeSource,
387387
config: Mapping[str, Any],
388388
configured_catalog: ConfiguredAirbyteCatalog,
389389
state: List[AirbyteStateMessage],

airbyte_cdk/manifest_server/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ FROM python:3.12-slim-bookworm
1111
RUN apt-get update && \
1212
apt-get install -y git && \
1313
rm -rf /var/lib/apt/lists/* && \
14-
pip install poetry==1.8.3
14+
pip install poetry==2.0.1
1515

1616
# Configure poetry to not create virtual environments and disable interactive mode
1717
ENV POETRY_NO_INTERACTION=1 \
@@ -42,4 +42,4 @@ USER airbyte:airbyte
4242

4343
EXPOSE 8080
4444

45-
CMD ["uvicorn", "airbyte_cdk.manifest_server.app:app", "--host", "0.0.0.0", "--port", "8080"]
45+
CMD ["uvicorn", "airbyte_cdk.manifest_server.app:app", "--host", "0.0.0.0", "--port", "8080"]

airbyte_cdk/manifest_server/README.md

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,31 @@ The server will start on `http://localhost:8000` by default.
3737
## API Endpoints
3838

3939
### `/v1/manifest/test_read`
40+
4041
Test reading from a specific stream in the manifest.
4142

4243
**POST** - Test stream reading with configurable limits for records, pages, and slices.
4344

4445
### `/v1/manifest/check`
46+
4547
Check configuration against a manifest.
4648

4749
**POST** - Validates connector configuration and returns success/failure status with message.
4850

4951
### `/v1/manifest/discover`
52+
5053
Discover streams from a manifest.
5154

5255
**POST** - Returns the catalog of available streams from the manifest.
5356

54-
### `/v1/manifest/resolve`
57+
### `/v1/manifest/resolve`
58+
5559
Resolve a manifest to its final configuration.
5660

5761
**POST** - Returns the resolved manifest without dynamic stream generation.
5862

5963
### `/v1/manifest/full_resolve`
64+
6065
Fully resolve a manifest including dynamic streams.
6166

6267
**POST** - Generates dynamic streams up to specified limits and includes them in the resolved manifest.
@@ -68,6 +73,7 @@ The manifest server supports custom Python components, but this feature is **dis
6873
### Enabling Custom Components
6974

7075
To allow custom Python components in your manifest files, set the environment variable:
76+
7177
```bash
7278
export AIRBYTE_ENABLE_UNSAFE_CODE=true
7379
```
@@ -77,27 +83,33 @@ export AIRBYTE_ENABLE_UNSAFE_CODE=true
7783
The manifest server supports optional JWT bearer token authentication:
7884

7985
### Configuration
86+
8087
Set the environment variable to enable authentication:
88+
8189
```bash
8290
export AB_JWT_SIGNATURE_SECRET="your-jwt-secret-key"
8391
```
8492

8593
### Usage
94+
8695
When authentication is enabled, include a valid JWT token in the Authorization header:
96+
8797
```bash
8898
curl -H "Authorization: Bearer <your-jwt-token>" \
8999
http://localhost:8000/v1/manifest/test_read
90100
```
91101

92102
### Behavior
93-
- **Without `AB_JWT_SIGNATURE_SECRET`**: All requests pass through
103+
104+
- **Without `AB_JWT_SIGNATURE_SECRET`**: All requests pass through
94105
- **With `AB_JWT_SIGNATURE_SECRET`**: Requires valid JWT bearer token using HS256 algorithm
95106

96107
## OpenAPI Specification
97108

98109
The manifest server provides an OpenAPI specification for API client generation:
99110

100111
### Generating the OpenAPI Spec
112+
101113
```bash
102114
# Generate OpenAPI YAML (default location)
103115
manifest-server generate-openapi
@@ -107,6 +119,7 @@ manifest-server generate-openapi --output /path/to/openapi.yaml
107119
```
108120

109121
The generated OpenAPI specification is consumed by other applications and tools to:
122+
110123
- Generate API clients in various programming languages
111124
- Create SDK bindings for the manifest server
112125
- Provide API documentation and validation
@@ -115,6 +128,7 @@ The generated OpenAPI specification is consumed by other applications and tools
115128
### Interactive API Documentation
116129

117130
When running, interactive API documentation is available at:
131+
118132
- Swagger UI: `http://localhost:8000/docs`
119133
- ReDoc: `http://localhost:8000/redoc`
120134

@@ -139,4 +153,26 @@ docker build -f airbyte_cdk/manifest_server/Dockerfile -t manifest-server .
139153
docker run -p 8080:8080 manifest-server
140154
```
141155

142-
Note: The container runs on port 8080 by default.
156+
Note: The container runs on port 8080 by default.
157+
158+
## Datadog APM
159+
160+
The manifest server supports Datadog APM tracing for monitoring and observability:
161+
162+
### Configuration
163+
164+
To enable Datadog tracing, set the environment variable:
165+
166+
```bash
167+
export DD_ENABLED=true
168+
```
169+
170+
This requires the `ddtrace` dependency, which is included in the `manifest-server` extra. For additional configuration options via environment variables, see [ddtrace configuration](https://ddtrace.readthedocs.io/en/stable/configuration.html).
171+
172+
### Usage
173+
174+
```bash
175+
# Run with Datadog tracing enabled
176+
DD_ENABLED=true manifest-server start
177+
```
178+

airbyte_cdk/manifest_server/app.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
import os
2+
3+
if os.getenv("DD_ENABLED", "false").lower() == "true":
4+
# Auto-instrumentation should be imported as early as possible.
5+
import ddtrace.auto # noqa: F401
6+
17
from fastapi import FastAPI
28

39
from .routers import capabilities, health, manifest

airbyte_cdk/manifest_server/cli/_common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
# Import server dependencies with graceful fallback
99
try:
10+
import ddtrace # noqa: F401
1011
import fastapi # noqa: F401
1112
import uvicorn # noqa: F401
1213

0 commit comments

Comments
 (0)