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
✨ Source Monday: Add incremental sync for Items stream #27944
✨ Source Monday: Add incremental sync for Items stream #27944
Conversation
Before Merging a Connector Pull RequestWow! What a great pull request you have here! 🎉 To merge this PR, ensure the following has been done/considered for each connector added or updated:
If the checklist is complete, but the CI check is failing,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small changes are requested, also please run the CAT locally before making this PR "ready for review"
thanks
airbyte-integrations/connectors/source-monday/integration_tests/sample_state.json
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-monday/source_monday/components.py
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-monday/source_monday/components.py
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-monday/source_monday/components.py
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-monday/source_monday/graphql_requester.py
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-monday/source_monday/manifest.yaml
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-monday/source_monday/manifest.yaml
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-monday/source_monday/schemas/tags.json
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-monday/source_monday/schemas/workspaces.json
Outdated
Show resolved
Hide resolved
c267655
to
0c95f12
Compare
source-monday test report (commit
|
Step | Result |
---|---|
Validate airbyte-integrations/connectors/source-monday/metadata.yaml | ✅ |
Connector version semver check | ✅ |
QA checks | ✅ |
Code format checks | ✅ |
Connector package install | ✅ |
Build source-monday docker image for platform linux/x86_64 | ✅ |
Unit tests | ❌ |
Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command
airbyte-ci connectors --name=source-monday test
source-monday test report (commit
|
Step | Result |
---|---|
Validate airbyte-integrations/connectors/source-monday/metadata.yaml | ✅ |
Connector version semver check | ✅ |
QA checks | ✅ |
Code format checks | ❌ |
Connector package install | ✅ |
Build source-monday docker image for platform linux/x86_64 | ✅ |
Unit tests | ✅ |
Acceptance tests | ✅ |
Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command
airbyte-ci connectors --name=source-monday test
source-monday test report (commit
|
Step | Result |
---|---|
Validate airbyte-integrations/connectors/source-monday/metadata.yaml | ✅ |
Connector version semver check | ✅ |
QA checks | ✅ |
Code format checks | ✅ |
Connector package install | ✅ |
Build source-monday docker image for platform linux/x86_64 | ✅ |
Unit tests | ✅ |
Acceptance tests | ✅ |
Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command
airbyte-ci connectors --name=source-monday test
# this change applies for all configs bellow. | ||
# changed type of id for assets in items and updates | ||
# change deprecated owner to owners in boards | ||
# All changes described in corresponding pr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add link to PR and delete
# changed type of id for assets in items and updates
# change deprecated owner to owners in boards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add link to PR instead number
airbyte-integrations/connectors/source-monday/source_monday/components.py
Outdated
Show resolved
Hide resolved
def close_slice(self, stream_slice: StreamSlice, most_recent_record: Optional[Record]) -> None: | ||
max_dt = self._state if self.is_greater_than_or_equal(self._state, most_recent_record) else most_recent_record | ||
|
||
if not max_dt: | ||
return | ||
self._state[self.cursor_field.eval(self.config)] = max_dt[self.cursor_field.eval(self.config)] | ||
|
||
if self.parent_stream: | ||
if self.parent_cursor_field not in most_recent_record: | ||
date_str = most_recent_record[self.cursor_field.eval(self.config)] | ||
parent_cursor = int(datetime.strptime(date_str, "%Y-%m-%dT%H:%M:%S%z").timestamp()) | ||
else: | ||
parent_cursor = most_recent_record[self.parent_cursor_field] | ||
self._state[self.parent_stream_name] = {self.parent_cursor_field: parent_cursor} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def close_slice(self, stream_slice: StreamSlice, most_recent_record: Optional[Record]) -> None: | |
max_dt = self._state if self.is_greater_than_or_equal(self._state, most_recent_record) else most_recent_record | |
if not max_dt: | |
return | |
self._state[self.cursor_field.eval(self.config)] = max_dt[self.cursor_field.eval(self.config)] | |
if self.parent_stream: | |
if self.parent_cursor_field not in most_recent_record: | |
date_str = most_recent_record[self.cursor_field.eval(self.config)] | |
parent_cursor = int(datetime.strptime(date_str, "%Y-%m-%dT%H:%M:%S%z").timestamp()) | |
else: | |
parent_cursor = most_recent_record[self.parent_cursor_field] | |
self._state[self.parent_stream_name] = {self.parent_cursor_field: parent_cursor} | |
def close_slice(self, stream_slice: StreamSlice, last_record: Optional[Record]) -> None: | |
max_dt = self._state if self.is_greater_than_or_equal(self._state, most_recent_record) else most_recent_record | |
if not max_dt: | |
return | |
cursor_field_eval = self.cursor_field.eval(self.config) | |
self._state[cursor_field_eval] = max_dt[cursor_field_eval] | |
if self.parent_stream: | |
date_str = most_recent_record[self.cursor_field.eval(self.config)] | |
default_parent_cursor = int(datetime.strptime(date_str, "%Y-%m-%dT%H:%M:%S%z").timestamp()) | |
parent_cursor = most_recent_record.get(self.parent_cursor_field, default_parent_cursor) | |
self._state[self.parent_stream_name] = {self.parent_cursor_field: parent_cursor} |
airbyte-integrations/connectors/source-monday/source_monday/components.py
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-monday/source_monday/extractor.py
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-monday/source_monday/extractor.py
Outdated
Show resolved
Hide resolved
8402029
to
4d4abc4
Compare
source-monday test report (commit
|
Step | Result |
---|---|
Validate airbyte-integrations/connectors/source-monday/metadata.yaml | ✅ |
Connector version semver check | ✅ |
QA checks | ✅ |
Code format checks | ✅ |
Connector package install | ✅ |
Build source-monday docker image for platform linux/x86_64 | ✅ |
Unit tests | ❌ |
Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command
airbyte-ci connectors --name=source-monday test
source-monday test report (commit
|
Step | Result |
---|---|
Validate airbyte-integrations/connectors/source-monday/metadata.yaml | ✅ |
Connector version semver check | ✅ |
QA checks | ✅ |
Code format checks | ✅ |
Connector package install | ✅ |
Build source-monday docker image for platform linux/x86_64 | ✅ |
Unit tests | ❌ |
Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command
airbyte-ci connectors --name=source-monday test
source-monday test report (commit
|
Step | Result |
---|---|
Validate airbyte-integrations/connectors/source-monday/metadata.yaml | ✅ |
Connector version semver check | ✅ |
QA checks | ✅ |
Code format checks | ✅ |
Connector package install | ✅ |
Build source-monday docker image for platform linux/x86_64 | ✅ |
Unit tests | ✅ |
Acceptance tests | ✅ |
Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command
airbyte-ci connectors --name=source-monday test
airbyte-integrations/connectors/source-monday/source_monday/extractor.py
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-monday/source_monday/extractor.py
Outdated
Show resolved
Hide resolved
airbyte-integrations/connectors/source-monday/acceptance-test-config.yml
Outdated
Show resolved
Hide resolved
source-monday test report (commit
|
Step | Result |
---|---|
Validate airbyte-integrations/connectors/source-monday/metadata.yaml | ✅ |
Connector version semver check | ✅ |
QA checks | ✅ |
Code format checks | ✅ |
Connector package install | ✅ |
Build source-monday docker image for platform linux/x86_64 | ✅ |
Unit tests | ✅ |
Acceptance tests | ✅ |
Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command
airbyte-ci connectors --name=source-monday test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Minor change required.
airbyte-integrations/connectors/source-monday/acceptance-test-config.yml
Outdated
Show resolved
Hide resolved
source-monday test report (commit
|
Step | Result |
---|---|
Validate airbyte-integrations/connectors/source-monday/metadata.yaml | ✅ |
Connector version semver check | ✅ |
QA checks | ✅ |
Code format checks | ✅ |
Connector package install | ✅ |
Build source-monday docker image for platform linux/x86_64 | ✅ |
Unit tests | ✅ |
Acceptance tests | ✅ |
Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command
airbyte-ci connectors --name=source-monday test
…rbytehq#27944) * Add incremental sync for the Boards and Items streams using Activity logs --------- Co-authored-by: Oleksandr Bazarnov <oleksandr.bazarnov@globallogic.com> Co-authored-by: Sherif A. Nada <snadalive@gmail.com>
What
Implements incremental sync for Items stream. Adds new stream: Activity logs.
#20950
How
This pull request implements incremental synchronization for the Items stream by implementing the approach described in the connected issue. The implementation follows these steps:
Following this process, the pull request achieves incremental synchronization by selectively updating only the modified items, as indicated by the activity logs.
Recommended reading order
source-monday/manifest.yaml
source-monday/extractor.py
source-monday/components.py
source-monday/graphql_requester.py