Repository navigation
feat: identify and track for loops - #3976
Conversation
|
Thank you @danrowden for contributing this PR. |
Co-authored-by: Yashasvi Bajpai <[email protected]>
|
This PR is considered to be stale. It has been open for 20 days with no further activity thus it is going to be closed in 7 days. To avoid such a case please consider removing the stale label manually or add a comment to the PR. |
|
@manish339k Ready for another review |
|
This PR is considered to be stale. It has been open for 20 days with no further activity thus it is going to be closed in 7 days. To avoid such a case please consider removing the stale label manually or add a comment to the PR. |
|
@danrowden Please let me know once the above comments have been addressed. |
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the WalkthroughThis pull request introduces two new files. A YAML configuration file is added to define a workflow for processing messages based on type (IDENTIFY or TRACK), incorporating bindings, validations, and payload preparations. Additionally, a test data file is included that exports a constant containing various scenarios for event processing, along with expected inputs and outputs for both successful events and error cases. Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client
participant Processor as WorkflowProcessor
participant Server as Destination Server
Client->>Processor: Send message (IDENTIFY/TRACK)
Processor->>Processor: Validate message type & required fields
Processor->>Processor: Prepare payload using bindings & defaults
Processor->>Server: Dispatch request with constructed payload
Server-->>Processor: Return response
Processor-->>Client: Deliver response
Poem
🪧 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
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/cdk/v2/destinations/loops/procWorkflow.yaml (1)
16-22: Input Validation Step – Clean Up Trailing Spaces
ThevalidateInputstep appropriately asserts the existence of.message.typeand validates it against the supported event types.
- Note: Static analysis flagged trailing spaces on line 19. Please remove any extraneous whitespace to adhere to YAML style guidelines.
- The API key validation via
$.assertConfigis correctly in place.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 19-19: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/cdk/v2/destinations/loops/procWorkflow.yaml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
src/cdk/v2/destinations/loops/procWorkflow.yaml
[error] 19-19: trailing spaces
(trailing-spaces)
🔇 Additional comments (7)
src/cdk/v2/destinations/loops/procWorkflow.yaml (7)
1-10: Bindings Configuration – Verify Relative Paths
The bindings section is clear and well structured. It correctly registers the required bindings such asEventType,removeUndefinedAndNullValues, anddefaultRequestConfig. Please double-check that the relative paths (e.g.,"../../../../constants"and"../../bindings/jsontemplate") accurately reflect your repository’s directory structure.
11-15: Message Type Normalization Step
ThemessageTypestep converts the message type to lowercase, ensuring uniformity for subsequent validations. This is a good approach for case-insensitive comparisons later in the workflow.
30-37: Validate Track Event – Correct Field Assertions
ThevalidateTrackEventstep properly ensures that eitheruserIdis provided, and it also asserts the presence of an event name. This aligns with the payload requirements for tracking events.
38-42: Prepare Context Step – Initializing Processing Context
This step effectively sets the normalized message type and initializes an empty payload container. The logic is straightforward and supports subsequent payload construction.
43-52: Identify Payload Construction – Consistency and Data Integration
TheidentifyPayloadstep sets the endpoint to update contacts and builds the payload by merging context traits with user-specific fields (userIdand
- Observation: While merging all traits is acceptable (given that the Loops API accepts additional fields), ensure that the validation in the previous step (i.e., validateIdentifyEvent) aligns with the requirements because the payload later expects an email value.
53-64: Track Payload Construction – Comprehensive Payload Assembly
ThetrackPayloadstep sets the proper endpoint for event sending and constructs a payload that includes user identification, event details, and additional event properties by merging available traits.
- The approach is consistent with the API expectations and similar workflows.
65-75: Build Response Step – Structuring the Final Request
ThebuildResponsestep leverages thedefaultRequestConfigto construct the final response, sets the response body with the prepared payload, assigns the endpoint, and adds the appropriate headers (including authorization).
- Suggestion: Optionally verify that this response structure aligns with other similar destination workflows to maintain consistency across the codebase.
|
@manish339k Ready for another view |
|
@danrowden Could you please raise doc PR? |
* feat: identify and track for loops * feat: test for mailing lists * Update src/cdk/v2/destinations/loops/procWorkflow.yaml Co-authored-by: Yashasvi Bajpai <[email protected]> * fix: added response step; updated tests * fix: better way to get email and userId * feat: some changes * feat: use type --------- Co-authored-by: Yashasvi Bajpai <[email protected]>
* feat: identify and track for loops * feat: test for mailing lists * Update src/cdk/v2/destinations/loops/procWorkflow.yaml Co-authored-by: Yashasvi Bajpai <[email protected]> * fix: added response step; updated tests * fix: better way to get email and userId * feat: some changes * feat: use type --------- Co-authored-by: Yashasvi Bajpai <[email protected]>
* feat: identify and track for loops (#3976) * feat: identify and track for loops * feat: test for mailing lists * Update src/cdk/v2/destinations/loops/procWorkflow.yaml Co-authored-by: Yashasvi Bajpai <[email protected]> * fix: added response step; updated tests * fix: better way to get email and userId * feat: some changes * feat: use type --------- Co-authored-by: Yashasvi Bajpai <[email protected]> * fix: minor issues * chore: added test * feat: identify and track for loops (#3976) * feat: identify and track for loops * feat: test for mailing lists * Update src/cdk/v2/destinations/loops/procWorkflow.yaml Co-authored-by: Yashasvi Bajpai <[email protected]> * fix: added response step; updated tests * fix: better way to get email and userId * feat: some changes * feat: use type --------- Co-authored-by: Yashasvi Bajpai <[email protected]> * fix: minor issues * chore: added test * chore: update test to new structure * chore: minor change * chore: minor change --------- Co-authored-by: Dan <[email protected]> Co-authored-by: Yashasvi Bajpai <[email protected]>
* chore(docs): update README on how to configure secrets in tests (#4242) * chore: remove conplexity issue and redundant comments (#4250) * chore: remove conplexity issue and redundant comments * chore: address comment * chore(deps): bump rudderlabs/build-scan-push-action from 1.5.2 to 1.5.3 (#4236) chore(deps): bump build scan push action to 1.5.3 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(pyroscope): use forked pyroscope middleware with latest updates * chore(pyroscope): use forked pyroscope middleware with latest updates * chore(pyroscope): use rudderstack scoped pyroscope nodejs * chore(pyroscope): scope and version change * chore: run ingestion svc test after artefacts build (#4196) * chore: run ingestion svc test after artefacts build * fix: test * fix: test * fix: test * chore: test * chore: test * chore: use go version file * chore: use transformer image * chore: misc * chore: review comment * chore: misc * chore: pass secrets * chore: fix workflow * chore: add docker login * chore: pull image * chore: misc * chore: misc * chore: misc * chore: cleanup * chore: remmove env * chore: remove branch * chore: bump actions/setup-node from 4.0.4 to 4.4.0 (#4262) chore(deps): bump actions/setup-node from 4.0.4 to 4.4.0 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.0.4 to 4.4.0. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@v4.0.4...v4.4.0) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: 4.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump codecov/codecov-action from 5.4.0 to 5.4.2 (#4264) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.4.0 to 5.4.2. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](codecov/codecov-action@v5.4.0...v5.4.2) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-version: 5.4.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: convert necessary fields to string for pinterest (#4272) * feat: onboarding new destination loops (#3976) (#4235) * feat: identify and track for loops (#3976) * feat: identify and track for loops * feat: test for mailing lists * Update src/cdk/v2/destinations/loops/procWorkflow.yaml Co-authored-by: Yashasvi Bajpai <[email protected]> * fix: added response step; updated tests * fix: better way to get email and userId * feat: some changes * feat: use type --------- Co-authored-by: Yashasvi Bajpai <[email protected]> * fix: minor issues * chore: added test * feat: identify and track for loops (#3976) * feat: identify and track for loops * feat: test for mailing lists * Update src/cdk/v2/destinations/loops/procWorkflow.yaml Co-authored-by: Yashasvi Bajpai <[email protected]> * fix: added response step; updated tests * fix: better way to get email and userId * feat: some changes * feat: use type --------- Co-authored-by: Yashasvi Bajpai <[email protected]> * fix: minor issues * chore: added test * chore: update test to new structure * chore: minor change * chore: minor change --------- Co-authored-by: Dan <[email protected]> Co-authored-by: Yashasvi Bajpai <[email protected]> * feat: onboarding snapchat v3 (#4052) * feat: snapchat v3 * chore: added mappings for v3 * chore: small fix * chore: updated files * feat: onboarding snapchat capi v3 * feat: refactoring and some changes * chore: minor changes * chore: added tests and minor refactoring * fix: minor change * chore: minor changes --------- Co-authored-by: Manish Kumar <[email protected]> Co-authored-by: Manish Kumar <[email protected]> * fix(dynamicConfigParser): fix cloning issue in getdynamicconfig method (#4278) fix(dynamic config): fix cloning issue in getdynamicconfig method Resolves INT-3571 - Fix bug where original event was being modified instead of cloned event - Add comprehensive tests to verify the fix works correctly - Implement table-driven tests for better maintainability * feat(mixpanel): add support for partial batch failure handling (#4260) * feat(mixpanel): add support for partial batch failure handling * chore: misc * fix: handler * fix: handler * fix: review comments * fix: review comments * chore: review comments * chore: review comments * chore: review comments * chore: review comments * chore: review comments * chore: remove unused code * chore: table test case * chore: table test case * fix: test * chore: improve test * chore: upgrade salesforce api version from v50.0 to v63.0 (#4116) Co-authored-by: Manish Kumar <[email protected]> Co-authored-by: Manish Kumar <[email protected]> * chore: return error when gzip compression fails (#4283) chore: return error when gzip compression fails for mp * chore: revert "chore: upgrade salesforce api version from v50.0 to v63.0" (#4285) Revert "chore: upgrade salesforce api version from v50.0 to v63.0 (#4116)" This reverts commit c600f53. * chore: improving code coverage of snapchat conversion (#4284) * chore: improving code coverage of snapchat conversion * chore: minor change * fix: timestamp duration in v2 api * chore(release): 1.98.0 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Dilip Kola <[email protected]> Co-authored-by: Yashasvi Bajpai <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Vinay Teki <[email protected]> Co-authored-by: Mahesh Kutty <[email protected]> Co-authored-by: Manish Kumar <[email protected]> Co-authored-by: Dan <[email protected]> Co-authored-by: Aanshi Lahoti <[email protected]> Co-authored-by: Manish Kumar <[email protected]> Co-authored-by: GitHub Actions <[email protected]>
What are the changes introduced in this PR?
Added Identify and Track events for new Loops destination.
Current status: This is a first go at implementing a new destination, so it's considered WIP until checked by someone more familiar with Rudderstack.
What is the related Linear task?
None
Please explain the objectives of your changes below
New destination for Loops that lets users sync contacts into Loops and sent events to Loops (to trigger email sending).
Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
N/A
Any new dependencies introduced with this change?
N/A
Any new generic utility introduced or modified. Please explain the changes.
N/A
Any technical or performance related pointers to consider with the change?
N/A
@coderabbitai review
Developer checklist
My code follows the style guidelines of this project
No breaking changes are being introduced.
All related docs linked with the PR?
All changes manually tested?
Any documentation changes needed with this change?
Is the PR limited to 10 file changes?
Is the PR limited to one linear task?
Are relevant unit and component test-cases added in new readability format?
Reviewer checklist
Is the type of change in the PR title appropriate as per the changes?
Verified that there are no credentials or confidential data exposed with the changes.
Summary by CodeRabbit
New Features
Tests