Skip to content

chore(release): pull main into develop post release v1.101.0 - #4355

Merged
utsabc merged 5 commits into
developfrom
main
May 28, 2025
Merged

utsabc merged 5 commits into
developfrom
main

Conversation

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

👑 An automated PR

web-flow and others added 4 commits May 26, 2025 12:15
* feat: update destination type with optional account types (#4291)

* feat: update destination type with optional account types

* chore: add authenticationType

* chore: update types with generics

* chore: add optional config to accountDefiition

* chore: update deleteAccount to regulationAccount

* chore: update regulationAccount to deleteAccount

* chore(destination): migrate slack destination tests to new format (#4279)

* chore(destination): migrate slack destination tests to new format

* refactor: tests to use proper types

* chore: fix status in mailchimp, fix cognitive complexity, add unit tests (#4314)

* chore: fix status in mailchimp, fix cognitive complexity, add unit tests

* chore: fix PR comments for mailchimp tests

* test: add tests for error cases to improve code coverage

---------

Co-authored-by: Dilip Kola <[email protected]>

* chore(braze): added docs for braze destination (#4297)

* chore(braze): added docs for braze destination

* chore: update braze docs

* chore: add multiplexing section

---------

Co-authored-by: Utsab Chowdhury <[email protected]>

* chore: add string check for phone in gaoc (#4311)

* chore: add string check for phone in gaoc

* chore: add unit test

* chore: update condition

Co-authored-by: Sudip Paul <[email protected]>

---------

Co-authored-by: Sudip Paul <[email protected]>

* chore: correct dotenv import (#4320)

* chore: payload size middleware performance improvement (#4318)

* fix: add uuid as fallback to missing anonymousId in webhook events (#4276)

* chore: bump codecov/codecov-action from 5.4.2 to 5.4.3 (#4335)

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.4.2 to 5.4.3.
- [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.2...v5.4.3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: 5.4.3
  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: bump slackapi/slack-github-action from 1.27.0 to 2.1.0 (#4312)

Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 1.27.0 to 2.1.0.
- [Release notes](https://github.com/slackapi/slack-github-action/releases)
- [Commits](slackapi/slack-github-action@v1.27.0...v2.1.0)

---
updated-dependencies:
- dependency-name: slackapi/slack-github-action
  dependency-version: 2.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: mp add content type header to all apis (#4344)

* fix: mp add content-type header and follow strict for engage and group apis

* chore: mp add content type header to all apis

* feat: bluecore email subscription event (#4304)

* fix: blucore optin event mapping

* fix: review comments

* chore: add subscription event

* chore: add subscription event

* fix: reviews comments

* fix: review comments

* fix: review comments

* fix: review comments

* chore: test description

* chore(release): 1.101.0

* chore: pass copy of metadata to avoid actual metadata modifications (#4351)

* Revert "feat: update destination type with optional account types (#4291)" (#4348)

This reverts commit f368f00.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Sudip Paul <[email protected]>
Co-authored-by: Yashasvi Bajpai <[email protected]>
Co-authored-by: Dilip Kola <[email protected]>
Co-authored-by: Dilip Kola <[email protected]>
Co-authored-by: Vinay Teki <[email protected]>
Co-authored-by: Utsab Chowdhury <[email protected]>
Co-authored-by: Aris Tzoumas <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mahesh Kutty <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>
Co-authored-by: Jayachand Mopidevi <[email protected]>
@coderabbitai

coderabbitai Bot commented May 27, 2025 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • The metadata exposed to isolated transformations is now limited to a curated set of fields, enhancing data privacy and clarity.
  • Refactor

    • Simplified region handling for Zoho destinations by directly accessing the region from configuration, removing unnecessary utility functions.
    • Streamlined naming conventions for configuration variables in Zoho-related modules for improved consistency.
    • Simplified destination path resolution logic by removing indirect mapping for destination names.
    • Reduced complexity of destination type definitions by removing unused account-related types and properties.
  • Tests

    • Updated tests to align with the revised function signatures and configuration structures.

Walkthrough

This update removes the getRegion utility and its usage across Zoho destination modules, simplifying region retrieval by directly accessing the region property from configuration objects. It also restricts exposed metadata in transformation contexts to a curated subset of fields. Several type definitions related to account configurations are removed, and destination name mapping logic is simplified.

Changes

Files/Group Change Summary
src/cdk/v2/destinations/zoho/rtWorkflow.yaml Removed getRegion binding; updated validateConfig to access Config.region directly.
src/cdk/v2/destinations/zoho/transformRecordV2.js Renamed connectionConfig to destConfig throughout; updated parameter passing for searchRecordIdV2.
src/cdk/v2/destinations/zoho/utils.js, utils.test.js Removed getRegion function; updated function signatures to use Config/destConfig; adjusted tests accordingly.
src/cdk/v2/utils.ts Removed import and usage of DestHandleMapForCDKV2; simplified path resolution logic.
src/constants/destinationCanonicalNames.js Removed DestHandleMapForCDKV2 constant and its export.
src/types/controlPlaneConfig.ts Removed account-related type definitions and generics from Destination type.
src/util/customTransformer.js, src/util/ivmFactory.js Modified metadata function to return a curated subset of fields instead of the full metadata object.

Sequence Diagram(s)

sequenceDiagram
    participant Workflow
    participant Config
    participant Utils

    Workflow->>Config: Access region via Config.region
    Workflow->>Utils: Pass Config/region directly for module info and record ID
    Utils-->>Workflow: Return results using direct region access
Loading
sequenceDiagram
    participant Isolate
    participant MetadataStore

    Isolate->>MetadataStore: Request metadata for messageId
    MetadataStore-->>Isolate: Return curated subset of metadata fields
Loading

Possibly related PRs

  • rudderlabs/rudder-transformer#4291: Removes getRegion utility and changes calls to directly access Config.region, which is directly opposite to the changes in this PR, indicating a strong code-level relationship.
  • rudderlabs/rudder-transformer#4345: Modifies the metadata function in both customTransformer.js and ivmFactory.js to return a curated subset of metadata fields, directly overlapping with changes in this PR.

Suggested reviewers

  • sivashanmukh
  • manish339k
  • koladilip
  • krishna2020

Suggestions for improvement:

  • Ensure all downstream consumers of Zoho utilities are updated to use the new parameter structure to avoid runtime errors.
  • Consider documenting the curated metadata fields for transparency and future maintainability.
  • Review any integrations or scripts that relied on the removed account-related types to prevent type mismatches.

📜 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 f3636e9 and 9be968a.

⛔ Files ignored due to path filters (5)
  • 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/zoho/router/account.ts is excluded by !**/test/**
  • test/integrations/destinations/zoho/router/data.ts is excluded by !**/test/**
📒 Files selected for processing (9)
  • src/cdk/v2/destinations/zoho/rtWorkflow.yaml (1 hunks)
  • src/cdk/v2/destinations/zoho/transformRecordV2.js (12 hunks)
  • src/cdk/v2/destinations/zoho/utils.js (3 hunks)
  • src/cdk/v2/destinations/zoho/utils.test.js (7 hunks)
  • src/cdk/v2/utils.ts (1 hunks)
  • src/constants/destinationCanonicalNames.js (1 hunks)
  • src/types/controlPlaneConfig.ts (1 hunks)
  • src/util/customTransformer.js (1 hunks)
  • src/util/ivmFactory.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/constants/destinationCanonicalNames.js
  • src/util/ivmFactory.js
  • src/cdk/v2/destinations/zoho/transformRecordV2.js
  • src/util/customTransformer.js
  • src/cdk/v2/destinations/zoho/utils.js
  • src/cdk/v2/destinations/zoho/utils.test.js
🧬 Code Graph Analysis (3)
src/cdk/v2/destinations/zoho/transformRecordV2.js (2)
src/cdk/v2/destinations/zoho/utils.js (6)
  • destConfig (15-15)
  • destConfig (185-185)
  • formattedFields (53-53)
  • formatMultiSelectFieldsV2 (45-63)
  • Config (184-184)
  • searchRecordIdV2 (182-196)
src/v0/util/index.js (1)
  • handleRtTfSingleEventError (1778-1795)
src/cdk/v2/destinations/zoho/utils.js (2)
src/cdk/v2/destinations/zoho/transformRecordV2.js (4)
  • deduceModuleInfoV2 (336-339)
  • destConfig (38-38)
  • destConfig (318-318)
  • destConfig (322-322)
src/v0/util/index.js (1)
  • getHashFromArray (215-224)
src/cdk/v2/destinations/zoho/utils.test.js (2)
src/cdk/v2/destinations/zoho/utils.js (3)
  • result (188-188)
  • searchRecordIdV2 (182-196)
  • deduceModuleInfoV2 (14-25)
src/cdk/v2/destinations/zoho/transformRecordV2.js (1)
  • deduceModuleInfoV2 (336-339)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Code Coverage
  • GitHub Check: test_and_publish
🔇 Additional comments (16)
src/util/customTransformer.js (1)

122-157: LGTM! Excellent security improvement for metadata exposure.

This change successfully restricts metadata exposure to isolated VM contexts by explicitly enumerating allowed fields instead of returning the entire eventMetadata object. This approach prevents accidental leakage of sensitive metadata fields and provides better control over the data available to transformation code.

The field subset appears comprehensive and includes all necessary identifiers, source/destination details, tracking plan information, and job-related data that transformations typically require.

src/util/ivmFactory.js (1)

97-133: LGTM! Consistent implementation of metadata restriction.

This change perfectly aligns with the security improvement in customTransformer.js, ensuring consistent metadata exposure restrictions across all transformation contexts. The explicit field enumeration approach provides the same security benefits while maintaining API compatibility.

The identical field subset between both implementations ensures predictable behavior regardless of which transformation context is used.

src/constants/destinationCanonicalNames.js (1)

193-193: LGTM! Clean removal of deprecated mapping constant.

The export statement has been properly updated to remove the DestHandleMapForCDKV2 constant, maintaining only the actively used exports. This aligns with the coordinated cleanup described in the AI summary.

src/cdk/v2/utils.ts (1)

41-41:

Details

✅ Verification successful

Function simplification looks good, but verify no breaking changes.

The direct use of destName in the path construction simplifies the function by removing the indirection through the deleted DestHandleMapForCDKV2 mapping. This is a clean improvement that makes the code more straightforward.

Please verify that all callers have been updated to pass the correct destination names directly, rather than relying on the previous mapping:


🏁 Script executed:

#!/bin/bash
# Description: Verify no remaining references to the removed mapping exist and check for potential breaking changes

# Search for any remaining references to DestHandleMapForCDKV2
echo "Checking for remaining references to DestHandleMapForCDKV2..."
rg -A 3 "DestHandleMapForCDKV2"

# Search for calls to getRootPathForDestination to verify usage patterns
echo "Checking usage patterns of getRootPathForDestination..."
rg -A 2 -B 2 "getRootPathForDestination"

# Specifically check for 'zoho_dev' references that might need updating
echo "Checking for zoho_dev references that might need attention..."
rg -A 2 -B 2 "zoho_dev"

Length of output: 1303


All references to the removed mapping have been cleared—safe to merge

A search for DestHandleMapForCDKV2 and legacy keys like zoho_dev returned no hits, and the only callers of getRootPathForDestination exist in src/cdk/v2/utils.ts and src/cdk/v2/handler.ts. The function now cleanly uses destName directly without breaking any internal usages.

No further changes needed—approving the simplification.

src/cdk/v2/destinations/zoho/transformRecordV2.js (4)

31-31: LGTM: Consistent variable renaming improves code clarity.

The systematic renaming from connectionConfig to destConfig throughout the file enhances readability and maintains consistency with the broader codebase refactoring. The parameter names now more clearly indicate their purpose.

Also applies to: 76-76, 154-154, 212-212, 243-243, 246-246


216-216: Function call updated to match new signature.

The call to searchRecordIdV2 has been correctly updated to use positional parameters instead of an object parameter, aligning with the updated function signature in src/cdk/v2/destinations/zoho/utils.js (lines 182-196).


337-339: Function call parameter order updated correctly.

The call to deduceModuleInfoV2 has been properly updated to match the new parameter order (Config, destConfig), which aligns with the function signature changes shown in the relevant code snippets.


318-322: Configuration destructuring simplified and improved.

The direct destructuring of destConfig from the connection config and the subsequent validation logic are well-implemented. The error handling for missing configuration is appropriate and maintains backward compatibility.

src/cdk/v2/destinations/zoho/rtWorkflow.yaml (1)

14-15: Workflow simplified by removing getRegion utility.

The direct access to config.region from the Config object simplifies the workflow and eliminates the need for the intermediate getRegion helper function. This change aligns well with the broader refactoring to streamline region retrieval across the Zoho destination codebase.

src/cdk/v2/destinations/zoho/utils.test.js (3)

278-283: Test calls updated correctly for new function signature.

The searchRecordIdV2 test calls have been properly updated to use the new positional parameter signature (identifiers, metadata, Config, destConfig) instead of the previous object parameter approach. This maintains test coverage while aligning with the function signature changes in src/cdk/v2/destinations/zoho/utils.js.

Also applies to: 336-341


352-353: Test input structure updated to reflect simplified configuration.

The test inputs have been correctly restructured to use a top-level config property instead of the nested destination.Config structure. This change aligns with the removal of the getRegion helper and the direct use of Config.region throughout the codebase.

Also applies to: 367-368, 382-383, 397-398


413-413: Function call parameter order updated in tests.

The deduceModuleInfoV2 test call has been correctly updated to use the new parameter order (config, destination), ensuring consistency with the updated function signature.

src/types/controlPlaneConfig.ts (1)

11-22: Type definition simplified appropriately.

The simplification of the Destination type by removing the DeliveryAccountT and DeleteAccountT generic parameters reduces unnecessary complexity. This change aligns well with the broader refactoring that eliminates nested account configurations in favor of direct configuration access, as seen throughout the Zoho destination implementation.

src/cdk/v2/destinations/zoho/utils.js (3)

14-25: Function signature update looks good and improves clarity.

The deduceModuleInfoV2 function signature has been updated to accept Config and destConfig as separate parameters, which aligns well with the calling pattern shown in the relevant code snippets. The direct access to Config.region on line 20 simplifies the implementation by removing the need for a helper function.


45-47: Parameter renaming improves consistency across the codebase.

The parameter rename from connectionConfig to destConfig on line 45 and the corresponding property access on line 47 creates better consistency with other functions in this file and aligns with the naming conventions used elsewhere in the codebase.


182-185: Enhanced function signature provides better separation of concerns.

The updated searchRecordIdV2 function signature now explicitly accepts Config and destConfig parameters, making the function's dependencies clearer. The destructuring of region from Config on line 184 and object from destConfig on line 185 follows a clean pattern and eliminates the need for nested property access.

✨ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor Author

Allure Test reports for this run are available at:

@codecov

codecov Bot commented May 27, 2025 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.12%. Comparing base (9be968a) to head (c684b65).
Report is 5 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4355   +/-   ##
========================================
  Coverage    91.12%   91.12%           
========================================
  Files          636      636           
  Lines        33400    33400           
  Branches      7896     7896           
========================================
  Hits         30435    30435           
  Misses        2696     2696           
  Partials       269      269           

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

@utsabc
utsabc enabled auto-merge May 28, 2025 07:59
@utsabc
utsabc disabled auto-merge May 28, 2025 07:59
@utsabc
utsabc merged commit 6cdc683 into develop May 28, 2025
@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot mentioned this pull request Jun 5, 2025
4 of 11 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Dec 4, 2025
10 tasks
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.

7 participants