Skip to content

Commit 79ffb77

Browse files
committed
Merge branch 'main' into tolik0/concurrent-perpartitioncursor
2 parents 357a925 + f222fcc commit 79ffb77

31 files changed

+2086
-601
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/auth/selective_authenticator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __new__( # type: ignore[misc]
3030
try:
3131
selected_key = str(
3232
dpath.get(
33-
config, # type: ignore [arg-type] # Dpath wants mutable mapping but doesn't need it.
33+
config, # type: ignore[arg-type] # Dpath wants mutable mapping but doesn't need it.
3434
authenticator_selection_path,
3535
)
3636
)

airbyte_cdk/sources/declarative/concurrent_declarative_source.py

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

6060

6161
class ConcurrentDeclarativeSource(ManifestDeclarativeSource, Generic[TState]):
62-
# By default, we defer to a value of 1 which represents running a connector using the Concurrent CDK engine on only one thread.
63-
SINGLE_THREADED_CONCURRENCY_LEVEL = 1
62+
# 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
63+
# because it has hit the limit of futures but not partition reader is consuming them.
64+
_LOWEST_SAFE_CONCURRENCY_LEVEL = 2
6465

6566
def __init__(
6667
self,
@@ -110,8 +111,8 @@ def __init__(
110111
concurrency_level // 2, 1
111112
) # 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
112113
else:
113-
concurrency_level = self.SINGLE_THREADED_CONCURRENCY_LEVEL
114-
initial_number_of_partitions_to_generate = self.SINGLE_THREADED_CONCURRENCY_LEVEL
114+
concurrency_level = self._LOWEST_SAFE_CONCURRENCY_LEVEL
115+
initial_number_of_partitions_to_generate = self._LOWEST_SAFE_CONCURRENCY_LEVEL // 2
115116

116117
self._concurrent_source = ConcurrentSource.create(
117118
num_workers=concurrency_level,

0 commit comments

Comments
 (0)