Skip to content

Commit d746e4d

Browse files
committed
Source Microsoft Onedrive: update source for compatibility with concurrent CDK
1 parent cf8e9ff commit d746e4d

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

airbyte-integrations/connectors/source-microsoft-onedrive/metadata.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ data:
1616
connectorSubtype: api
1717
connectorType: source
1818
definitionId: 01d1c685-fd4a-4837-8f4c-93fe5a0d2188
19-
dockerImageTag: 0.1.4
19+
dockerImageTag: 0.1.5
2020
dockerRepository: airbyte/source-microsoft-onedrive
2121
githubIssueLabel: source-microsoft-onedrive
2222
icon: microsoft-onedrive.svg

airbyte-integrations/connectors/source-microsoft-onedrive/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from setuptools import find_packages, setup
77

88
MAIN_REQUIREMENTS = [
9-
"airbyte-cdk[file-based]==0.59.2", # pinned until compatible with https://github.com/airbytehq/airbyte/pull/34411
9+
"airbyte-cdk[file-based]>=0.60.1",
1010
"msal~=1.25.0",
1111
"Office365-REST-Python-Client~=2.5.2",
1212
"smart-open~=6.4.0",

airbyte-integrations/connectors/source-microsoft-onedrive/source_microsoft_onedrive/run.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,11 @@
1313
def run():
1414
args = sys.argv[1:]
1515
catalog_path = AirbyteEntrypoint.extract_catalog(args)
16-
source = SourceMicrosoftOneDrive(catalog_path)
16+
config_path = AirbyteEntrypoint.extract_config(args)
17+
state_path = AirbyteEntrypoint.extract_state(args)
18+
source = SourceMicrosoftOneDrive(
19+
SourceMicrosoftOneDrive.read_catalog(catalog_path) if catalog_path else None,
20+
SourceMicrosoftOneDrive.read_config(config_path) if config_path else None,
21+
SourceMicrosoftOneDrive.read_state(state_path) if state_path else None,
22+
)
1723
launch(source, args)

airbyte-integrations/connectors/source-microsoft-onedrive/source_microsoft_onedrive/source.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
#
22
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
33
#
4-
from typing import Any
4+
from typing import Any, Mapping, Optional
55

6-
from airbyte_cdk.models import AdvancedAuth, ConnectorSpecification, OAuthConfigSpecification
6+
from airbyte_cdk.models import AdvancedAuth, ConfiguredAirbyteCatalog, ConnectorSpecification, OAuthConfigSpecification
77
from airbyte_cdk.sources.file_based.file_based_source import FileBasedSource
88
from airbyte_cdk.sources.file_based.stream.cursor.default_file_based_cursor import DefaultFileBasedCursor
9+
from airbyte_cdk.sources.source import TState
910
from source_microsoft_onedrive.spec import SourceMicrosoftOneDriveSpec
1011
from source_microsoft_onedrive.stream_reader import SourceMicrosoftOneDriveStreamReader
1112

1213

1314
class SourceMicrosoftOneDrive(FileBasedSource):
14-
def __init__(self, catalog_path: str):
15+
def __init__(self, catalog: Optional[ConfiguredAirbyteCatalog], config: Optional[Mapping[str, Any]], state: Optional[TState]):
1516
super().__init__(
1617
stream_reader=SourceMicrosoftOneDriveStreamReader(),
1718
spec_class=SourceMicrosoftOneDriveSpec,
18-
catalog_path=catalog_path,
19+
catalog=catalog,
20+
config=config,
21+
state=state,
1922
cursor_cls=DefaultFileBasedCursor,
2023
)
2124

docs/integrations/sources/microsoft-onedrive.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ The connector is restricted by normal Microsoft Graph [requests limitation](http
121121

122122
| Version | Date | Pull Request | Subject |
123123
|:--------|:-----------|:---------------------------------------------------------|:--------------------------|
124+
| 0.1.5 | 2024-01-30 | [34681](https://github.com/airbytehq/airbyte/pull/34681) | Unpin CDK version to make compatible with the Concurrent CDK |
124125
| 0.1.4 | 2024-01-30 | [34661](https://github.com/airbytehq/airbyte/pull/34661) | Pin CDK version until upgrade for compatibility with the Concurrent CDK |
125126
| 0.1.3 | 2024-01-24 | [34478](https://github.com/airbytehq/airbyte/pull/34478) | Fix OAuth |
126127
| 0.1.2 | 2021-12-22 | [33745](https://github.com/airbytehq/airbyte/pull/33745) | Add ql and sl to metadata |

0 commit comments

Comments
 (0)