Repository navigation
feat: cm360 transformerproxy V1 features.json update - #2848
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #2848 +/- ##
===========================================
+ Coverage 87.17% 87.25% +0.07%
===========================================
Files 772 775 +3
Lines 28805 28865 +60
Branches 6767 6780 +13
===========================================
+ Hits 25112 25185 +73
+ Misses 3350 3340 -10
+ Partials 343 340 -3 ☔ View full report in Codecov by Sentry. |
|
Important Auto Review SkippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the WalkthroughThe changes involve introducing versioning to network handlers and destination services, allowing for different versions of network interactions and data processing. This includes updates to method signatures to accommodate a new Changes
Assessment against linked issues
Poem
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Review Status
Actionable comments generated: 10
Configuration used: CodeRabbit UI
Files ignored due to filter (1)
- src/features.json
Files selected for processing (8)
- src/adapters/networkHandlerFactory.js (2 hunks)
- src/adapters/networkHandlerFactory.test.js (1 hunks)
- src/controllers/delivery.ts (1 hunks)
- src/interfaces/DestinationService.ts (1 hunks)
- src/routes/utils/constants.js (2 hunks)
- src/services/comparator.ts (1 hunks)
- src/services/destination/nativeIntegration.ts (1 hunks)
- src/v1/destinations/campaign_manager/networkHandler.js (1 hunks)
Additional comments: 9
src/controllers/delivery.ts (1)
- 16-27: The changes to the
deliverToDestinationmethod, including the addition of theversionparameter and its use in theintegrationService.delivercall, are correctly implemented.src/routes/utils/constants.js (3)
1-1: The addition of 'v1' to the
SUPPORTED_VERSIONSarray is consistent with the pull request's goal to introduce a new version endpoint for the transformer proxy.11-12: The addition of a comma after the 'sources' property in the
CHANNELSobject is a minor syntax change that may indicate preparation for future additions to this object.2-2: Verify whether the
API_VERSIONconstant is intended to remain '2' or if it should be updated to reflect the new versioning changes.src/services/comparator.ts (2)
379-379: The error log statement in the
delivermethod suggests that the live compare test is not implemented for the delivery routine. Verify if this is a placeholder for future implementation or if it should be removed to avoid confusion.368-380: The
delivermethod does not include comparison logic like the other transformation methods. If comparison logic is required for thedelivermethod, consider implementing it to maintain consistency with the other methods.src/services/destination/nativeIntegration.ts (1)
- 172-181: The changes to the
delivermethod correctly incorporate the newversionparameter and use it to obtain the appropriate network handler. Ensure that all invocations of this method are updated to pass theversionargument.src/v1/destinations/campaign_manager/networkHandler.js (2)
56-108: The
responseHandlerfunction's error handling and response transformation logic appears to be correctly implemented.110-115: The
networkHandlerfunction correctly assigns methods to the instance of the object.
There was a problem hiding this comment.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files ignored due to filter (2)
- test/tests/data/campaign_manager_proxy_input.json
- test/tests/data/campaign_manager_proxy_output.json
Files selected for processing (2)
- test/integrations/destinations/campaign_manager/dataDelivery/data.ts (1 hunks)
- test/integrations/destinations/campaign_manager/network.ts (1 hunks)
Files skipped from review due to trivial changes (1)
- test/integrations/destinations/campaign_manager/network.ts
Additional comments: 3
test/integrations/destinations/campaign_manager/dataDelivery/data.ts (3)
7-11: There seems to be a potential discrepancy between the 'version' field in the data object (set to 'v0') and the 'version' field within the request body (set to '1'). Please verify if this is intentional and consistent with the versioning system used.
188-189: The 'description' field for the third data object is identical to the second one ('Failure insert request'). If this is not a copy-paste error, consider providing a more descriptive message that differentiates the two test cases.
150-151: The 'statTags' field includes 'destinationId' and 'workspaceId' with the value 'Non-determininable'. If these are placeholders, they should be replaced with actual values or removed if not applicable to the test case.
Also applies to: 251-252
|
Kudos, SonarCloud Quality Gate passed! |
* feat: cm360 transformerproxy, V1 features.json update * feat: add support for both v0,v1 in handler for old server support * fix: addressed comments * chore: added tests for V1 too








Description of the change
Approach:
Updated the handler map to have both v0, v1 ... based on version returning corresponding handler in networkFactory method
// handles = {
// v0: {
// dest: handler
// },
// v1: {
// dest: handler
// },
// generic: GenericNetworkHandler,
// }
Type of change
Related issues
Checklists
Development
Code review
Summary by CodeRabbit
New Features
Enhancements
Bug Fixes
Tests