Skip to content

fix: property validations in mixpanel - #4269

Merged
manish339k merged 2 commits into
hotfix/20250422from
fix.mp_nested_property
Apr 22, 2025
Merged

manish339k merged 2 commits into
hotfix/20250422from
fix.mp_nested_property

Conversation

@manish339k

@manish339k manish339k commented Apr 22, 2025 •

Copy link
Copy Markdown
Contributor

What are the changes introduced in this PR?

This pull request removes the validation for maximum nesting depth in Mixpanel payloads and updates the related code, configurations, and tests accordingly. The changes ensure that payloads are no longer restricted by a nesting depth limit while maintaining other existing validations.

Removal of Maximum Nesting Depth Validation:

  • Removed the MAX_NESTING_DEPTH constant from src/v0/destinations/mp/config.js and its references in the module exports. ([[1]](https://github.com/rudderlabs/rudder-transformer/pull/4269/files#diff-b086c0407309f7eb2db3193bf41d6d974ae42cdbcee756cd90d412d2958c2f96L63), [[2]](https://github.com/rudderlabs/rudder-transformer/pull/4269/files#diff-b086c0407309f7eb2db3193bf41d6d974ae42cdbcee756cd90d412d2958c2f96L84))
  • Updated the validateObjectRecursively function in src/v0/destinations/mp/util.js to eliminate the depth parameter and remove the logic for checking nesting depth. ([[1]](https://github.com/rudderlabs/rudder-transformer/pull/4269/files#diff-94e841c0e46947151ce5b7bc7eecf1002a9afc1d579ad57b1cf373118a74fff3L53-R52), [[2]](https://github.com/rudderlabs/rudder-transformer/pull/4269/files#diff-94e841c0e46947151ce5b7bc7eecf1002a9afc1d579ad57b1cf373118a74fff3L85-R88), [[3]](https://github.com/rudderlabs/rudder-transformer/pull/4269/files#diff-94e841c0e46947151ce5b7bc7eecf1002a9afc1d579ad57b1cf373118a74fff3L115-R106))
  • Updated the validateMixpanelPayloadLimits function to reflect the removal of nesting depth validation. ([src/v0/destinations/mp/util.jsL115-R106](https://github.com/rudderlabs/rudder-transformer/pull/4269/files#diff-94e841c0e46947151ce5b7bc7eecf1002a9afc1d579ad57b1cf373118a74fff3L115-R106))

Codebase Adjustments:

  • Removed calls to validateMixpanelPayloadLimits in specific parts of the codebase where it was no longer required, such as in src/v0/destinations/mp/transform.js and src/v0/destinations/mp/util.js. ([[1]](https://github.com/rudderlabs/rudder-transformer/pull/4269/files#diff-5208294c2bfab48d117a1b6c92ffd316a5efd733831419bb7ed12484d30e9a77L65), [[2]](https://github.com/rudderlabs/rudder-transformer/pull/4269/files#diff-5208294c2bfab48d117a1b6c92ffd316a5efd733831419bb7ed12484d30e9a77L191-R190), [[3]](https://github.com/rudderlabs/rudder-transformer/pull/4269/files#diff-5208294c2bfab48d117a1b6c92ffd316a5efd733831419bb7ed12484d30e9a77R383), [[4]](https://github.com/rudderlabs/rudder-transformer/pull/4269/files#diff-94e841c0e46947151ce5b7bc7eecf1002a9afc1d579ad57b1cf373118a74fff3L210-L212))

Test Updates:

  • Updated test cases in src/v0/destinations/mp/util.test.js to ensure that payloads with deep nesting no longer throw errors. ([[1]](https://github.com/rudderlabs/rudder-transformer/pull/4269/files#diff-8c2d27692294dbb8dc6ba62734ef3f2b5ea72bcbca2c5fbd597570e522542a41L868-R868), [[2]](https://github.com/rudderlabs/rudder-transformer/pull/4269/files#diff-8c2d27692294dbb8dc6ba62734ef3f2b5ea72bcbca2c5fbd597570e522542a41L931-R928))

What is the related Linear task?

Resolves INT-3555

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.

@manish339k
manish339k requested a review from a team as a code owner April 22, 2025 07:26
@manish339k
manish339k requested review from koladilip and krishna2020 and removed request for a team April 22, 2025 07:26
@coderabbitai

coderabbitai Bot commented Apr 22, 2025

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

@manish339k manish339k changed the title Fix.mp nested property fix: mp property validation Apr 22, 2025
@yashasvibajpai yashasvibajpai changed the title fix: mp property validation fix: nested property validations in mixpanel Apr 22, 2025
@manish339k manish339k changed the title fix: nested property validations in mixpanel fix: property validations in mixpanel Apr 22, 2025
@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

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.17%. Comparing base (881ff97) to head (a4a2cc1).
Report is 1 commits behind head on hotfix/20250422.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           hotfix/20250422    #4269      +/-   ##
===================================================
- Coverage            91.21%   91.17%   -0.05%     
===================================================
  Files                  632      632              
  Lines                33057    33075      +18     
  Branches              7826     7832       +6     
===================================================
+ Hits                 30154    30156       +2     
+ Misses                2688     2674      -14     
- 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 c05f99d into hotfix/20250422 Apr 22, 2025
@manish339k
manish339k deleted the fix.mp_nested_property branch April 22, 2025 07:40
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.

3 participants