Skip to content

Commit 741e1b6

Browse files
committed
Revert S3 changes; these will be done in a separate PR
1 parent 93d5741 commit 741e1b6

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

airbyte-integrations/connectors/source-s3/source_s3/v4/source.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,14 @@
2121

2222

2323
class SourceS3(FileBasedSource):
24-
25-
@classmethod
26-
def read_config(cls, config_path: str) -> Mapping[str, Any]:
24+
def read_config(self, config_path: str) -> Mapping[str, Any]:
2725
"""
2826
Used to override the default read_config so that when the new file-based S3 connector processes a config
2927
in the legacy format, it can be transformed into the new config. This happens in entrypoint before we
3028
validate the config against the new spec.
3129
"""
3230
config = super().read_config(config_path)
33-
if not SourceS3._is_v4_config(config):
31+
if not self._is_v4_config(config):
3432
parsed_legacy_config = SourceS3Spec(**config)
3533
converted_config = LegacyConfigTransformer.convert(parsed_legacy_config)
3634
emit_configuration_as_airbyte_control_message(converted_config)
@@ -68,8 +66,7 @@ def spec(self, *args: Any, **kwargs: Any) -> ConnectorSpecification:
6866
connectionSpecification=s4_spec,
6967
)
7068

71-
@staticmethod
72-
def _is_v4_config(config: Mapping[str, Any]) -> bool:
69+
def _is_v4_config(self, config: Mapping[str, Any]) -> bool:
7370
return "streams" in config
7471

7572
@staticmethod

airbyte-integrations/connectors/source-s3/v4_main.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,8 @@
1515

1616
def get_source(args: List[str]):
1717
catalog_path = AirbyteEntrypoint.extract_catalog(args)
18-
config_path = AirbyteEntrypoint.extract_config(args)
19-
state_path = AirbyteEntrypoint.extract_state(args)
2018
try:
21-
return SourceS3(
22-
SourceS3StreamReader(),
23-
Config,
24-
SourceS3.read_catalog(catalog_path) if catalog_path else None,
25-
SourceS3.read_config(config_path) if config_path else None,
26-
SourceS3.read_state(state_path) if state_path else None,
27-
cursor_cls=Cursor,
28-
)
19+
return SourceS3(SourceS3StreamReader(), Config, catalog_path, cursor_cls=Cursor)
2920
except Exception:
3021
print(
3122
AirbyteMessage(

0 commit comments

Comments
 (0)