Skip to content

Commit d7e4873

Browse files
authored
Merge branch 'main' into lazebnyi/add-dynamic-schema-loader
2 parents 507afb6 + ed9a5e7 commit d7e4873

File tree

12 files changed

+191
-253
lines changed

12 files changed

+191
-253
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ updates:
2121
commit-message:
2222
prefix: "ci(deps): "
2323
schedule:
24-
interval: daily
24+
interval: monthly
2525
labels:
2626
- ci
2727
groups:

.github/workflows/connector-tests.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ jobs:
8888
# cdk_extra: n/a
8989
# TODO: These are manifest connectors and won't work as expected until we
9090
# add `--use-local-cdk` support for manifest connectors.
91-
# - connector: source-the-guardian-api
92-
# cdk_extra: n/a
93-
# - connector: source-pokeapi
94-
# cdk_extra: n/a
91+
- connector: source-the-guardian-api
92+
cdk_extra: n/a
93+
- connector: source-pokeapi
94+
cdk_extra: n/a
9595

9696
name: "Check: '${{matrix.connector}}' (skip=${{needs.cdk_changes.outputs['src'] == 'false' || needs.cdk_changes.outputs[matrix.cdk_extra] == 'false'}})"
9797
permissions:
@@ -163,9 +163,10 @@ jobs:
163163
fi
164164
echo -e "\n[Download Job Output](${{steps.upload_job_output.outputs.artifact-url}})" >> $GITHUB_STEP_SUMMARY
165165
if [ "${success}" != "true" ]; then
166-
echo "::error::Test failed for connector '${{ matrix.connector }}' on step '${failed_step}'. Check the logs for more details."
166+
echo "::error::Test failed for connector '${{ matrix.connector }}' on step '${failed_step}'. "
167167
exit 1
168168
fi
169+
echo "See the execution report for details: ${html_report_url}"
169170
echo "success=${success}" >> $GITHUB_OUTPUT
170171
echo "html_report_url=${html_report_url}" >> $GITHUB_OUTPUT
171172

.github/workflows/publish_sdm_connector.yml

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

.github/workflows/pypi_publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
workflow_dispatch:
1515
inputs:
1616
version:
17-
description: "Version. The version to publish, ie 1.0.0 or 1.0.0-dev1. In most cases, you can leave this blank. If run from a release tag (recommended), the version number will be inferred from the git tag."
17+
description: "Note that this workflow is intended for prereleases. For public-facing stable releases, please use the GitHub Releases workflow instead: https://github.com/airbytehq/airbyte-python-cdk/blob/main/docs/RELEASES.md. If running this workflow from main or from a dev branch, please enter the desired version number here, for instance 1.2.3dev0 or 1.2.3rc1."
1818
required: false
1919
publish_to_pypi:
2020
description: "Publish to PyPI. If true, the workflow will publish to PyPI."
@@ -30,7 +30,7 @@ on:
3030
description: "Update Connector Builder. If true, the workflow will create a PR to bump the CDK version used by Connector Builder."
3131
type: boolean
3232
required: true
33-
default: true
33+
default: false
3434

3535
jobs:
3636
build:

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker.io/airbyte/python-connector-base:2.0.0@sha256:c44839ba84406116e8ba68722a0f30e8f6e7056c726f447681bb9e9ece8bd916
1+
FROM docker.io/airbyte/python-connector-base:3.0.0@sha256:1a0845ff2b30eafa793c6eee4e8f4283c2e52e1bbd44eed6cb9e9abd5d34d844
22

33
WORKDIR /airbyte/integration_code
44

@@ -23,6 +23,10 @@ RUN mkdir -p source_declarative_manifest \
2323
# Remove unnecessary build files
2424
RUN rm -rf dist/ pyproject.toml poetry.lock README.md
2525

26+
# Set ownership of /airbyte to the non-root airbyte user and group (1000:1000)
27+
RUN chown -R 1000:1000 /airbyte
28+
2629
# Set the entrypoint
2730
ENV AIRBYTE_ENTRYPOINT="python /airbyte/integration_code/main.py"
2831
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
32+
USER airbyte

airbyte_cdk/sources/declarative/concurrent_declarative_source.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@
5656

5757

5858
class ConcurrentDeclarativeSource(ManifestDeclarativeSource, Generic[TState]):
59-
# By default, we defer to a value of 1 which represents running a connector using the Concurrent CDK engine on only one thread.
60-
SINGLE_THREADED_CONCURRENCY_LEVEL = 1
59+
# By default, we defer to a value of 2. A value lower than than could cause a PartitionEnqueuer to be stuck in a state of deadlock
60+
# because it has hit the limit of futures but not partition reader is consuming them.
61+
_LOWEST_SAFE_CONCURRENCY_LEVEL = 2
6162

6263
def __init__(
6364
self,
@@ -107,8 +108,8 @@ def __init__(
107108
concurrency_level // 2, 1
108109
) # Partition_generation iterates using range based on this value. If this is floored to zero we end up in a dead lock during start up
109110
else:
110-
concurrency_level = self.SINGLE_THREADED_CONCURRENCY_LEVEL
111-
initial_number_of_partitions_to_generate = self.SINGLE_THREADED_CONCURRENCY_LEVEL
111+
concurrency_level = self._LOWEST_SAFE_CONCURRENCY_LEVEL
112+
initial_number_of_partitions_to_generate = self._LOWEST_SAFE_CONCURRENCY_LEVEL // 2
112113

113114
self._concurrent_source = ConcurrentSource.create(
114115
num_workers=concurrency_level,

airbyte_cdk/sources/declarative/declarative_component_schema.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ definitions:
327327
additionalProperties: true
328328
ConcurrencyLevel:
329329
title: Concurrency Level
330-
description: Defines the amount of parallelization for the streams that are being synced. The factor of parallelization is how many partitions or streams are synced at the same time. For example, with a concurrency_level of 10, ten streams or partitions of data will processed at the same time.
330+
description: Defines the amount of parallelization for the streams that are being synced. The factor of parallelization is how many partitions or streams are synced at the same time. For example, with a concurrency_level of 10, ten streams or partitions of data will processed at the same time. Note that a value of 1 could create deadlock if a stream has a very high number of partitions.
331331
type: object
332332
required:
333333
- default_concurrency

0 commit comments

Comments
 (0)