Skip to content

chore(release): pull main into develop post release v1.97.2 - #4271

Merged
manish339k merged 3 commits into
developfrom
main
Apr 22, 2025
Merged

manish339k merged 3 commits into
developfrom
main

Conversation

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

👑 An automated PR

manish339k and others added 3 commits April 22, 2025 13:10
* fix: removed limit on mixpanel nested property depth level

* fix: validate only import properties
@coderabbitai

coderabbitai Bot commented Apr 22, 2025 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Removed the restriction on the maximum nesting depth for event properties, allowing more deeply nested objects to be sent without triggering errors.
  • Tests
    • Updated tests to reflect the removal of the maximum nesting depth constraint, ensuring no errors are thrown for deeply nested properties.

Walkthrough

This change removes the enforcement of a maximum nesting depth constraint from the Mixpanel destination codebase. The constant MAX_NESTING_DEPTH is deleted from the configuration, and all related validation logic is eliminated from utility functions and tests. The validation of Mixpanel payload limits is now focused solely on object key and array element counts, without restricting how deeply objects can be nested. Additionally, the placement of payload validation calls is adjusted in the event processing logic to ensure properties are validated at the correct stage.

Changes

File(s) Change Summary
src/v0/destinations/mp/config.js Removed the MAX_NESTING_DEPTH constant and its export.
src/v0/destinations/mp/util.js Eliminated the nesting depth check from recursive payload validation; updated documentation and imports.
src/v0/destinations/mp/util.test.js Updated tests to no longer expect errors for deeply nested objects; assertions now expect no error.
src/v0/destinations/mp/transform.js Moved validation calls to after properties construction in event functions; removed from response builder and identify logic.

Sequence Diagram(s)

sequenceDiagram
    participant EventFunction as getEventValueForTrackEvent/processPageOrScreenEvents
    participant Validator as validateMixpanelPayloadLimits

    EventFunction->>Validator: Validate finalized properties object
    Validator-->>EventFunction: Return (throws if limits exceeded)
Loading

Possibly related PRs

Suggested reviewers

  • krishna2020
  • vinayteki95
  • ItsSudip

Suggestions for improvement:
Consider documenting in release notes or migration guides that the maximum nesting depth constraint has been removed, especially if this impacts downstream consumers or compliance requirements. Additionally, review if any external documentation or API contracts reference the now-removed constraint and update accordingly.


📜 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 857577d and 79cebfc.

⛔ Files ignored due to path filters (3)
  • CHANGELOG.md is excluded by !**/*.md
  • package-lock.json is excluded by !**/package-lock.json, !**/*.json
  • package.json is excluded by !**/*.json
📒 Files selected for processing (4)
  • src/v0/destinations/mp/config.js (0 hunks)
  • src/v0/destinations/mp/transform.js (2 hunks)
  • src/v0/destinations/mp/util.js (3 hunks)
  • src/v0/destinations/mp/util.test.js (2 hunks)
💤 Files with no reviewable changes (1)
  • src/v0/destinations/mp/config.js
🧰 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/mp/util.test.js
  • src/v0/destinations/mp/transform.js
  • src/v0/destinations/mp/util.js
🧬 Code Graph Analysis (1)
src/v0/destinations/mp/transform.js (1)
src/v0/destinations/mp/util.js (1)
  • validateMixpanelPayloadLimits (94-107)
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: Code Coverage
  • GitHub Check: UT Tests
  • GitHub Check: test_and_publish
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (9)
src/v0/destinations/mp/transform.js (2)

190-190: Validation moved to property construction point - good placement.

The validation of Mixpanel payload limits is now appropriately called immediately after the properties object is fully constructed. This ensures that property validation happens at the right stage of processing before the payload is finalized.


383-383: Validation correctly placed after properties construction.

Similar to the change in getEventValueForTrackEvent, this properly places validation immediately after the properties object is constructed for page/screen events. This ensures consistent validation timing across different event types.

src/v0/destinations/mp/util.test.js (2)

868-868: Test updated to reflect removal of nesting depth validation.

This test case now correctly expects no error to be thrown for deeply nested objects, aligning with the removal of the maximum nesting depth constraint from the validation logic.


928-928: Test correctly updated for complex object validation.

The assertion has been appropriately updated to expect no error for complex objects with deep nesting, consistent with the other test case changes and the implementation changes.

src/v0/destinations/mp/util.js (5)

52-52: Depth tracking parameter removed as expected.

The removal of the depth parameter from the validateObjectRecursively function signature is appropriate as part of eliminating the nesting depth validation constraint.


76-77: Recursive call simplified by removing depth parameter.

The depth parameter has been correctly removed from the recursive call when validating objects within arrays, consistent with the overall change to remove nesting depth validation.


80-81: Recursive call for object properties simplified.

The depth parameter has been properly removed from this recursive call as well, maintaining consistency with the other recursive call changes.


89-89: Documentation updated to remove mention of nesting depth.

The function documentation has been properly updated to remove the mention of maximum nesting depth constraints, keeping the documentation in sync with the implementation.


106-107: Initial recursive validation call simplified.

The initial call to validateObjectRecursively has been updated to remove the initial depth parameter, consistent with the function signature change.

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

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor Author

Allure Test reports for this run are available at:

@codecov

codecov Bot commented Apr 22, 2025 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.21%. Comparing base (881ff97) to head (79cebfc).
Report is 11 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4271      +/-   ##
===========================================
- Coverage    91.21%   91.21%   -0.01%     
===========================================
  Files          632      632              
  Lines        33057    33053       -4     
  Branches      7826     7827       +1     
===========================================
- Hits         30154    30150       -4     
+ Misses        2688     2658      -30     
- Partials       215      245      +30     

☔ 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

@manish339k
manish339k merged commit fe63a5d into develop Apr 22, 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.

4 participants