Repository navigation
fix: deep freeze in compaction middleware - #4396
Conversation
Summary by CodeRabbit
Summary by CodeRabbit
WalkthroughThis update refactors how destination configuration objects are frozen, introduces new test behaviors for mutating or replacing configuration in the rudder_test destination, and generalizes the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Middleware
participant DestinationHandler
Client->>Middleware: Send event with destination
Middleware->>Middleware: deepFreezeProperty(destination, 'Config')
Middleware->>DestinationHandler: Pass destination with frozen Config
DestinationHandler->>DestinationHandler: Process event (may attempt mutation/replacement)
DestinationHandler-->>Client: Return processed result or error
Suggestions for Improvement
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📥 CommitsReviewing files that changed from the base of the PR and between 957dce8b220e783d81e40c039bd326a13d54cd30 and 71c33b2. ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (6)
⏰ Context from checks skipped due to timeout of 90000ms (9)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
Documentation and Community
|
|
Allure Test reports for this run are available at:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4396 +/- ##
===========================================
- Coverage 91.13% 91.13% -0.01%
===========================================
Files 638 638
Lines 33476 33475 -1
Branches 7904 7904
===========================================
- Hits 30509 30508 -1
Misses 2728 2728
Partials 239 239 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Add test behaviors in rudder_test transform to mutate and replace destination config - Add router and processor component tests for both property mutation and config reference replacement in compacted payload flow - Assert correct error handling and status codes when mutation is attempted on frozen config - Ensures immutability of config is enforced and covered in both flows - Remove unneccessary clonedeep in router transform flow by fixing code
957dce8 to
71c33b2
Compare
|
Allure Test reports for this run are available at:
|
|
vinayteki95
left a comment
There was a problem hiding this comment.
It has unrelated rudder_test destination changes as well. Is this intended?
I reviewed it and approved it.
they are not unrelated, I had to modify rudder_test to test the exception thrown by deepFreeze |



What are the changes introduced in this PR?
cloneDeepin router transform flow for efficiency.deepFreezePropertyinstead ofdeepFreeze.@rudderstack/integrations-libto^0.2.36.What is the related Linear task?
Resolves INT-3634
Please explain the objectives of your changes below
Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
Any new dependencies introduced with this change?
@rudderstack/integrations-libto^0.2.36.Any new generic utility introduced or modified. Please explain the changes.
deepFreezePropertyutility for targeted deep freezing.Any technical or performance related pointers to consider with the change?
@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.