Skip to content

chore(release): pull main into develop post release v1.108.0 - #4647

Merged
krishna2020 merged 4 commits into
developfrom
main
Sep 16, 2025
Merged

krishna2020 merged 4 commits into
developfrom
main

Conversation

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

👑 An automated PR

web-flow and others added 4 commits September 16, 2025 10:38
Also standardizing endpoint path with existing iterable.

Co-authored-by: Dilip Kola <[email protected]>
* chore(release): 1.108.0

* feat(klaviyo): add unique_id support for create events APIs

- Add unique_id field to track events in both v1 and v2 APIs
- Use messageId as unique_id for event deduplication
- Update test data to include unique_id validation
- Resolves INT-4135

* chore: Update CHANGELOG.md

---------

Co-authored-by: GitHub Actions <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 16, 2025 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Klaviyo: Events now include a unique_id for improved deduplication and traceability.
  • Bug Fixes
    • Stabilized and corrected endpoint paths across multiple destinations (AppsFlyer, Facebook Conversions, Facebook Pixel, Facebook Custom Audiences, GA4, Split.io, TikTok Ads) to prevent missing/double slashes and path mismatches.
  • Refactor
    • Standardized endpoint construction across destinations for consistency and maintainability.
    • GA4: Centralized endpoint paths and exposed path constants for clearer configuration.

Walkthrough

Normalized endpoint path construction across multiple destinations by removing leading slashes from path constants and updating URL assembly. Introduced GA4 path constants and updated utils to use them. Added unique_id to Klaviyo event attributes. Centralized Split.io events path. No control-flow changes.

Changes

Cohort / File(s) Summary of Changes
AppsFlyer endpoint normalization
src/v0/destinations/af/config.js
Standardized BASE_ENDPOINT_PATH to 'inappevent'; removed leading slashes from ENDPOINT_PATH/ENDPOINT_PATH_V2; updated ENDPOINT/ENDPOINT_V2 to include '/${BASE_ENDPOINT_PATH}/'.
Facebook endpoints normalization
src/v0/destinations/facebook_conversions/config.js, src/v0/destinations/facebook_pixel/config.js, src/v0/destinations/fb_custom_audience/config.js
Changed ENDPOINT_PATH values to omit leading slash ('events'/'users'); updated endpoint assembly to explicitly insert separators (e.g., /${pixelId}/${ENDPOINT_PATH} / ${BASE_URL}/${audienceId}/${ENDPOINT_PATH}); path fields now return without leading slash.
GA4 endpoint constants and usage
src/v0/destinations/ga4/config.js, src/v0/destinations/ga4/utils.js
Added ENDPOINT_PATH='mp/collect' and DEBUG_ENDPOINT_PATH=debug/${ENDPOINT_PATH}; rebuilt ENDPOINT/DEBUG_ENDPOINT from these; utils now set response.endpointPath using the new constants.
Split.io endpoint path centralization
src/v0/destinations/splitio/config.js
Introduced ENDPOINT_PATH='events'; constructed eventUrl via /api/${ENDPOINT_PATH}; CONFIG_CATEGORIES.EVENT.endpointPath references ENDPOINT_PATH.
TikTok Ads endpoint normalization
src/v0/destinations/tiktok_ads/config.js
Removed leading slashes from TRACK/BATCH/trackEndpointV2Path; updated endpoints to ${BASE_URL}/${path}/. Final URLs unchanged.
Klaviyo attribute addition
src/v0/destinations/klaviyo/transformV2.js
Added attributes.unique_id = message.messageId in track/screen request handler.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes
Suggestion: Add unit tests asserting endpointPath and full endpoint constructions per destination; consider a shared helper for URL joining to prevent regressions.

Possibly related PRs

