-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[ACTIONS] Notion - notion-retrieve-block - Fix timeouts when fetching only page content when markdown is true #18015
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
[ACTIONS] Notion - notion-retrieve-block - Fix timeouts when fetching only page content when markdown is true #18015
Conversation
|
@RLeek is attempting to deploy a commit to the Pipedreamers Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
WalkthroughAdds a conditional NotionToMarkdown config flag to control child-page parsing (parseChildPages set to false when shouldRetrieveChildren is false); bumps version metadata across many Notion actions, sources, and package.json. No runtime control-flow or public API signature changes. Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant NotionModule as Notion Module
participant N2M as NotionToMarkdown
Caller->>NotionModule: getPageAsMarkdown(pageId, shouldRetrieveChildren)
alt shouldRetrieveChildren = false
NotionModule->>N2M: new NotionToMarkdown({ ..., parseChildPages:false, separateChildPage:true })
else
NotionModule->>N2M: new NotionToMarkdown({ ..., separateChildPage:true })
end
NotionModule->>N2M: pageToMarkdown(pageId)
N2M-->>NotionModule: blocks
NotionModule->>N2M: toMarkdownString(blocks)
N2M-->>NotionModule: output
alt shouldRetrieveChildren
NotionModule-->>Caller: output
else
NotionModule-->>Caller: output.parent
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (21)
✅ Files skipped from review due to trivial changes (20)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (1)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified. |
|
Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
components/notion/notion.app.mjs (1)
367-369: Prefer explicit config over conditional object spreadReplace the conditional spread with a direct assignment for clarity and to avoid spreading a boolean. Semantics remain the same and it’s easier to read/maintain.
separateChildPage: true, - ...!shouldRetrieveChildren && { - parseChildPages:false - } + parseChildPages: shouldRetrieveChildren,
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
components/notion/notion.app.mjs(1 hunks)
🔇 Additional comments (1)
components/notion/notion.app.mjs (1)
363-371: No action needed:parseChildPagesis supported in the installed version
- The project’s
components/notion/package.jsonpins [email protected], andparseChildPageswas added in v3.1.0.- Both
separateChildPageandparseChildPagesoptions are officially supported (see v3.1.0+ in the notion-to-md API docs and changelog).
WHY
When retrieveMarkdown is true, this will convert the pages content into markdown, including child page as those are included in the child-blocks of a page. If the page has many child pages, this will cause the request to timeout and/or hit rate-limits as it recursively fetches the content for all child pages.
This change makes it so that child pages are skipped when shouldRetrieveChildren is false to avoid this lengthy operation, as it isn't required and removed in the output.
Summary by CodeRabbit