Skip to content

chore(release): pull main into develop post release v1.126.0#5035

Merged
ItsSudip merged 3 commits intodevelopfrom
main
Mar 16, 2026
Merged

chore(release): pull main into develop post release v1.126.0#5035
ItsSudip merged 3 commits intodevelopfrom
main

Conversation

@devops-github-rudderstack
Copy link
Contributor

👑 An automated PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 11, 2026

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'auto_resolve_threads'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Enhanced error logging and handling for Facebook Lead Ads API responses
    • Improved email field validation and extraction across multiple data sources
    • Strengthened handling of missing or incomplete context data to prevent processing errors

Walkthrough

The changes add email context propagation across multiple source connectors (Facebook Lead Ads, Iterable, Shopify), enhance error handling with structured logging in Facebook Lead Ads hydration, and introduce null-safety checks in transform functions. Comprehensive test coverage is added for email extraction scenarios and non-OK API response handling.

Changes

Cohort / File(s) Summary
Email Context Propagation in Shopify
src/sources/shopify/webpixelTransformations/pixelUtils.js, src/sources/shopify/webpixelTransformations/pixelTransform.test.js
Adds setCheckoutEmail() helper function to extract checkout email and set it in message context.traits for checkout events. Includes test coverage for email extraction, empty email handling, and non-checkout events.
Error Handling and Logging in Facebook Lead Ads
src/sources/facebook_lead_ads_native/hydrate.ts, src/sources/facebook_lead_ads_native/hydrate.test.ts
Replaces explicit HTTP status checks with isHttpStatusSuccess() utility and adds structured error logging for non-OK responses. New tests validate error handling for various malformed API response scenarios with logger mocking.
Email Field Validation and Null Safety
src/sources/iterable/transform.js, src/v0/destinations/mp/transform.js
Extends field validation to check event.dataFields.email in Iterable; adds optional chaining (?.) for context access in Mixpanel to prevent errors when context is absent. Adjusts userId generation logic in Iterable to use email from message traits when available.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • saikumarrs
  • achettyiitr
  • krishna2020
🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is minimal (one line) and does not follow the required template structure with essential sections like objectives, related tasks, or checklists. Expand the description to include the Linear task reference, change objectives, dependency information, and complete the developer/reviewer checklists as specified in the template.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately describes the main purpose: merging main into develop post-release. It follows convention and is clear.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch main
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can suggest fixes for GitHub Check annotations.

Configure the reviews.tools.github-checks setting to adjust the time to wait for GitHub Checks to complete.

maheshkutty
maheshkutty previously approved these changes Mar 11, 2026
@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

❌ Patch coverage is 99.05213% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.39%. Comparing base (97370a2) to head (ccae181).
⚠️ Report is 26 commits behind head on develop.

Files with missing lines Patch % Lines
src/v0/destinations/fb_custom_audience/util.ts 97.36% 1 Missing ⚠️
src/v0/destinations/salesforce/utils.js 96.42% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5035      +/-   ##
===========================================
+ Coverage    92.30%   92.39%   +0.09%     
===========================================
  Files          663      664       +1     
  Lines        36490    36655     +165     
  Branches      8622     8652      +30     
===========================================
+ Hits         33681    33867     +186     
+ Misses        2592     2550      -42     
- Partials       217      238      +21     

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

ItsSudip
ItsSudip previously approved these changes Mar 11, 2026
👑 *An automated PR*

---------

Co-authored-by: Sudip Paul <67197965+ItsSudip@users.noreply.github.com>
Co-authored-by: GitHub Actions <noreply@github.com>
@ItsSudip ItsSudip dismissed stale reviews from maheshkutty and themself via ccae181 March 16, 2026 10:38
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🧹 Nitpick comments (2)
src/sources/facebook_lead_ads_native/hydrate.ts (1)

91-95: Preserve actual 2xx status in success path.

