Skip to content

feat: snapchat v3 - #4052

Merged
manish339k merged 14 commits into
developfrom
feat.snapchat_v3
Apr 25, 2025
Merged

manish339k merged 14 commits into
developfrom
feat.snapchat_v3

Conversation

@aanshi07

@aanshi07 aanshi07 commented Feb 6, 2025 •

Copy link
Copy Markdown
Contributor

What are the changes introduced in this PR?

Added version 3 for snapchat
ref: https://developers.snap.com/api/marketing-api/Conversions-API/UsingTheAPI

What is the related Linear task?

Resolves INT-2703

Please explain the objectives of your changes below

Put down any required details on the broader aspect of your changes. If there are any dependent changes, mandatorily mention them here

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.

@aanshi07 aanshi07 self-assigned this Feb 6, 2025
@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

@codecov

codecov Bot commented Feb 6, 2025 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 99.58159% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.26%. Comparing base (79cebfc) to head (eb3a2ee).
Report is 13 commits behind head on develop.

Files with missing lines Patch % Lines
src/v0/destinations/snapchat_conversion/util.js 97.87% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4052      +/-   ##
===========================================
+ Coverage    91.21%   91.26%   +0.05%     
===========================================
  Files          632      634       +2     
  Lines        33053    33243     +190     
  Branches      7827     7867      +40     
===========================================
+ Hits         30150    30340     +190     
  Misses        2658     2658              
  Partials       245      245              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

1 similar comment
@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
52.2% Coverage on New Code (required ≥ 80%)
25.3% Duplication on New Code (required ≤ 15%)
2 New Code Smells (required ≤ 1)
2 New Major Issues (required ≤ 1)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

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.

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

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.

@coderabbitai

coderabbitai Bot commented Apr 1, 2025 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added support for Snapchat Conversion API v3, enabling integration with the latest Snapchat event tracking features.
    • Enhanced event mapping and user data handling for improved accuracy and compatibility with Snapchat's updated requirements.
    • Introduced batch processing and extended device/app information for more robust event submissions.
  • Bug Fixes

    • Improved timestamp validation and error handling for event data.
  • Refactor

    • Streamlined code structure for easier maintenance and future updates.

Summary by CodeRabbit

  • New Features
    • Added support for Snapchat Conversion API version 3, enabling enhanced event processing and payload construction for new API requirements.
    • Improved user data handling with additional fields and validation for better event attribution.
    • Introduced batching for web, offline, and mobile events to optimize request efficiency.
  • Bug Fixes
    • Enhanced timestamp validation to ensure events are within the required time window.
  • Refactor
    • Streamlined event mapping, conversion type detection, and configuration validation for improved reliability and maintainability.

Walkthrough

The changes introduce support for Snapchat Conversion API version 3 alongside the existing version 2 integration. The configuration is refactored to handle multiple API versions, and new configuration objects and mappings are added for v3. The transformation logic is updated to delegate processing to version-specific modules based on the configured API version. Utility functions for event mapping, conversion type determination, event configuration validation, and timestamp handling are refactored and enhanced. New modules implement the v3 transformation and batching logic, including detailed user data handling and payload construction. The codebase is reorganized for better modularity and maintainability.

Changes

File(s) Change Summary
src/v0/destinations/snapchat_conversion/config.js Refactored to support multiple API versions. The endpoint is now an object with v2 and v3 URLs. Introduced API_VERSION, ConfigCategoryV3, and mappingConfigV3 for v3 event mappings. Exports updated accordingly.
src/v0/destinations/snapchat_conversion/transform.js Refactored event processing: imports utility functions for event mapping and validation, removes local implementations, and delegates processing to v3 module if the destination config specifies API version v3. Timestamp handling is centralized via a new utility. Endpoint usage updated for v2.
src/v0/destinations/snapchat_conversion/transformV3.js New module implementing event transformation and request building for Snapchat Conversion API v3. Handles user data hashing, payload construction, event mapping, deduplication, and batch processing. Exports processV3 and processRouterDest for v3 integration.
src/v0/destinations/snapchat_conversion/util.js Enhanced with new utility functions: eventMappingHandler, getEventConversionType, validateEventConfiguration, and getEventTimestamp. Updates batching function to use the new endpoint structure. Reorders exports for clarity.
src/v0/destinations/snapchat_conversion/utilsV3.js New utility module for v3: provides batchResponseBuilder for batching events and getExtInfo for extracting extended device/app/environment info from messages.

