Skip to content

Commit a0cadf5

Browse files
committed
Merge branch 'main' into 50395-2
* main: ci: add Docker build workflow for PR checks (airbytehq#385) fix: Update DEFAULT_ERROR_MAPPING for InvalidURL to RETRY (airbytehq#384) chore: use python base image 4.0.0 in SDM (airbytehq#382) ci: add check for 'do not merge' in PR titles (airbytehq#383) chore: remove embedded module (airbytehq#380) build: update pyarrow to ^19.0.0 (do not merge) (airbytehq#379)
2 parents ca75f57 + e8ec233 commit a0cadf5

File tree

15 files changed

+185
-440
lines changed

15 files changed

+185
-440
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Docker Build Check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
docker-build-check:
10+
name: SDM Docker Image Build # Renamed job to be more descriptive
11+
runs-on: ubuntu-24.04
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
# Build the Python package to create the wheel files needed for the Docker build
19+
- name: Build Python Package
20+
uses: hynek/build-and-inspect-python-package@v2
21+
env:
22+
POETRY_DYNAMIC_VERSIONING_BYPASS: "0.0.0dev0"
23+
24+
# Copy the wheel files to the dist directory
25+
- name: Copy wheel files to dist directory
26+
run: |
27+
mkdir -p dist
28+
cp /tmp/baipp/dist/*.whl dist/
29+
30+
- name: Set up QEMU for multi-platform builds
31+
uses: docker/setup-qemu-action@v3
32+
33+
- name: Set up Docker Buildx
34+
uses: docker/setup-buildx-action@v3
35+
36+
- name: Build Docker image for multiple platforms
37+
id: docker-build
38+
uses: docker/build-push-action@v5
39+
with:
40+
context: .
41+
platforms: linux/amd64,linux/arm64
42+
push: false
43+
tags: airbyte/source-declarative-manifest:pr-${{ github.event.pull_request.number }}
44+
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=SDM Docker image for PR ${{ github.event.pull_request.number }}

.github/workflows/semantic_pr_check.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,13 @@ jobs:
3939
Build
4040
tests
4141
Tests
42+
43+
- name: Check for "do not merge" in PR title
44+
if: ${{ github.event.pull_request.draft == false }}
45+
uses: actions/github-script@v6
46+
with:
47+
script: |
48+
const title = context.payload.pull_request.title.toLowerCase();
49+
if (title.includes('do not merge') || title.includes('do-not-merge')) {
50+
core.setFailed('PR title contains "do not merge" or "do-not-merge". Please remove this before merging.');
51+
}

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:3.0.0@sha256:1a0845ff2b30eafa793c6eee4e8f4283c2e52e1bbd44eed6cb9e9abd5d34d844
8+
FROM docker.io/airbyte/python-connector-base:4.0.0@sha256:d9894b6895923b379f3006fa251147806919c62b7d9021b5cd125bb67d7bbe22
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.10/site-packages/airbyte_cdk/cli/source_declarative_manifest/_run.py source_declarative_manifest/run.py \
28-
&& cp /usr/local/lib/python3.10/site-packages/airbyte_cdk/cli/source_declarative_manifest/spec.json source_declarative_manifest/
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/
2929

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

airbyte_cdk/sources/embedded/__init__.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

airbyte_cdk/sources/embedded/base_integration.py

Lines changed: 0 additions & 61 deletions
This file was deleted.

airbyte_cdk/sources/embedded/catalog.py

Lines changed: 0 additions & 57 deletions
This file was deleted.

airbyte_cdk/sources/embedded/runner.py

Lines changed: 0 additions & 57 deletions
This file was deleted.

airbyte_cdk/sources/embedded/tools.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

airbyte_cdk/sources/streams/http/error_handlers/default_error_mapping.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
error_message="Invalid Protocol Schema: The endpoint that data is being requested from is using an invalid or insecure. Exception: requests.exceptions.InvalidSchema",
2020
),
2121
InvalidURL: ErrorResolution(
22-
response_action=ResponseAction.FAIL,
23-
failure_type=FailureType.config_error,
24-
error_message="Invalid URL specified: The endpoint that data is being requested from is not a valid URL. Exception: requests.exceptions.InvalidURL",
22+
response_action=ResponseAction.RETRY,
23+
failure_type=FailureType.transient_error,
24+
error_message="Invalid URL specified or DNS error occurred: The endpoint that data is being requested from is not a valid URL. Exception: requests.exceptions.InvalidURL",
2525
),
2626
RequestException: ErrorResolution(
2727
response_action=ResponseAction.RETRY,

0 commit comments

Comments
 (0)