-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Gong "New Call" trigger update pagination #18979
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 GitHub. 2 Skipped Deployments
|
WalkthroughThis change addresses indefinite pagination in the Gong "New Call" trigger by introducing a deployment-time hook that limits initial event retrieval to 25 items, narrowing the data lookback window from three months to one day, and updating related dependencies. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Deploy as Deploy Hook
participant Run as Run Flow
participant API as Gong API
rect rgb(240, 248, 255)
Note over User,API: Initial Deployment
User->>Deploy: Trigger source deployment
Deploy->>API: Fetch resources (paginated)
API-->>Deploy: Return resources
Deploy->>Deploy: processResources(resources, max=25)
Deploy->>Deploy: Slice to 25 items max
Deploy-->>User: Emit 25 events
end
rect rgb(240, 248, 255)
Note over User,API: Subsequent Runs
User->>Run: Trigger on schedule
Run->>API: Fetch resources (filtered by oneDayAgo)
API-->>Run: Return recent resources
Run->>Run: processResources(resources)
Run-->>User: Emit new events
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
components/gong/package.json(2 hunks)components/gong/sources/common/polling.mjs(2 hunks)components/gong/sources/new-call/new-call.mjs(2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-01-23T03:55:15.166Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.
Applied to files:
components/gong/sources/new-call/new-call.mjs
🧬 Code graph analysis (1)
components/gong/sources/common/polling.mjs (1)
components/zep/actions/get-threads/get-threads.mjs (1)
max(39-39)
⏰ 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). (4)
- GitHub Check: pnpm publish
- GitHub Check: Lint Code Base
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
🔇 Additional comments (5)
components/gong/package.json (1)
3-3: LGTM: Version and dependency updates are appropriate.The version bump and platform dependency update align with the feature changes in this PR.
Also applies to: 16-16
components/gong/sources/common/polling.mjs (1)
42-58: LGTM: processResources correctly limits emission while maintaining timestamp tracking.The logic properly reverses resources to descending order, slices to the newest N events when max is provided, and updates lastCreatedAt to the newest emitted resource. This ensures subsequent runs fetch only newer events.
components/gong/sources/new-call/new-call.mjs (3)
7-7: LGTM: Description is clear and specific.The updated description explicitly states the trigger behavior and includes relevant API documentation.
9-9: LGTM: Version bump is appropriate.Patch version increment is correct for this bug fix.
20-24: Key fix: Lookback window reduced from 3 months to 1 day.This change directly addresses the indefinite pagination issue reported in #18965. By reducing the default lookback window from 3 months to 1 day, the initial deployment will fetch far fewer historical calls, preventing the emission of 1000+ events. Combined with the deploy hook's 25-event emission limit, this ensures a controlled initial deployment.
The 1-day window strikes a good balance between avoiding excessive historical data and capturing recent events.
Resolves #18965
Summary by CodeRabbit
Chores
Changes