Skip to content

Conversation

@luancazarine
Copy link
Collaborator

@luancazarine luancazarine commented Nov 25, 2025

Resolves #19123

Summary by CodeRabbit

  • Chores
    • Updated multiple component versions for improved stability and compatibility.
    • Upgraded platform dependencies across components to the latest versions.
    • Performed internal maintenance on deployment workflows to enhance reliability.

✏️ Tip: You can customize this high-level summary in your review settings.

… dependencies and fixing source hooks. Bump new-contact, new-contact-property-change, new-email-campaign, and new-social-media-message sources to version 0.0.4, ensuring consistency and improved functionality.
@vercel
Copy link

vercel bot commented Nov 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Nov 25, 2025 4:41pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Nov 25, 2025 4:41pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

Walkthrough

This PR migrates Vbout and Visitor Queue components from the activate hook to the deploy hook to prevent test/retroactive events from firing during source activation. It includes package version bumps, dependency updates to @pipedream/platform, and source metadata version increments across multiple components.

Changes

Cohort / File(s) Summary
Package version and dependency updates
components/vbout/package.json, components/visitor_queue/package.json
Version bumped from 0.0.3/0.0.4 to 0.1.0 respectively; @pipedream/platform dependency updated from ^1.6.8 to ^3.1.1
Hook migration from activate to deploy
components/vbout/sources/common/base.mjs, components/visitor_queue/sources/new-lead/new-lead.mjs
Lifecycle hook renamed from activate to deploy; import of DEFAULT_POLLING_SOURCE_TIMER_INTERVAL consolidated at the top; deployment-time logic for fetching items and emitting events preserved
Vbout source version updates
components/vbout/sources/new-contact-property-change/new-contact-property-change.mjs, components/vbout/sources/new-contact/new-contact.mjs, components/vbout/sources/new-email-campaign/new-email-campaign.mjs, components/vbout/sources/new-social-media-message/new-social-media-message.mjs
Source metadata version incremented from 0.0.3 to 0.0.4

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Platform
    participant Source
    
    rect rgb(200, 240, 255)
    Note over Platform,Source: Old Behavior (activate hook)
    User->>Platform: Deploy source
    Platform->>Source: Call activate hook
    Source->>Source: Fetch items & emit<br/>(test/retroactive events)
    end
    
    rect rgb(200, 255, 220)
    Note over Platform,Source: New Behavior (deploy hook)
    User->>Platform: Deploy source
    Platform->>Source: Call deploy hook
    Source->>Source: Fetch items & emit<br/>(expected behavior)
    Platform->>Source: Start polling (run)
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Package version updates and dependency bumps are straightforward mechanical changes
  • Hook migrations follow a consistent pattern across two files; verify that the deploy hook properly replaces activate hook behavior and that test event emission is now prevented
  • Multiple version increments in source files are homogeneous and require minimal review per file
  • Key focus: Validate that deploy hook changes in components/vbout/sources/common/base.mjs and components/visitor_queue/sources/new-lead/new-lead.mjs correctly prevent test/retroactive events from firing and align with the deploy-hook pattern convention

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective of the PR: adding a flag to prevent test/retroactive events from firing on activate hooks.
Linked Issues check ✅ Passed The PR successfully addresses issue #19123 by renaming activate hooks to deploy hooks in base.mjs and new-lead.mjs, implementing the required pattern to prevent test/retroactive events from firing during activate.
Out of Scope Changes check ✅ Passed The PR includes version bumps in package.json files and source files, plus import reorganizations that are incidental to the main hook migration. These are reasonable maintenance updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 19123-add-a-flag-to-prevent-testretroactive-events-from-firing-on-activate-hook

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e26745a and 9404520.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (8)
  • components/vbout/package.json (2 hunks)
  • components/vbout/sources/common/base.mjs (2 hunks)
  • components/vbout/sources/new-contact-property-change/new-contact-property-change.mjs (1 hunks)
  • components/vbout/sources/new-contact/new-contact.mjs (1 hunks)
  • components/vbout/sources/new-email-campaign/new-email-campaign.mjs (1 hunks)
  • components/vbout/sources/new-social-media-message/new-social-media-message.mjs (1 hunks)
  • components/visitor_queue/package.json (2 hunks)
  • components/visitor_queue/sources/new-lead/new-lead.mjs (2 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In `components/the_magic_drip/sources/common.mjs`, when processing items in `getAndProcessData`, `savedIds` is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.
📚 Learning: 2024-12-12T19:23:09.039Z
Learnt from: jcortes
Repo: PipedreamHQ/pipedream PR: 14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like `fs` to `package.json` dependencies, as they are native modules provided by the Node.js runtime.

Applied to files:

  • components/vbout/package.json
📚 Learning: 2024-10-10T19:18:27.998Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In `components/the_magic_drip/sources/common.mjs`, when processing items in `getAndProcessData`, `savedIds` is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.

Applied to files:

  • components/visitor_queue/sources/new-lead/new-lead.mjs
⏰ 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)
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (11)
components/vbout/sources/new-email-campaign/new-email-campaign.mjs (1)

10-10: LGTM!

Version bump is appropriate for the hook migration changes in the base module.

components/vbout/sources/new-contact/new-contact.mjs (1)

9-9: LGTM!

Version bump is consistent with the base module hook migration.

components/vbout/sources/new-contact-property-change/new-contact-property-change.mjs (2)

1-2: LGTM!

Import reorganization and version bump are appropriate.


9-9: LGTM!

Version bump aligns with the package-level changes.

components/vbout/sources/new-social-media-message/new-social-media-message.mjs (1)

10-10: LGTM!

Version bump is consistent with the base module changes.

components/vbout/sources/common/base.mjs (2)

1-1: LGTM!

Moving the import to the top improves code organization.


49-71: LGTM! Hook migration correctly implements the PR objective.

The migration from activate to deploy hook is correct. The deploy hook is the appropriate place for emitting initial/test/retroactive events during source deployment, while activate should not emit such events when a source is simply turned on. This change aligns with the Pipedream convention mentioned in issue #19123.

components/visitor_queue/sources/new-lead/new-lead.mjs (2)

1-1: LGTM!

Adding the import at the top is appropriate.


9-9: LGTM!

Version bump is consistent with the deploy hook migration.

components/vbout/package.json (1)

16-16: Verify compatibility with @pipedream/platform v3.x.

The dependency is upgraded from ^1.6.8 to ^3.1.1, which is a major version jump. Ensure that all vbout sources are compatible with the breaking changes introduced in v3.x.

Run the following script to check for any potential compatibility issues:

Alternatively, search the web for the migration guide:

components/visitor_queue/package.json (1)

16-16: Verify compatibility with @pipedream/platform v3.x.

The dependency is upgraded from ^1.6.8 to ^3.1.1. Ensure that visitor_queue sources are compatible with breaking changes in the platform v3.x release.

Run the following script to check for potential compatibility issues:


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Collaborator

@jcortes jcortes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @luancazarine lgtm! Ready for QA!

@vunguyenhung
Copy link
Collaborator

@vunguyenhung
Copy link
Collaborator

Hi everyone, all test cases are passed! Ready for release!

Test reports

@luancazarine luancazarine merged commit 99b2a46 into master Nov 27, 2025
10 checks passed
@luancazarine luancazarine deleted the 19123-add-a-flag-to-prevent-testretroactive-events-from-firing-on-activate-hook branch November 27, 2025 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a Flag to Prevent Test/Retroactive Events from Firing on Activate Hook

4 participants