-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Apollo IO search-accounts bug fix #17138
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
WalkthroughThe changes update the version numbers for the search-accounts action and the package. The internal implementation for fetching paginated account data was modified to use a different method and utility, shifting from a resource stream approach to an iteration-based approach while maintaining the overall search and export logic. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Action (search-accounts)
participant App (apollo_io)
participant Utils
User->>Action (search-accounts): Trigger search
Action (search-accounts)->>App (apollo_io): getIterations(params)
App (apollo_io)-->>Action (search-accounts): Iterator of accounts
Action (search-accounts)->>Utils: iterate(iterator)
Utils-->>Action (search-accounts): Array of accounts
Action (search-accounts)-->>User: Return summary with account count
Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
components/issue_badge/issue_badge.app.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/limitless_ai/limitless_ai.app.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs 📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (4)
✨ Finishing Touches
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. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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 (3)
components/apollo_io/actions/search-accounts/search-accounts.mjs (3)
9-9: Action version increment OK – please sync the docblock
version: "0.0.6"matches the package bump.
Minor: the Markdown docs / marketplace metadata (if any) should reference the new version to prevent drift.
43-55: Strip undefined query parameters before hitting the API
account_stage_ids,sort_by_field,sort_ascendingmay beundefined, causing the SDK to sendnull/empty query strings that some APIs treat as invalid.const params = utils.cleanObject({ q_organization_name: this.search, account_stage_ids: this.accountStageId, sort_by_field: this.sortByField, sort_ascending: this.sortAscending, }); resourceFnArgs: { params },If
utils.cleanObject(or similar) doesn’t exist, consider adding a small helper.
56-60: Potential memory pressure when collecting all pages
await utils.iterate(resourcesStream)materialises the entire result set into memory. Large account searches can blow up the Node process.Options:
- Accept
maxResults/limitprop and slice early.- Stream results downstream instead of returning an array.
- Push accounts incrementally via
$emitif this is meant for workflows.Consider one of the above to avoid OOM on big datasets.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
components/apollo_io/actions/search-accounts/search-accounts.mjs(3 hunks)components/apollo_io/package.json(1 hunks)
🔇 Additional comments (2)
components/apollo_io/package.json (1)
3-3: Version bump looks correct – remember accompanying artefactsPatch-level increment from
0.5.2→0.5.3is consistent with the non-breaking implementation change in the action.
Double-check that:
• CHANGELOG / release notes reflect the fix
•npm publish(or equivalent) is gated on passing CI for the new actionNo code issues spotted.
components/apollo_io/actions/search-accounts/search-accounts.mjs (1)
43-55: ValidategetIterationsargument contractYou’ve switched from
getResourcesStream()→getIterations(), but the signature has changed in past SDK revisions:this.app.getIterations({ resourceFn, resourceFnArgs, resourceName, })If the SDK in use expects
resourceFnArgsspread rather than nested, this will silently break pagination.
Please confirm against@pipedream/platform@^3.0.3:-const resourcesStream = this.app.getIterations({ - resourceFn: this.app.searchAccounts, - resourceFnArgs: { - params: { ... } - }, - resourceName: "accounts", -}); +const resourcesStream = this.app.getIterations( + this.app.searchAccounts, + { + params: { ... }, + }, + "accounts", +);If the existing call shape is correct for the current SDK, disregard.
luancazarine
left a comment
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.
Hi @michelle0927, LGTM! Ready for QA!
|
/approve |
* bug fix * pnpm-lock.yaml
Resolves #17067
Summary by CodeRabbit
Chores
Refactor