airbyte-cdk 6.8.1rc7__py3-none-any.whl → 6.8.1rc8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- airbyte_cdk/sources/declarative/concurrent_declarative_source.py +22 -15
- airbyte_cdk/sources/streams/http/http_client.py +0 -1
- {airbyte_cdk-6.8.1rc7.dist-info → airbyte_cdk-6.8.1rc8.dist-info}/METADATA +1 -1
- {airbyte_cdk-6.8.1rc7.dist-info → airbyte_cdk-6.8.1rc8.dist-info}/RECORD +7 -7
- {airbyte_cdk-6.8.1rc7.dist-info → airbyte_cdk-6.8.1rc8.dist-info}/LICENSE.txt +0 -0
- {airbyte_cdk-6.8.1rc7.dist-info → airbyte_cdk-6.8.1rc8.dist-info}/WHEEL +0 -0
- {airbyte_cdk-6.8.1rc7.dist-info → airbyte_cdk-6.8.1rc8.dist-info}/entry_points.txt +0 -0
@@ -79,6 +79,9 @@ class ConcurrentDeclarativeSource(ManifestDeclarativeSource, Generic[TState]):
|
|
79
79
|
emit_connector_builder_messages=emit_connector_builder_messages,
|
80
80
|
disable_resumable_full_refresh=True,
|
81
81
|
)
|
82
|
+
self._config = config
|
83
|
+
self._concurrent_streams: Optional[List[AbstractStream]] = None
|
84
|
+
self._synchronous_streams: Optional[List[Stream]] = None
|
82
85
|
|
83
86
|
super().__init__(
|
84
87
|
source_config=source_config,
|
@@ -89,21 +92,6 @@ class ConcurrentDeclarativeSource(ManifestDeclarativeSource, Generic[TState]):
|
|
89
92
|
|
90
93
|
self._state = state
|
91
94
|
|
92
|
-
self._concurrent_streams: Optional[List[AbstractStream]]
|
93
|
-
self._synchronous_streams: Optional[List[Stream]]
|
94
|
-
|
95
|
-
# If the connector command was SPEC, there is no incoming config, and we cannot instantiate streams because
|
96
|
-
# they might depend on it. Ideally we want to have a static method on this class to get the spec without
|
97
|
-
# any other arguments, but the existing entrypoint.py isn't designed to support this. Just noting this
|
98
|
-
# for our future improvements to the CDK.
|
99
|
-
if config:
|
100
|
-
self._concurrent_streams, self._synchronous_streams = self._group_streams(
|
101
|
-
config=config or {}
|
102
|
-
)
|
103
|
-
else:
|
104
|
-
self._concurrent_streams = None
|
105
|
-
self._synchronous_streams = None
|
106
|
-
|
107
95
|
concurrency_level_from_manifest = self._source_config.get("concurrency_level")
|
108
96
|
if concurrency_level_from_manifest:
|
109
97
|
concurrency_level_component = self._constructor.create_component(
|
@@ -132,6 +120,19 @@ class ConcurrentDeclarativeSource(ManifestDeclarativeSource, Generic[TState]):
|
|
132
120
|
message_repository=self.message_repository, # type: ignore # message_repository is always instantiated with a value by factory
|
133
121
|
)
|
134
122
|
|
123
|
+
def _actually_group(self) -> None:
|
124
|
+
# If the connector command was SPEC, there is no incoming config, and we cannot instantiate streams because
|
125
|
+
# they might depend on it. Ideally we want to have a static method on this class to get the spec without
|
126
|
+
# any other arguments, but the existing entrypoint.py isn't designed to support this. Just noting this
|
127
|
+
# for our future improvements to the CDK.
|
128
|
+
if self._config:
|
129
|
+
self._concurrent_streams, self._synchronous_streams = self._group_streams(
|
130
|
+
config=self._config or {}
|
131
|
+
)
|
132
|
+
else:
|
133
|
+
self._concurrent_streams = None
|
134
|
+
self._synchronous_streams = None
|
135
|
+
|
135
136
|
def read(
|
136
137
|
self,
|
137
138
|
logger: logging.Logger,
|
@@ -141,6 +142,9 @@ class ConcurrentDeclarativeSource(ManifestDeclarativeSource, Generic[TState]):
|
|
141
142
|
) -> Iterator[AirbyteMessage]:
|
142
143
|
# ConcurrentReadProcessor pops streams that are finished being read so before syncing, the names of the concurrent
|
143
144
|
# streams must be saved so that they can be removed from the catalog before starting synchronous streams
|
145
|
+
if self._concurrent_streams is None:
|
146
|
+
self._actually_group()
|
147
|
+
|
144
148
|
if self._concurrent_streams:
|
145
149
|
concurrent_stream_names = set(
|
146
150
|
[concurrent_stream.name for concurrent_stream in self._concurrent_streams]
|
@@ -166,6 +170,9 @@ class ConcurrentDeclarativeSource(ManifestDeclarativeSource, Generic[TState]):
|
|
166
170
|
yield from super().read(logger, config, filtered_catalog, state)
|
167
171
|
|
168
172
|
def discover(self, logger: logging.Logger, config: Mapping[str, Any]) -> AirbyteCatalog:
|
173
|
+
if self._concurrent_streams is None:
|
174
|
+
self._actually_group()
|
175
|
+
|
169
176
|
concurrent_streams = self._concurrent_streams or []
|
170
177
|
synchronous_streams = self._synchronous_streams or []
|
171
178
|
return AirbyteCatalog(
|
@@ -140,7 +140,6 @@ class HttpClient:
|
|
140
140
|
# Use in-memory cache if cache_dir is not set
|
141
141
|
# This is a non-obvious interface, but it ensures we don't write sql files when running unit tests
|
142
142
|
if cache_dir:
|
143
|
-
self._logger.info(f"Using path {cache_dir} for HTTP cache") # TODO: remove
|
144
143
|
sqlite_path = str(Path(cache_dir) / self.cache_filename)
|
145
144
|
else:
|
146
145
|
self._logger.info("Using memory for cache") # TODO: remove
|
@@ -62,7 +62,7 @@ airbyte_cdk/sources/declarative/checks/check_stream.py,sha256=dAA-UhmMj0WLXCkRQr
|
|
62
62
|
airbyte_cdk/sources/declarative/checks/connection_checker.py,sha256=MBRJo6WJlZQHpIfOGaNOkkHUmgUl_4wDM6VPo41z5Ss,1383
|
63
63
|
airbyte_cdk/sources/declarative/concurrency_level/__init__.py,sha256=5XUqrmlstYlMM0j6crktlKQwALek0uiz2D3WdM46MyA,191
|
64
64
|
airbyte_cdk/sources/declarative/concurrency_level/concurrency_level.py,sha256=YIwCTCpOr_QSNW4ltQK0yUGWInI8PKNY216HOOegYLk,2101
|
65
|
-
airbyte_cdk/sources/declarative/concurrent_declarative_source.py,sha256=
|
65
|
+
airbyte_cdk/sources/declarative/concurrent_declarative_source.py,sha256=rpWo7poxbNYJHPeV2tfiodJ4jeS6-5nfXV31CuIjjw4,23903
|
66
66
|
airbyte_cdk/sources/declarative/datetime/__init__.py,sha256=l9LG7Qm6e5r_qgqfVKnx3mXYtg1I9MmMjomVIPfU4XA,177
|
67
67
|
airbyte_cdk/sources/declarative/datetime/datetime_parser.py,sha256=SX9JjdesN1edN2WVUVMzU_ptqp2QB1OnsnjZ4mwcX7w,2579
|
68
68
|
airbyte_cdk/sources/declarative/datetime/min_max_datetime.py,sha256=8VZJP18eJLabSPP1XBSPDaagUBG6q1ynIiPJy3rE2mc,5344
|
@@ -273,7 +273,7 @@ airbyte_cdk/sources/streams/http/error_handlers/json_error_message_parser.py,sha
|
|
273
273
|
airbyte_cdk/sources/streams/http/error_handlers/response_models.py,sha256=xGIVELBFY0TmH9aUq1ikoqJz8oHLr6di2JLvKWVEO-s,2236
|
274
274
|
airbyte_cdk/sources/streams/http/exceptions.py,sha256=njC7MlMJoFYcSGz4mIp6-bqLFTr6vC8ej25X0oSeyjE,1824
|
275
275
|
airbyte_cdk/sources/streams/http/http.py,sha256=h0bq4arzMeJsR-5HZNfGYXtZhgVvLbW6myi9fuhMayU,28467
|
276
|
-
airbyte_cdk/sources/streams/http/http_client.py,sha256=
|
276
|
+
airbyte_cdk/sources/streams/http/http_client.py,sha256=mBv9ck2mUv4kvVozPmHN5gHVLIgZ9e11trUsTjskPiM,23308
|
277
277
|
airbyte_cdk/sources/streams/http/rate_limiting.py,sha256=IwdjrHKUnU97XO4qONgYRv4YYW51xQ8SJm4WLafXDB8,6351
|
278
278
|
airbyte_cdk/sources/streams/http/requests_native_auth/__init__.py,sha256=RN0D3nOX1xLgwEwKWu6pkGy3XqBFzKSNZ8Lf6umU2eY,413
|
279
279
|
airbyte_cdk/sources/streams/http/requests_native_auth/abstract_oauth.py,sha256=nxI94yJ3bGfpDO8RR3QvOJ-PSW0n9CElSAkgl5ae80Y,10321
|
@@ -330,8 +330,8 @@ airbyte_cdk/utils/slice_hasher.py,sha256=-pHexlNYoWYPnXNH-M7HEbjmeJe9Zk7SJijdQ7d
|
|
330
330
|
airbyte_cdk/utils/spec_schema_transformations.py,sha256=LVc9KbtMeV_z99jWo0Ou8u4l6eBJ0BWNhxj4zrrGKRs,763
|
331
331
|
airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
|
332
332
|
airbyte_cdk/utils/traced_exception.py,sha256=a6q51tBS3IdtefuOiL1eBwSmnNAXfjFMlMjSIQ_Tl-o,6165
|
333
|
-
airbyte_cdk-6.8.
|
334
|
-
airbyte_cdk-6.8.
|
335
|
-
airbyte_cdk-6.8.
|
336
|
-
airbyte_cdk-6.8.
|
337
|
-
airbyte_cdk-6.8.
|
333
|
+
airbyte_cdk-6.8.1rc8.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
|
334
|
+
airbyte_cdk-6.8.1rc8.dist-info/METADATA,sha256=cQWW8Fk6YGrxN-sqIW9PKhXR2pKGkURuYFUhsYgP3po,13522
|
335
|
+
airbyte_cdk-6.8.1rc8.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
336
|
+
airbyte_cdk-6.8.1rc8.dist-info/entry_points.txt,sha256=fj-e3PAQvsxsQzyyq8UkG1k8spunWnD4BAH2AwlR6NM,95
|
337
|
+
airbyte_cdk-6.8.1rc8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|