-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Apollo search contacts bug fix #16443
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
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
@SokolovskyiK is attempting to deploy a commit to the Pipedreamers Team on Vercel. A member of the Team first needs to authorize it. |
Warning Rate limit exceeded@SokolovskyiK has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 30 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughThe changes update several Apollo IO integration components. The API key is now sent via the "X-Api-Key" HTTP header instead of as a query parameter. In the contact and sequence search actions, the method for fetching paginated data is updated from Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Action (search-contacts/search-sequences)
participant ApolloIOApp
User->>Action: Invoke search action
Action->>ApolloIOApp: getIterations(params)
ApolloIOApp-->>Action: Iterable results
Action->>Action: utils.iterate(iterable)
Action-->>User: Return aggregated results
sequenceDiagram
participant Action
participant ApolloIOApp
participant Apollo API
Action->>ApolloIOApp: getHeaders()
ApolloIOApp->>Apollo API: Send request with X-Api-Key header
Apollo API-->>ApolloIOApp: Response
ApolloIOApp-->>Action: Return data
Assessment against linked issues
Suggested labels
Poem
✨ 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:
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 (
|
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/apollo_io/actions/search-sequences/search-sequences.mjs (1)
9-9
: Consider updating the version number.The version should be incremented to "0.0.5" or "0.0.6" to maintain consistency with other Apollo IO components that were updated in this PR.
- version: "0.0.4", + version: "0.0.6",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
components/apollo_io/actions/search-contacts/search-contacts.mjs
(3 hunks)components/apollo_io/actions/search-sequences/search-sequences.mjs
(2 hunks)components/apollo_io/actions/update-contact-stage/update-contact-stage.mjs
(1 hunks)components/apollo_io/apollo_io.app.mjs
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Verify TypeScript components
- GitHub Check: pnpm publish
- GitHub Check: Publish TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (5)
components/apollo_io/apollo_io.app.mjs (1)
219-219
: Authentication method improvement.The change correctly implements Apollo API's updated authentication requirements by moving the API key from query parameters to the "X-Api-Key" header. This is a more secure practice for API key authentication and aligns with modern API standards.
components/apollo_io/actions/update-contact-stage/update-contact-stage.mjs (1)
8-8
: Version increment is appropriate.The version bump from "0.0.5" to "0.0.6" properly reflects the changes in the underlying API authentication method, maintaining consistency with other updated Apollo IO components.
components/apollo_io/actions/search-sequences/search-sequences.mjs (1)
19-19
: Fixed function references for proper data retrieval.The changes correctly replace:
getResourcesStream
with the properly definedgetIterations
methodutils.streamIterator
with the existingutils.iterate
functionThese replacements fix the undefined function issues while maintaining the same pagination and data retrieval functionality.
Also applies to: 29-29
components/apollo_io/actions/search-contacts/search-contacts.mjs (2)
9-9
: Version increment is appropriate.The version bump from "0.0.4" to "0.0.6" properly reflects the changes in the authentication method and function references.
46-46
: Fixed function references for proper data retrieval.The changes correctly replace:
getResourcesStream
with the properly definedgetIterations
methodutils.streamIterator
with the existingutils.iterate
functionThese replacements fix the undefined function issues while maintaining the same pagination and data retrieval functionality.
Also applies to: 59-59
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: 1
🧹 Nitpick comments (1)
components/apollo_io/actions/search-contacts/search-contacts.mjs (1)
4-66
: Consider adding type annotation for better documentation.For better code documentation and developer experience, consider adding JSDoc comments to describe the expected input and output types of the function. This was mentioned in the component guidelines checklist shared by the Pipedream team.
export default { key: "apollo_io-search-contacts", name: "Search For Contacts", description: "Search for contacts in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#search-for-contacts)", type: "action", version: "0.0.6", + /** + * @param {Object} $ - The event object + * @returns {Array<Object>} An array of contacts matching the search criteria + */ props: {🧰 Tools
🪛 GitHub Check: Lint Code Base
[failure] 9-9:
Trailing spaces not allowed🪛 GitHub Actions: Pull Request Checks
[error] 9-9: ESLint: Trailing spaces not allowed (no-trailing-spaces)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (18)
components/apollo_io/actions/add-contacts-to-sequence/add-contacts-to-sequence.mjs
(1 hunks)components/apollo_io/actions/create-account/create-account.mjs
(1 hunks)components/apollo_io/actions/create-contact/create-contact.mjs
(1 hunks)components/apollo_io/actions/create-opportunity/create-opportunity.mjs
(1 hunks)components/apollo_io/actions/create-update-contact/create-update-contact.mjs
(1 hunks)components/apollo_io/actions/get-opportunity/get-opportunity.mjs
(1 hunks)components/apollo_io/actions/people-enrichment/people-enrichment.mjs
(1 hunks)components/apollo_io/actions/search-accounts/search-accounts.mjs
(1 hunks)components/apollo_io/actions/search-contacts/search-contacts.mjs
(3 hunks)components/apollo_io/actions/update-account-stage/update-account-stage.mjs
(1 hunks)components/apollo_io/actions/update-account/update-account.mjs
(1 hunks)components/apollo_io/actions/update-contact/update-contact.mjs
(1 hunks)components/apollo_io/actions/update-opportunity/update-opportunity.mjs
(1 hunks)components/apollo_io/package.json
(1 hunks)components/apollo_io/sources/account-created/account-created.mjs
(1 hunks)components/apollo_io/sources/account-updated/account-updated.mjs
(1 hunks)components/apollo_io/sources/contact-created/contact-created.mjs
(1 hunks)components/apollo_io/sources/contact-updated/contact-updated.mjs
(1 hunks)
✅ Files skipped from review due to trivial changes (17)
- components/apollo_io/package.json
- components/apollo_io/actions/create-opportunity/create-opportunity.mjs
- components/apollo_io/actions/create-update-contact/create-update-contact.mjs
- components/apollo_io/sources/account-updated/account-updated.mjs
- components/apollo_io/sources/contact-updated/contact-updated.mjs
- components/apollo_io/actions/create-contact/create-contact.mjs
- components/apollo_io/actions/update-contact/update-contact.mjs
- components/apollo_io/actions/update-account-stage/update-account-stage.mjs
- components/apollo_io/actions/update-account/update-account.mjs
- components/apollo_io/actions/update-opportunity/update-opportunity.mjs
- components/apollo_io/actions/get-opportunity/get-opportunity.mjs
- components/apollo_io/actions/people-enrichment/people-enrichment.mjs
- components/apollo_io/sources/account-created/account-created.mjs
- components/apollo_io/actions/search-accounts/search-accounts.mjs
- components/apollo_io/sources/contact-created/contact-created.mjs
- components/apollo_io/actions/create-account/create-account.mjs
- components/apollo_io/actions/add-contacts-to-sequence/add-contacts-to-sequence.mjs
🧰 Additional context used
🪛 GitHub Check: Lint Code Base
components/apollo_io/actions/search-contacts/search-contacts.mjs
[failure] 9-9:
Trailing spaces not allowed
🪛 GitHub Actions: Pull Request Checks
components/apollo_io/actions/search-contacts/search-contacts.mjs
[error] 9-9: ESLint: Trailing spaces not allowed (no-trailing-spaces)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: pnpm publish
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
🔇 Additional comments (2)
components/apollo_io/actions/search-contacts/search-contacts.mjs (2)
46-47
: Method change looks good.The change from
getResourcesStream
togetIterations
appropriately addresses the bug mentioned in the PR description. This ensures the code is using a defined function that exists elsewhere in the codebase for similar purposes.
59-59
: Function change looks good.Replacing
utils.streamIterator
withutils.iterate
is appropriate and matches the PR description. This ensures the code is using a function that actually exists in the utility module.
components/apollo_io/actions/search-contacts/search-contacts.mjs
Outdated
Show resolved
Hide resolved
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! Ready for QA
Fixes #16421
While testing the Apollo integration, I noticed a few things that needed fixing:
getResourcesStream wasn’t defined, but elsewhere in the code getIterations was being used
for the same purpose — so I switched to that
There was a small mismatch — utils.streamIterator didn’t exist, but utils.iterate does, so I fixed that
Apollo’s API expected the key in the X-Api-Key header instead of the query params, so I updated the headers accordingly.
Should be fine — but just in case something explodes, you’ve been gently warned 😅
Tested everything using a free Apollo.io account. Auth works, pagination works, and the action runs successfully (even if it returns 0 contacts for now).
Forgive me in advance if I missed something — happy to adjust anything if needed! 🙂
Summary by CodeRabbit
New Features
Bug Fixes
Chores