Sequence Diagram(s)

sequenceDiagram
    participant Source as Source Event
    participant Transform as transform.js
    participant Util as util.js
    participant TransformV3 as transformV3.js
    participant UtilsV3 as utilsV3.js
    participant Config as config.js

    Source->>Transform: process(event)
    Transform->>Config: Check API_VERSION
    alt API v2
        Transform->>Util: eventMappingHandler, getEventConversionType, etc.
        Util-->>Transform: Mapped event, conversion type, timestamp, etc.
        Transform->>Config: Use ENDPOINT.Endpoint_v2
        Transform-->>Source: v2 HTTP request
    else API v3
        Transform->>TransformV3: processV3(event)
        TransformV3->>Config: Use ENDPOINT.Endpoint_v3, mappingConfigV3
        TransformV3->>UtilsV3: getExtInfo (for device/app info)
        TransformV3-->>Transform: v3 HTTP request
        Transform-->>Source: v3 HTTP request
    end
Loading

Suggested reviewers

  • sivashanmukh
  • vinayteki95

Suggestions for improvement:

  • Consider adding comprehensive unit and integration tests for the new v3 transformation and batching logic to ensure coverage and robustness.
  • Document the differences in event payload structure and required fields between API versions v2 and v3 for maintainers and integrators.
  • Review error handling and logging, especially in batch processing scenarios, to improve traceability and debugging.
  • Explore opportunities to unify shared logic between v2 and v3 processing paths to reduce code duplication and ease future maintenance.

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1a5b802 and eb3a2ee.

📒 Files selected for processing (1)
  • src/v0/destinations/snapchat_conversion/transformV3.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/v0/destinations/snapchat_conversion/transformV3.js
⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image ARM64
  • GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image AMD64
  • GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image AMD64
  • GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image ARM64
  • GitHub Check: Code Coverage
  • GitHub Check: test_and_publish
  • GitHub Check: UT Tests
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (go)
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@manish339k manish339k removed the Stale label Apr 14, 2025
@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

Allure Test reports for this run are available at:

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

Allure Test reports for this run are available at:

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

Allure Test reports for this run are available at:

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

Allure Test reports for this run are available at:

@manish339k
manish339k marked this pull request as ready for review April 20, 2025 15:41
@manish339k
manish339k requested review from a team and sivashanmukh as code owners April 20, 2025 15:41
@manish339k
manish339k requested review from a team, utsabc and yashasvibajpai April 20, 2025 15:41

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🔭 Outside diff range comments (1)
src/v0/destinations/snapchat_conversion/util.js (1)

23-27: ⚠️ Potential issue

msUnixTimestamp returns wrong value (×1000 instead of ÷1000)

Date#getTime() already yields milliseconds, but the helper multiplies that value by 1000 and then trims digits, effectively converting back to seconds via string slicing – a fragile and confusing approach that can generate wrong timestamps for some dates.

-function msUnixTimestamp(timestamp) {
-  const time = new Date(timestamp);
-  return time.getTime() * 1000 + time.getMilliseconds();
-}
+function msUnixTimestamp(timestamp) {
+  const time = new Date(timestamp);
+  // Convert ms → s and round down
+  return Math.floor(time.getTime() / 1000);
+}

This removes the string hack, is O(1) faster, and obeys the Snapchat API spec of seconds since epoch.

🧹 Nitpick comments (6)
src/v0/destinations/snapchat_conversion/config.js (2)

3-6: Consider harmonising endpoint constant names

Endpoint_v2 / Endpoint_v3 mix PascalCase and snake_case. Sticking to a single naming convention (e.g. all‐caps snake ENDPOINT_V2) keeps the public surface predictable and lets static‑analysis tools spot typos more easily.


41-66: Large duplication between ConfigCategory and ConfigCategoryV3

ConfigCategoryV3 repeats every entry of ConfigCategory with only the V3 suffix changed. A programmatic derivation avoids drift and cuts maintenance in half:

-const ConfigCategoryV3 = {
-  DEFAULT: { name: 'SnapchatTrackDefaultConfigV3' },
-  …
-};
+const appendV3 = (obj) =>
+  Object.fromEntries(
+    Object.entries(obj).map(([k, v]) => [k, { name: `${v.name}V3` }]),
+  );
+const ConfigCategoryV3 = appendV3(ConfigCategory);
src/v0/destinations/snapchat_conversion/transformV3.js (1)

154-160: Missing content_ids / value for other product events

product_viewed and product_added also benefit from content_ids and value, yet they are omitted from isProductEvent. Expanding the set avoids incomplete attribution metrics.

src/v0/destinations/snapchat_conversion/transform.js (2)

40-49: Clarify endpoint selection to avoid accidental v3 routing through v2 URL

buildResponse is hard‑coded to ENDPOINT.Endpoint_v2. That’s fine while the caller is only the v2 branch, but it becomes brittle if future refactors reuse this utility for v3 (or any other version). A small, low‑risk tweak would make the helper future‑proof:

-function buildResponse(apiKey, payload) {
+function buildResponse(apiKey, payload, endpoint = ENDPOINT.Endpoint_v2) {
   const response = defaultRequestConfig();
-  response.endpoint = ENDPOINT.Endpoint_v2;
+  response.endpoint = endpoint;
   ...
 }

Then pass endpoint explicitly from the v2 path.
This prevents silent mis‑routing should a v3 code path ever (re)use the helper.


263-269: Consider fast‑exit to reduce cyclomatic complexity

The early if (destination.Config?.apiVersion === API_VERSION.v3) branch is correct, but the v2 logic continues to run a few inexpensive lines (e.g. if (!message.type) …) before the branch. Moving the version check to the top of process lets v3 traffic bail out immediately and removes two indentation levels from the bulk of the function:

const process = (event) => {
+  if (event.destination?.Config?.apiVersion === API_VERSION.v3) {
+    return processV3(event);
+  }
   const { message, destination } = event;
-  if (destination.Config?.apiVersion === API_VERSION.v3) {
-    return processV3(event);
-  }

No functional change, just improved readability and a touch less cognitive load.

src/v0/destinations/snapchat_conversion/util.js (1)

145-160: eventMappingHandler does a linear scan for each call – consider pre‑compiling

If a workspace has large mapping tables, repeatedly iterating the array for every event can add noticeable latency. You can pre‑index the rudderEventsToSnapEvents config once:

const buildEventMap = (mappings) =>
  mappings.reduce((acc, { from, to }) => {
    acc[from.trim().replace(/\s+/g, '_').toLowerCase()] = to;
    return acc;
  }, {});

Cache the map per destination (e.g., inside destination.Context) and lookups become O(1). This is a nice‑to‑have optimisation, but worth considering for high‑throughput pipelines.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cbfa641 and b726882.

⛔ Files ignored due to path filters (17)
  • src/v0/destinations/snapchat_conversion/data/CheckoutStartedConfigV3.json is excluded by !**/*.json
  • src/v0/destinations/snapchat_conversion/data/OrderCompletedConfigV3.json is excluded by !**/*.json
  • src/v0/destinations/snapchat_conversion/data/PaymentInfoEnteredConfigV3.json is excluded by !**/*.json
  • src/v0/destinations/snapchat_conversion/data/ProductAddedConfigV3.json is excluded by !**/*.json
  • src/v0/destinations/snapchat_conversion/data/ProductAddedToWishlistConfigV3.json is excluded by !**/*.json
  • src/v0/destinations/snapchat_conversion/data/ProductListViewedConfigV3.json is excluded by !**/*.json
  • src/v0/destinations/snapchat_conversion/data/ProductViewedConfigV3.json is excluded by !**/*.json
  • src/v0/destinations/snapchat_conversion/data/ProductsSearchedConfigV3.json is excluded by !**/*.json
  • src/v0/destinations/snapchat_conversion/data/PromotionClickedConfigV3.json is excluded by !**/*.json
  • src/v0/destinations/snapchat_conversion/data/PromotionViewedConfigV3.json is excluded by !**/*.json
  • src/v0/destinations/snapchat_conversion/data/SignupConfigV3.json is excluded by !**/*.json
  • src/v0/destinations/snapchat_conversion/data/SnapchatTrackDefaultConfigV3.json is excluded by !**/*.json
  • src/v0/destinations/snapchat_conversion/data/TrackEventCommonConfigV3.json is excluded by !**/*.json
  • test/integrations/destinations/snapchat_conversion/processor/data.ts is excluded by !**/test/**
  • test/integrations/destinations/snapchat_conversion/processor/dataV3.ts is excluded by !**/test/**
  • test/integrations/destinations/snapchat_conversion/router/data.ts is excluded by !**/test/**
  • test/integrations/destinations/snapchat_conversion/router/dataV3.ts is excluded by !**/test/**
📒 Files selected for processing (5)
  • src/v0/destinations/snapchat_conversion/config.js (3 hunks)
  • src/v0/destinations/snapchat_conversion/transform.js (5 hunks)
  • src/v0/destinations/snapchat_conversion/transformV3.js (1 hunks)
  • src/v0/destinations/snapchat_conversion/util.js (3 hunks)
  • src/v0/destinations/snapchat_conversion/utilsV3.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.js`: Focus on ESLint errors (max 3) and warnings (max 5).

**/*.js: Focus on ESLint errors (max 3) and warnings (max 5).

  • src/v0/destinations/snapchat_conversion/transformV3.js
  • src/v0/destinations/snapchat_conversion/utilsV3.js
  • src/v0/destinations/snapchat_conversion/transform.js
  • src/v0/destinations/snapchat_conversion/config.js
  • src/v0/destinations/snapchat_conversion/util.js
🧬 Code Graph Analysis (3)
src/v0/destinations/snapchat_conversion/utilsV3.js (5)
src/v0/destinations/snapchat_conversion/util.js (8)
  • require (3-3)
  • require (7-12)
  • require (13-13)
  • require (14-14)
  • moment (4-4)
  • destination (111-111)
  • destination (142-142)
  • get (1-1)
src/v0/destinations/snapchat_conversion/transform.js (6)
  • require (2-2)
  • require (3-3)
  • require (5-15)
  • require (16-24)
  • require (25-36)
  • get (1-1)
src/v0/destinations/snapchat_conversion/transformV3.js (11)
  • require (2-2)
  • require (3-3)
  • require (5-13)
  • require (14-20)
  • require (21-31)
  • require (32-32)
  • require (33-33)
  • webOrOfflineEventsChunk (269-269)
  • mobileEventsChunk (270-270)
  • get (1-1)
  • extInfo (115-115)
src/v0/util/index.js (1)
  • batch (2072-2072)
src/v0/destinations/snapchat_conversion/config.js (1)
  • MAX_BATCH_SIZE (7-7)
src/v0/destinations/snapchat_conversion/config.js (1)
src/v0/util/index.js (1)
  • getMappingConfig (538-548)
src/v0/destinations/snapchat_conversion/util.js (4)
src/v0/destinations/snapchat_conversion/transform.js (8)
  • require (2-2)
  • require (3-3)
  • require (5-15)
  • event (157-157)
  • event (264-264)
  • get (1-1)
  • mappedEvents (278-278)
  • eventConversionType (158-158)
src/v0/destinations/snapchat_conversion/transformV3.js (11)
  • require (2-2)
  • require (3-3)
  • require (5-13)
  • require (14-20)
  • require (21-31)
  • require (32-32)
  • require (33-33)
  • event (195-195)
  • event (250-250)
  • get (1-1)
  • mappedEvents (236-236)
src/v0/destinations/snapchat_conversion/config.js (1)
  • ENDPOINT (3-6)
src/v0/util/index.js (1)
  • getFieldValueFromMessage (685-691)
⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image ARM64
  • GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image AMD64
  • GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image ARM64
  • GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image AMD64
  • GitHub Check: Code Coverage
  • GitHub Check: test_and_publish
  • GitHub Check: UT Tests
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (go)
🔇 Additional comments (2)
src/v0/destinations/snapchat_conversion/config.js (1)

113-115: *Verify presence of the new .json mapping files

getMappingConfig eagerly reads a JSON file for every entry in ConfigCategoryV3. If even one file (e.g. ProductAddedConfigV3.json) is missing, the whole SDK will crash at module‑load time. Please make sure those files exist or guard the call with try/catch.

src/v0/destinations/snapchat_conversion/transformV3.js (1)

228-230: Guard against undefined pixelId / snapAppId

ID is chosen purely from actionSource, but either identifier could still be undefined (e.g. mis‑configured destination). Adding an explicit check yields earlier, clearer errors:

if (!ID) {
  throw new InstrumentationError('pixelId / snapAppId is required for API v3 calls');
}

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

Allure Test reports for this run are available at:

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

Allure Test reports for this run are available at:

@manish339k manish339k assigned manish339k and unassigned aanshi07 Apr 20, 2025
@yashasvibajpai
yashasvibajpai requested a review from Copilot April 20, 2025 18:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces Snapchat v3 conversion support by incorporating new data files, utility methods, and transformations for the updated API. Key changes include:

  • Splitting test data into v2 and v3 sets and merging them.
  • Adding new utility and transformation functions to support v3 endpoints.
  • Updating configuration to include v3 endpoints and mapping configuration.

Reviewed Changes

Copilot reviewed 9 out of 22 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/integrations/destinations/snapchat_conversion/router/data.ts Introduces dataV3 import, renames existing export to dataV2 and merges data arrays.
test/integrations/destinations/snapchat_conversion/processor/data.ts Similar update for processor test data with dataV3 integration.
src/v0/destinations/snapchat_conversion/utilsV3.js New v3 utility methods added to support batched responses and metadata merging.
src/v0/destinations/snapchat_conversion/util.js Updates include new error handling, v2 endpoint selection via configuration, and added helper functions.
src/v0/destinations/snapchat_conversion/transformV3.js A new transformation file for processing Snapchat v3 events.
src/v0/destinations/snapchat_conversion/transform.js Modified to check and delegate processing based on the API version.
src/v0/destinations/snapchat_conversion/config.js Updated endpoint configuration and added v3 mapping configuration and API version details.
Files not reviewed (13)
  • src/v0/destinations/snapchat_conversion/data/CheckoutStartedConfigV3.json: Language not supported
  • src/v0/destinations/snapchat_conversion/data/OrderCompletedConfigV3.json: Language not supported
  • src/v0/destinations/snapchat_conversion/data/PaymentInfoEnteredConfigV3.json: Language not supported
  • src/v0/destinations/snapchat_conversion/data/ProductAddedConfigV3.json: Language not supported
  • src/v0/destinations/snapchat_conversion/data/ProductAddedToWishlistConfigV3.json: Language not supported
  • src/v0/destinations/snapchat_conversion/data/ProductListViewedConfigV3.json: Language not supported
  • src/v0/destinations/snapchat_conversion/data/ProductViewedConfigV3.json: Language not supported
  • src/v0/destinations/snapchat_conversion/data/ProductsSearchedConfigV3.json: Language not supported
  • src/v0/destinations/snapchat_conversion/data/PromotionClickedConfigV3.json: Language not supported
  • src/v0/destinations/snapchat_conversion/data/PromotionViewedConfigV3.json: Language not supported
  • src/v0/destinations/snapchat_conversion/data/SignupConfigV3.json: Language not supported
  • src/v0/destinations/snapchat_conversion/data/SnapchatTrackDefaultConfigV3.json: Language not supported
  • src/v0/destinations/snapchat_conversion/data/TrackEventCommonConfigV3.json: Language not supported
Comments suppressed due to low confidence (2)

test/integrations/destinations/snapchat_conversion/router/data.ts:5

  • [nitpick] Consider renaming 'dataV2' to a more descriptive name (e.g., 'snapchatConversionDataV2') to clearly differentiate between v2 and v3 test data sets.
export const dataV2 = [

test/integrations/destinations/snapchat_conversion/processor/data.ts:3

  • [nitpick] Consider renaming 'dataV2' to a more descriptive name (e.g., 'snapchatConversionDataV2') for improved clarity in the test data context.
const dataV2 = [

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

Allure Test reports for this run are available at:

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

Allure Test reports for this run are available at:

@sonarqubecloud

Copy link
Copy Markdown

@manish339k
manish339k merged commit 19d9371 into develop Apr 25, 2025
@manish339k
manish339k deleted the feat.snapchat_v3 branch April 25, 2025 07:25
vinayteki95 added a commit that referenced this pull request Apr 29, 2025
* 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]>
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.

9 participants