Since Line 91 now accepts any 2xx, returning hardcoded 200 at Line 94 masks upstream status (e.g., 204/202). Prefer returning processedResponse.status for clearer downstream diagnostics.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/sources/facebook_lead_ads_native/hydrate.ts` around lines 91 - 95, The
success path in hydrate.ts currently returns a hardcoded HTTP_STATUS_CODES.OK
(200) even when isHttpStatusSuccess(processedResponse.status) allowed other 2xx
values; change the returned statusCode to use processedResponse.status instead
of HTTP_STATUS_CODES.OK so callers receive the actual upstream 2xx status
(reference: isHttpStatusSuccess, processedResponse.status, and the object
returned in the success branch).
src/sources/shopify/webpixelTransformations/pixelTransform.test.js (1)

100-178: Nice scenario coverage; consider extracting a shared checkout fixture builder.

The three new tests are valuable. A small fixture helper would reduce duplication in Redis mocks and checkout payload setup, making future edge-case additions easier.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/sources/shopify/webpixelTransformations/pixelTransform.test.js` around
lines 100 - 178, Create a shared test fixture builder to reduce duplication
across the three tests by factoring common setup (mocking RedisDB.getVal and
RedisDB.setVal, base input fields like clientId/id/timestamp/query_parameters,
and the checkout payload structure) into a helper function (e.g.,
buildCheckoutEvent or buildPixelInput) and reuse it in the tests that call
processPixelWebEvents; keep separate parameters for event name (use
PIXEL_EVENT_TOPICS), checkout.email, and context.document.location.pathname so
each test can override only what it needs while still mocking
RedisDB.getVal/setVal once via the helper.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/sources/iterable/transform.js`:
- Around line 59-60: The current fallback sets message.userId to md5(email) only
when message.userId is not null/undefined; change the condition to detect empty
strings too by using the existing non-empty-string guard instead of
isDefinedAndNotNull (i.e., replace the check with the project's non-empty string
helper used elsewhere) so that if message.userId is falsy or an empty string you
compute md5(message.context.traits.email); keep references to message.userId,
md5, and message.context.traits.email to locate the change.

---

Nitpick comments:
In `@src/sources/facebook_lead_ads_native/hydrate.ts`:
- Around line 91-95: The success path in hydrate.ts currently returns a
hardcoded HTTP_STATUS_CODES.OK (200) even when
isHttpStatusSuccess(processedResponse.status) allowed other 2xx values; change
the returned statusCode to use processedResponse.status instead of
HTTP_STATUS_CODES.OK so callers receive the actual upstream 2xx status
(reference: isHttpStatusSuccess, processedResponse.status, and the object
returned in the success branch).

In `@src/sources/shopify/webpixelTransformations/pixelTransform.test.js`:
- Around line 100-178: Create a shared test fixture builder to reduce
duplication across the three tests by factoring common setup (mocking
RedisDB.getVal and RedisDB.setVal, base input fields like
clientId/id/timestamp/query_parameters, and the checkout payload structure) into
a helper function (e.g., buildCheckoutEvent or buildPixelInput) and reuse it in
the tests that call processPixelWebEvents; keep separate parameters for event
name (use PIXEL_EVENT_TOPICS), checkout.email, and
context.document.location.pathname so each test can override only what it needs
while still mocking RedisDB.getVal/setVal once via the helper.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: db4918a4-d2af-4c5e-bb03-da6716a5bea0

📥 Commits

Reviewing files that changed from the base of the PR and between d4d9801 and ccae181.

⛔ Files ignored due to path filters (8)
  • CHANGELOG.md is excluded by !**/*.md
  • package-lock.json is excluded by !**/package-lock.json, !**/*.json
  • package.json is excluded by !**/*.json
  • src/sources/iterable/mapping.json is excluded by !**/*.json
  • test/integrations/destinations/mp/processor/data.ts is excluded by !**/test/**
  • test/integrations/sources/iterable/data.ts is excluded by !**/test/**
  • test/integrations/sources/shopify/pixelMappingTests/CheckoutStepsTests.ts is excluded by !**/test/**
  • test/integrations/sources/shopify/pixelTestScenarios/CheckoutStepsTests.ts is excluded by !**/test/**
📒 Files selected for processing (6)
  • src/sources/facebook_lead_ads_native/hydrate.test.ts
  • src/sources/facebook_lead_ads_native/hydrate.ts
  • src/sources/iterable/transform.js
  • src/sources/shopify/webpixelTransformations/pixelTransform.test.js
  • src/sources/shopify/webpixelTransformations/pixelUtils.js
  • src/v0/destinations/mp/transform.js

@sonarqubecloud
Copy link

@ItsSudip ItsSudip merged commit 93bb199 into develop Mar 16, 2026
45 of 46 checks passed
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.

4 participants