Suggested reviewers

  • sivashanmukh
  • koladilip
  • ItsSudip
  • chandumlg
  • krishna2020

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description contains only ":crown: An automated PR" and does not follow the repository's required template; it omits the change summary, related Linear task, objectives, developer checklist, and details about new or changed public exports. The provided raw_summary shows substantive edits (endpoint/path normalization across multiple destinations, GA4 ENDPOINT_PATH/DEBUG_ENDPOINT_PATH additions, and a Klaviyo unique_id addition) that are not documented in the description. Because the description is essentially a placeholder, it is insufficient for reviewers to assess intent and impact. Replace the placeholder with the repository template and include a concise summary of the actual code changes, highlighting endpoint/path normalizations across AppsFlyer, Facebook (conversions/pixel/custom audience), GA4 (ENDPOINT_PATH and DEBUG_ENDPOINT_PATH additions), Split.io, TikTok, and the Klaviyo unique_id change; add the related Linear task or mark "N/A", state objectives and any potential breaking changes or public API/export changes, confirm tests and documentation, and complete the developer checklist before merging.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The title "chore(release): pull main into develop post release v1.108.0" is concise and accurately describes the automated branch-sync action this PR performs (merging main into develop after the v1.108.0 release); it uses the conventional chore/release prefix and is directly aligned with the PR objectives. The phrasing is short, on-topic, and useful when scanning repository history.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch main

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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.

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor Author

Allure Test reports for this run are available at:

@codecov

codecov Bot commented Sep 16, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.45455% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.78%. Comparing base (645b51d) to head (bde0785).
⚠️ Report is 41 commits behind head on develop.

Files with missing lines Patch % Lines
src/services/userTransform.ts 57.14% 3 Missing ⚠️
src/v0/destinations/ga4/utils.js 66.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4647   +/-   ##
========================================
  Coverage    91.78%   91.78%           
========================================
  Files          642      642           
  Lines        33970    33974    +4     
  Branches      8045     8037    -8     
========================================
+ Hits         31180    31184    +4     
- Misses        2538     2560   +22     
+ Partials       252      230   -22     

☔ 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.

@sonarqubecloud

Copy link
Copy Markdown

@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: 0

🧹 Nitpick comments (1)
src/v0/destinations/klaviyo/transformV2.js (1)

100-101: Guard against undefined unique_id; set only when present

Klaviyo accepts unique_id, but avoid sending an explicit undefined. Add a safe assignment.

-  attributes.unique_id = message.messageId;
+  if (message?.messageId) {
+    attributes.unique_id = String(message.messageId);
+  }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 04e2ace and bde0785.

