Skip to content

✨Source Monday: Bumped CDK version dependency #36746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: 80a54ea2-9959-4040-aac1-eee42423ec9b
dockerImageTag: 2.0.4
dockerImageTag: 2.0.5
releases:
breakingChanges:
2.0.0:
Expand Down
107 changes: 52 additions & 55 deletions airbyte-integrations/connectors/source-monday/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions airbyte-integrations/connectors/source-monday/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
version = "2.0.4"
version = "2.0.5"
name = "source-monday"
description = "Source implementation for Monday."
authors = [ "Airbyte <[email protected]>",]
Expand All @@ -17,7 +17,7 @@ include = "source_monday"

[tool.poetry.dependencies]
python = "^3.9,<3.12"
airbyte-cdk = "==0.62.0"
airbyte-cdk = "^0"

[tool.poetry.scripts]
source-monday = "source_monday.run:run"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def close_slice(self, stream_slice: StreamSlice, most_recent_record: Optional[Re
self._state[self.cursor_field.eval(self.config)] = latest_record[self.cursor_field.eval(self.config)]

def stream_slices(self) -> Iterable[Mapping[str, Any]]:
yield {}
yield StreamSlice(partition={}, cursor_slice={})

def should_be_synced(self, record: Record) -> bool:
"""
Expand Down Expand Up @@ -170,7 +170,7 @@ def read_parent_stream(
# check if state is empty ->
if not stream_state.get(self.parent_cursor_field):
# yield empty slice for complete fetch of items stream
yield {}
yield StreamSlice(partition={}, cursor_slice={})
return

all_ids = set()
Expand Down Expand Up @@ -200,11 +200,11 @@ def read_parent_stream(

# yield slice with desired number of ids
if self.nested_items_per_page == len(slice_ids):
yield {self.substream_slice_field: slice_ids}
yield StreamSlice(partition={self.substream_slice_field: slice_ids}, cursor_slice={})
slice_ids = list()
# yield leftover ids if any left
if slice_ids:
yield {self.substream_slice_field: slice_ids}
yield StreamSlice(partition={self.substream_slice_field: slice_ids}, cursor_slice={})

# If the parent slice contains no records
if empty_parent_slice:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_given_retryable_error_when_read_teams_then_stop_syncing(self, http_mock
for error in get_log_messages_by_log_level(output.logs, LogLevel.INFO)
if f'Response Code: 200, Response Text: {json.dumps({"error_code": "ComplexityException", "status_code": 200})}' in error
]
assert len(error_logs) == 5
assert len(error_logs) == 6

@HttpMocker()
def test_given_retryable_500_error_when_read_teams_then_stop_syncing(self, http_mocker):
Expand All @@ -110,7 +110,7 @@ def test_given_retryable_500_error_when_read_teams_then_stop_syncing(self, http_
for error in get_log_messages_by_log_level(output.logs, LogLevel.INFO)
if f'Response Code: 500, Response Text: {json.dumps({"error_message": "Internal server error", "status_code": 500})}' in error
]
assert len(error_logs) == 5
assert len(error_logs) == 6

@HttpMocker()
def test_given_403_error_when_read_teams_then_ignore_the_stream(self, http_mocker):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
)
def test_item_pagination_strategy(response_json, last_records, expected):
strategy = ItemPaginationStrategy(
config={},
page_size=1,
parameters={"items_per_page": 1},
)
Expand Down Expand Up @@ -73,6 +74,7 @@ def test_item_pagination_strategy(response_json, last_records, expected):
)
def test_item_cursor_pagination_strategy(response_json, last_records, expected):
strategy = ItemCursorPaginationStrategy(
config={},
page_size=1,
parameters={"items_per_page": 1},
)
Expand Down
Loading
Loading