-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: cm360 router batching #2836
Conversation
… into feat.transformerProxy-newContract
…ormer into feat.transformerProxy-newContract
…m/rudderlabs/rudder-transformer into feat.transformerProxy-newContract
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 across various files in the codebase primarily focus on enhancing error handling and reporting, introducing new constants and error types, and refining event processing logic. A new Changes
Assessment against linked issues
Poem
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 4
Configuration used: CodeRabbit UI
Files selected for processing (10)
- src/services/destination/postTransformation.ts (3 hunks)
- src/types/index.ts (1 hunks)
- src/v0/destinations/am/transform.js (1 hunks)
- src/v0/destinations/campaign_manager/config.js (2 hunks)
- src/v0/destinations/campaign_manager/networkHandler.js (2 hunks)
- src/v0/destinations/campaign_manager/transform.js (3 hunks)
- src/v0/util/errorTypes/index.js (1 hunks)
- src/v0/util/errorTypes/transformerProxyError.js (1 hunks)
- test/tests/facebook_conversions.test.js (1 hunks)
- test/integrations/destinations/campaign_manager/router/data.ts (2 hunks)
Files skipped from review due to trivial changes (3)
- src/types/index.ts
- src/v0/destinations/campaign_manager/config.js
- test/tests/facebook_conversions.test.js
Additional comments: 9
src/services/destination/postTransformation.ts (2)
19-25: The new
ErrorResponse
type is well-defined and should provide a structured way to handle errors within theDestinationPostTransformationService
. Ensure that the rest of the codebase is updated to use this new type where applicable.161-172: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [150-171]
The
handleDeliveryFailureEvents
method has been correctly updated to accept anErrorResponse
and to conditionally include aresponse
field if present in theerror
. This should enhance error handling and reporting.src/v0/destinations/am/transform.js (1)
- 643-649: The changes to prioritize a custom screen event name (
customScreenEv
) over the default event type (eventType
) are correctly implemented. The use ofreplaceAll
to substitute placeholders with actual values from the message is also correctly done.src/v0/destinations/campaign_manager/networkHandler.js (2)
93-145: The updates to the
responseHandler
function to handle individual events and throw aTransformerProxyError
in case of failure status are correctly implemented. The function now provides more granular error handling and response population.186-186: The
networkHandler
function is correctly updated to include the newresponseHandler
function, ensuring that the network handling capabilities are extended as intended.src/v0/util/errorTypes/index.js (1)
- 1-7: The changes to the module's exports look correct and are properly formatted. Ensure that corresponding documentation and type definitions are updated to reflect the new public interface.
src/v0/util/errorTypes/transformerProxyError.js (1)
- 6-28: The implementation of the
TransformerProxyError
class is correct and follows best practices for extending errors in JavaScript. It properly initializes default tags and allows for the specification of error type and meta tags, with validation against predefined types. Theresponse
parameter is also correctly assigned to the instance.test/integrations/destinations/campaign_manager/router/data.ts (2)
348-354: The change from
batched: false
tobatched: true
is consistent with the new batch processing behavior described in the summary. Ensure that the corresponding test cases and application logic are updated to handle this change correctly.411-417: The change from
batched: false
tobatched: true
for the second test case is also consistent with the new batch processing behavior. As with the first hunk, ensure that the corresponding test cases and application logic are updated to handle this change correctly.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #2836 +/- ##
========================================
Coverage 87.25% 87.26%
========================================
Files 775 775
Lines 28869 28921 +52
Branches 6780 6789 +9
========================================
+ Hits 25189 25237 +48
- Misses 3340 3344 +4
Partials 340 340 ☔ View full report in Codecov by Sentry. |
Kudos, SonarCloud Quality Gate passed! |
* fix: timestamp microseconds input cm360 * feat: batching in cm360 * chore: addressed comments * chore: addressed comments * fix: return aborted inside cath block * feat: update batching partial events * feat: update batching partial events * feat: update batching partial events * feat: update batching partial events * chore: removed hardcoded response * feat: added new error class * chore: develop merge * feat: handle metadata as obj * feat: handle metadata as obj * chore: removed commented code * fix: merged develop * fix: merged develop * chore: added tests for batching * chore: added tests for batching
Description of the change
Type of change
Related issues
Checklists
Development
Code review
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Documentation
Style
Tests
Chores