⛔ Files ignored due to path filters (39)
  • CHANGELOG.md is excluded by !**/*.md
  • package-lock.json is excluded by !**/package-lock.json, !**/*.json
  • package.json is excluded by !**/*.json
  • test/integrations/destinations/af/processor/data.ts is excluded by !**/test/**
  • test/integrations/destinations/af/processor/validation.ts is excluded by !**/test/**
  • test/integrations/destinations/af/router/data.ts is excluded by !**/test/**
  • test/integrations/destinations/facebook_conversions/processor/data.ts is excluded by !**/test/**
  • test/integrations/destinations/facebook_conversions/router/data.ts is excluded by !**/test/**
  • test/integrations/destinations/facebook_pixel/processor/configLevelFeaturesTestData.ts is excluded by !**/test/**
  • test/integrations/destinations/facebook_pixel/processor/ecommTestData.ts is excluded by !**/test/**
  • test/integrations/destinations/facebook_pixel/processor/identifyTestData.ts is excluded by !**/test/**
  • test/integrations/destinations/facebook_pixel/processor/pageScreenTestData.ts is excluded by !**/test/**
  • test/integrations/destinations/facebook_pixel/processor/trackTestData.ts is excluded by !**/test/**
  • test/integrations/destinations/facebook_pixel/processor/validationTestData.ts is excluded by !**/test/**
  • test/integrations/destinations/facebook_pixel/router/data.ts is excluded by !**/test/**
  • test/integrations/destinations/fb_custom_audience/dataDelivery/business.ts is excluded by !**/test/**
  • test/integrations/destinations/fb_custom_audience/dataDelivery/data.ts is excluded by !**/test/**
  • test/integrations/destinations/fb_custom_audience/dataDelivery/other.ts is excluded by !**/test/**
  • test/integrations/destinations/fb_custom_audience/network.ts is excluded by !**/test/**
  • test/integrations/destinations/fb_custom_audience/processor/data.ts is excluded by !**/test/**
  • test/integrations/destinations/fb_custom_audience/router/data.ts is excluded by !**/test/**
  • test/integrations/destinations/ga4/processor/ecomTestData.ts is excluded by !**/test/**
  • test/integrations/destinations/ga4/processor/groupTestData.ts is excluded by !**/test/**
  • test/integrations/destinations/ga4/processor/pageTestData.ts is excluded by !**/test/**
  • test/integrations/destinations/ga4/processor/trackTestData.ts is excluded by !**/test/**
  • test/integrations/destinations/ga4/processor/validationTestData.ts is excluded by !**/test/**
  • test/integrations/destinations/ga4_v2/processor/customMappings.ts is excluded by !**/test/**
  • test/integrations/destinations/klaviyo/processor/ecomTestData.ts is excluded by !**/test/**
  • test/integrations/destinations/klaviyo/processor/trackTestData.ts is excluded by !**/test/**
  • test/integrations/destinations/klaviyo/processor/trackTestDataV2.ts is excluded by !**/test/**
  • test/integrations/destinations/klaviyo/router/dataV2.ts is excluded by !**/test/**
  • test/integrations/destinations/splitio/processor/data.ts is excluded by !**/test/**
  • test/integrations/destinations/splitio/router/data.ts is excluded by !**/test/**
  • test/integrations/destinations/tiktok_ads/dataDelivery/business.ts is excluded by !**/test/**
  • test/integrations/destinations/tiktok_ads/dataDelivery/data.ts is excluded by !**/test/**
  • test/integrations/destinations/tiktok_ads/dataDelivery/other.ts is excluded by !**/test/**
  • test/integrations/destinations/tiktok_ads/network.ts is excluded by !**/test/**
  • test/integrations/destinations/tiktok_ads/processor/data.ts is excluded by !**/test/**
  • test/integrations/destinations/tiktok_ads/router/data.ts is excluded by !**/test/**
📒 Files selected for processing (9)
  • src/v0/destinations/af/config.js (1 hunks)
  • src/v0/destinations/facebook_conversions/config.js (1 hunks)
  • src/v0/destinations/facebook_pixel/config.js (1 hunks)
  • src/v0/destinations/fb_custom_audience/config.js (1 hunks)
  • src/v0/destinations/ga4/config.js (2 hunks)
  • src/v0/destinations/ga4/utils.js (2 hunks)
  • src/v0/destinations/klaviyo/transformV2.js (1 hunks)
  • src/v0/destinations/splitio/config.js (1 hunks)
  • src/v0/destinations/tiktok_ads/config.js (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.js

⚙️ CodeRabbit configuration file

Focus on ESLint errors (max 3) and warnings (max 5).

Files:

  • src/v0/destinations/ga4/utils.js
  • src/v0/destinations/klaviyo/transformV2.js
  • src/v0/destinations/ga4/config.js
  • src/v0/destinations/splitio/config.js
  • src/v0/destinations/facebook_conversions/config.js
  • src/v0/destinations/facebook_pixel/config.js
  • src/v0/destinations/fb_custom_audience/config.js
  • src/v0/destinations/af/config.js
  • src/v0/destinations/tiktok_ads/config.js
🧠 Learnings (1)
📚 Learning: 2025-07-15T06:27:07.528Z
Learnt from: ItsSudip
PR: rudderlabs/rudder-transformer#4497
File: src/v0/destinations/tiktok_ads/transformV2.js:686-691
Timestamp: 2025-07-15T06:27:07.528Z
Learning: For TikTok Ads destination in src/v0/destinations/tiktok_ads/transformV2.js, there are plans for a future enhancement to group events by eventSource when batching to ensure all events in a batch have the same event_source value, as acknowledged by ItsSudip in PR #4497.

Applied to files:

  • src/v0/destinations/klaviyo/transformV2.js
  • src/v0/destinations/tiktok_ads/config.js
🧬 Code graph analysis (9)
src/v0/destinations/ga4/utils.js (1)
src/v0/destinations/ga4/config.js (3)
  • DEBUG_ENDPOINT_PATH (4-4)
  • ENDPOINT (5-5)
  • ENDPOINT_PATH (3-3)
src/v0/destinations/klaviyo/transformV2.js (2)
src/v0/destinations/klaviyo/util.js (1)
  • attributes (181-184)
src/v0/destinations/klaviyo/transform.js (1)
  • attributes (171-171)
src/v0/destinations/ga4/config.js (5)
src/v0/destinations/af/config.js (2)
  • ENDPOINT_PATH (60-60)
  • ENDPOINT (62-62)
src/v0/destinations/facebook_conversions/config.js (1)
  • ENDPOINT_PATH (5-5)
src/v0/destinations/facebook_pixel/config.js (1)
  • ENDPOINT_PATH (5-5)
src/v0/destinations/fb_custom_audience/config.js (1)
  • ENDPOINT_PATH (3-3)
src/v0/destinations/splitio/config.js (1)
  • ENDPOINT_PATH (4-4)
src/v0/destinations/splitio/config.js (3)
src/v0/destinations/af/config.js (1)
  • ENDPOINT_PATH (60-60)
src/v0/destinations/facebook_conversions/config.js (1)
  • ENDPOINT_PATH (5-5)
src/v0/destinations/facebook_pixel/config.js (1)
  • ENDPOINT_PATH (5-5)
src/v0/destinations/facebook_conversions/config.js (1)
src/v0/destinations/facebook_pixel/config.js (3)
  • ENDPOINT_PATH (5-5)
  • getEndpointDetails (7-10)
  • VERSION (3-3)
src/v0/destinations/facebook_pixel/config.js (1)
src/v0/destinations/facebook_conversions/config.js (3)
  • ENDPOINT_PATH (5-5)
  • getEndpointDetails (7-10)
  • VERSION (3-3)
src/v0/destinations/fb_custom_audience/config.js (5)
src/v0/destinations/af/config.js (1)
  • ENDPOINT_PATH (60-60)
src/v0/destinations/facebook_conversions/config.js (1)
  • ENDPOINT_PATH (5-5)
src/v0/destinations/facebook_pixel/config.js (1)
  • ENDPOINT_PATH (5-5)
src/v0/destinations/ga4/config.js (1)
  • ENDPOINT_PATH (3-3)
src/v0/destinations/splitio/config.js (1)
  • ENDPOINT_PATH (4-4)
src/v0/destinations/af/config.js (5)
src/v0/destinations/facebook_conversions/config.js (1)
  • ENDPOINT_PATH (5-5)
src/v0/destinations/facebook_pixel/config.js (1)
  • ENDPOINT_PATH (5-5)
src/v0/destinations/fb_custom_audience/config.js (1)
  • ENDPOINT_PATH (3-3)
src/v0/destinations/ga4/config.js (2)
  • ENDPOINT_PATH (3-3)
  • ENDPOINT (5-5)
src/v0/destinations/splitio/config.js (1)
  • ENDPOINT_PATH (4-4)
src/v0/destinations/tiktok_ads/config.js (2)
src/v0/destinations/fb_custom_audience/config.js (1)
  • BASE_URL (1-1)
src/v0/destinations/splitio/config.js (1)
  • BASE_URL (3-3)
⏰ 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). (7)
  • GitHub Check: Code Coverage
  • GitHub Check: test_and_publish
  • GitHub Check: UT Tests
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (11)
src/v0/destinations/ga4/config.js (2)

3-6: Good extraction of GA4 paths

ENDPOINT/DEBUG_ENDPOINT now derive from path constants; reduces duplication. No ESLint issues spotted.


180-185: Export additions align with utils usage

Exporting ENDPOINT_PATH and DEBUG_ENDPOINT_PATH is consistent with utils import. LGTM.

src/v0/destinations/ga4/utils.js (2)

19-26: Config destructuring updated correctly

Importing ENDPOINT_PATH/DEBUG_ENDPOINT_PATH is accurate and used below.


535-541: Verify leading-slash behavior when concatenating endpoint + endpointPath

response.endpointPath is set from ENDPOINT_PATH / DEBUG_ENDPOINT_PATH (src/v0/destinations/ga4/utils.js, lines 535–541). Confirm whether those constants include a leading '/' or whether the network layer that composes the final URL tolerates/normalizes missing/extra slashes (avoid double-slash or missing-path bugs). Quick checks you can run locally:

  • rg -n --hidden -S '\b(ENDPOINT_PATH|DEBUG_ENDPOINT_PATH|ENDPOINT|DEBUG_ENDPOINT)\b' src
  • rg -n --hidden -S 'response.endpoint|endpointPath|endpoint\s*+' src
src/v0/destinations/splitio/config.js (1)

4-11: endpointPath 'events' is safe — no leading slash required

CONFIG builds a full URL (${BASE_URL}/api/${ENDPOINT_PATH}), transform assigns category.endPoint to response.endpoint and category.endpointPath to response.endpointPath, and src/adapters/network.js only uses endpointPath for logging/stats (no URL composition). Checked: src/v0/destinations/splitio/config.js, src/v0/destinations/splitio/transform.js, src/adapters/network.js. Optional: add a short comment or standardize leading-slash usage across configs to avoid future confusion.

src/v0/destinations/facebook_conversions/config.js (1)

5-10: Path normalization OK — no callers require a leading slash.

getEndpointDetails returns the full URL (endpoint includes "events") and endpointDetails.path ('events') is only copied to response.endpointPath for telemetry; I found no code concatenating a base URL + endpointPath for Facebook Pixel/Conversions.
Locations: src/v0/destinations/facebook_conversions/config.js (getEndpointDetails), src/v0/util/facebookUtils/index.js (formingFinalResponse -> response.endpointPath), src/adapters/network.js (endpointPath used in statTags/logging).

src/v0/destinations/facebook_pixel/config.js (1)

5-10: No action required — 'events' path is safe (no leading-slash dependency)

Verified: getEndpointDetails builds the full request URL (includes .../${pixelId}/events?... ) and endpointDetails.path ('events') is only copied to response.endpointPath for logging/metrics; no downstream code concatenates .path to form request URLs. Checked: src/v0/destinations/facebook_pixel/config.js and src/v0/util/facebookUtils/index.js.

Suggestion: optionally standardize endpointPath formatting (always include or exclude leading '/') across destinations to reduce metric/test variability.

src/v0/destinations/af/config.js (1)

59-64: Verify URL composition — avoid duplicated "inappevent" segment

config.js defines BASE_ENDPOINT_PATH = 'inappevent' and produces ENDPOINT = https://api2.appsflyer.com/inappevent/ while ENDPOINT_PATH = 'v1/inappevent'; transform sets response.endpoint = finalEndPoint (+ appId) and response.endpointPath = finalEndPointPath. If the request runner concatenates endpoint + endpointPath you will get a duplicated segment (…/inappevent/v1/inappevent). Confirm how the final request URL is assembled; either remove the duplicate from ENDPOINT or ENDPOINT_PATH, or ensure the caller treats response.endpoint as the full URL (and uses endpointPath only for metadata).

Locations: src/v0/destinations/af/config.js (lines ~59–63) and src/v0/destinations/af/transform.js (where finalEndPoint/finalEndPointPath and response.endpoint/response.endpointPath are set).

src/v0/destinations/fb_custom_audience/config.js (1)

3-7: OK — change is safe; no double/missing-slash detected

getEndPoint builds a full URL including "/users" (src/v0/destinations/fb_custom_audience/config.js) and util sets response.endpoint = getEndPoint(audienceId) and response.endpointPath = config.ENDPOINT_PATH (src/v0/destinations/fb_custom_audience/util.js). adapters/network.js uses the endpoint as the request URL (prepareProxyRequest/proxyRequest) and treats endpointPath only for logging/stats — no code concatenates endpoint + endpointPath.

src/v0/destinations/tiktok_ads/config.js (2)

56-57: V2 endpoint assembly is consistent; confirm consumers prefix exactly one slash when using the path.

trackEndpointV2Path now omits the leading slash and trackEndpointV2 includes it via template interpolation. Ensure any utils building request paths do /${trackEndpointV2Path} and do not prepend an extra /.

You can reuse the script above; pay attention to lines showing trackEndpointV2Path usage to verify a single leading slash is added.


4-7: Endpoint path normalization verified — no callers append extra slashes.

I scanned the repo: no code concatenates a "/" onto TRACK_ENDPOINT, BATCH_ENDPOINT, or trackEndpointV2; transform/transformV2 and tests use the constants as endpoint/endpointPath without unsafe concatenation. Approving the change.

@krishna2020
krishna2020 merged commit 5df8014 into develop Sep 16, 2025
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.

5 participants