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 Notion: add new stream comments
#30324
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,
|
source-notion test report (commit
|
Step | Result |
---|---|
Connector package install | ✅ |
Build source-notion docker image for platform linux/x86_64 | ✅ |
Unit tests | ✅ |
Acceptance tests | ❌ |
Code format checks | ❌ |
Validate airbyte-integrations/connectors/source-notion/metadata.yaml | ✅ |
Connector version semver check | ✅ |
Connector version increment check | ✅ |
QA checks | ✅ |
☁️ View runs for commit in Dagger Cloud
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-notion test
source-notion test report (commit
|
Step | Result |
---|---|
Connector package install | ✅ |
Build source-notion docker image for platform linux/x86_64 | ✅ |
Unit tests | ✅ |
Acceptance tests | ❌ |
Code format checks | ❌ |
Validate airbyte-integrations/connectors/source-notion/metadata.yaml | ✅ |
Connector version semver check | ✅ |
Connector version increment check | ✅ |
QA checks | ✅ |
☁️ View runs for commit in Dagger Cloud
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-notion test
return f"comments" | ||
|
||
def request_params(self, next_page_token: Mapping[str, Any] = None, stream_slice: Mapping[str, Any] = None, **kwargs) -> MutableMapping[str, Any]: | ||
block_id = stream_slice.get("block_id", "") |
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.
is there a valid situation where block_id wouldn't be set? or should this throw an error if it can't find block ID?
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.
Good point, there's no valid reason that I can think of that block_id wouldn't be properly set, since every parent record's id is fetched directly from the API. I can remove the default argument (it will never trigger and after testing it would have just resulted in a 400 error anyway).
|
||
# Gather parent stream records in full | ||
parent_records = self.parent.read_records( | ||
sync_mode=SyncMode.full_refresh, cursor_field=self.parent.cursor_field, stream_state=stream_state |
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.
if we're syncing full refresh is there a reason to pass state?
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.
Nope, that's my bad! I'll remove the argument
source-notion test report (commit
|
Step | Result |
---|---|
Connector package install | ✅ |
Build source-notion docker image for platform linux/x86_64 | ✅ |
Unit tests | ✅ |
Acceptance tests | ❌ |
Code format checks | ❌ |
Validate airbyte-integrations/connectors/source-notion/metadata.yaml | ✅ |
Connector version semver check | ✅ |
Connector version increment check | ✅ |
QA checks | ✅ |
☁️ View runs for commit in Dagger Cloud
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-notion test
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
source-notion test report (commit
|
Step | Result |
---|---|
Connector package install | ✅ |
Build source-notion docker image for platform(s) linux/x86_64 | ✅ |
Unit tests | ✅ |
Acceptance tests | ✅ |
Code format checks | ❌ |
Validate metadata for source-notion | ✅ |
Connector version semver check | ✅ |
Connector version increment check | ✅ |
QA checks | ✅ |
☁️ View runs for commit in Dagger Cloud
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-notion test
source-notion test report (commit
|
Step | Result |
---|---|
Connector package install | ✅ |
Build source-notion docker image for platform(s) linux/x86_64 | ✅ |
Unit tests | ✅ |
Acceptance tests | ✅ |
Code format checks | ✅ |
Validate metadata for source-notion | ✅ |
Connector version semver check | ✅ |
Connector version increment check | ✅ |
QA checks | ✅ |
☁️ View runs for commit in Dagger Cloud
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-notion test
Co-authored-by: ChristoGrab <ChristoGrab@users.noreply.github.com>
Co-authored-by: ChristoGrab <ChristoGrab@users.noreply.github.com>
What
Added stream for the Comments endpoint in Notion source connector.
How
id
for use in query params (following the pattern of Blocks stream).last_edited_time
as the cursor, adding it to the comment object aspage_last_edited_time
. I chose this approach because the order of the timestamps of the comments from one page to another can't be guaranteed, ie:In this scenario, if we used the comment's
last_edited_time
as the cursor, the value of state will be updated to 4 after querying Page I, and in the following slice none of the comments in Page II will be synced. Because the pages query is sorted by LMD, by using the page's timestamp we can ensure that older comments in a page won't be skipped. Let me know if there's a better pattern to use that addresses this issue!Recommended reading order
streams.py
test_incremental_streams.py
User Impact
No breaking changes