From 327f7886584192f0dc3a77b33b28962c0b4f4f8b Mon Sep 17 00:00:00 2001 From: Adileo Barone Date: Sun, 16 Nov 2025 18:22:31 +0100 Subject: [PATCH 1/5] Use provided config in declarative executor --- airbyte/_executors/declarative.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airbyte/_executors/declarative.py b/airbyte/_executors/declarative.py index e227eca34..e71b85ace 100644 --- a/airbyte/_executors/declarative.py +++ b/airbyte/_executors/declarative.py @@ -45,6 +45,7 @@ def __init__( self, name: str, manifest: dict | Path, + config: dict[str, Any] = {}, components_py: str | Path | None = None, components_py_checksum: str | None = None, ) -> None: @@ -66,7 +67,7 @@ def __init__( elif isinstance(manifest, dict): self._manifest_dict = manifest - config_dict: dict[str, Any] = {} + config_dict: dict[str, Any] = config if components_py: if isinstance(components_py, Path): components_py = components_py.read_text() From 9c4f84bc09a484f38c47a9a0b5163e1e1e636b50 Mon Sep 17 00:00:00 2001 From: Adileo Barone Date: Sun, 16 Nov 2025 18:26:50 +0100 Subject: [PATCH 2/5] Add config parameter to executor factory function --- airbyte/_executors/util.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/airbyte/_executors/util.py b/airbyte/_executors/util.py index ca4dd7d2f..ca2d729ea 100644 --- a/airbyte/_executors/util.py +++ b/airbyte/_executors/util.py @@ -169,6 +169,7 @@ def get_connector_executor( # noqa: PLR0912, PLR0913, PLR0914, PLR0915, C901 # install_root: Path | None = None, use_python: bool | Path | str | None = None, no_executor: bool = False, + config: dict[str, Any] = {} ) -> Executor: """This factory function creates an executor for a connector. @@ -334,6 +335,7 @@ def get_connector_executor( # noqa: PLR0912, PLR0913, PLR0914, PLR0915, C901 # return DeclarativeExecutor( name=name, manifest=source_manifest, + config=config, components_py=components_py_path, ) @@ -349,6 +351,7 @@ def get_connector_executor( # noqa: PLR0912, PLR0913, PLR0914, PLR0915, C901 # return DeclarativeExecutor( name=name, manifest=manifest_dict, + config=config, components_py=components_py, components_py_checksum=components_py_checksum, ) From 6f78a91bda69d2eeae4c7771dfd4294b67b5e11f Mon Sep 17 00:00:00 2001 From: Adileo Barone Date: Sun, 16 Nov 2025 18:27:52 +0100 Subject: [PATCH 3/5] Add config parameter to Source initialization --- airbyte/sources/util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/airbyte/sources/util.py b/airbyte/sources/util.py index 42372ed03..82f2c80a2 100644 --- a/airbyte/sources/util.py +++ b/airbyte/sources/util.py @@ -128,6 +128,7 @@ def get_source( # noqa: PLR0913 # Too many arguments install_if_missing=install_if_missing, install_root=install_root, no_executor=no_executor, + config=config ) return Source( From f7cb1094ed273b49105597756621f8a15776f650 Mon Sep 17 00:00:00 2001 From: "Aaron (\"AJ\") Steers" Date: Wed, 26 Nov 2025 19:22:16 -0800 Subject: [PATCH 4/5] Apply suggestion from @coderabbitai[bot] Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- airbyte/sources/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte/sources/util.py b/airbyte/sources/util.py index 82f2c80a2..96f2cbd11 100644 --- a/airbyte/sources/util.py +++ b/airbyte/sources/util.py @@ -128,7 +128,7 @@ def get_source( # noqa: PLR0913 # Too many arguments install_if_missing=install_if_missing, install_root=install_root, no_executor=no_executor, - config=config + config=config, ) return Source( From 72d6e76cdf990bce574ba186e4d08bc1b3553ddd Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 17 Dec 2025 08:27:59 +0000 Subject: [PATCH 5/5] fix: Replace mutable default argument with None for config parameter - Change config parameter default from {} to None in DeclarativeExecutor.__init__ - Change config parameter default from {} to None in get_connector_executor - Use config.copy() to avoid mutating caller's dict - Add missing Any import to util.py This fixes the B006 lint error (mutable default argument) which could cause shared state bugs across multiple calls. Co-Authored-By: AJ Steers --- airbyte/_executors/declarative.py | 4 ++-- airbyte/_executors/util.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/airbyte/_executors/declarative.py b/airbyte/_executors/declarative.py index e71b85ace..ea679d2f0 100644 --- a/airbyte/_executors/declarative.py +++ b/airbyte/_executors/declarative.py @@ -45,7 +45,7 @@ def __init__( self, name: str, manifest: dict | Path, - config: dict[str, Any] = {}, + config: dict[str, Any] | None = None, components_py: str | Path | None = None, components_py_checksum: str | None = None, ) -> None: @@ -67,7 +67,7 @@ def __init__( elif isinstance(manifest, dict): self._manifest_dict = manifest - config_dict: dict[str, Any] = config + config_dict: dict[str, Any] = config.copy() if config is not None else {} if components_py: if isinstance(components_py, Path): components_py = components_py.read_text() diff --git a/airbyte/_executors/util.py b/airbyte/_executors/util.py index ca2d729ea..6fbbd563b 100644 --- a/airbyte/_executors/util.py +++ b/airbyte/_executors/util.py @@ -5,7 +5,7 @@ import sys import tempfile from pathlib import Path -from typing import TYPE_CHECKING, Literal, cast +from typing import TYPE_CHECKING, Any, Literal, cast import requests import yaml @@ -169,7 +169,7 @@ def get_connector_executor( # noqa: PLR0912, PLR0913, PLR0914, PLR0915, C901 # install_root: Path | None = None, use_python: bool | Path | str | None = None, no_executor: bool = False, - config: dict[str, Any] = {} + config: dict[str, Any] | None = None, ) -> Executor: """This factory function creates an executor for a connector.