Repository navigation
chore: braze feature env cleanup - #4581
Conversation
Summary by CodeRabbit
Impact:
WalkthroughRemoved the environment toggle for Braze identify-resolution batching. Deleted shouldBatchBrazeIdentifyResolution from config and its import/use in transform. The router now always passes identifyCallsArray to simpleProcessRouterDestFunc. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Router as Braze Router
participant SPF as simpleProcessRouterDestFunc
rect rgb(240,240,255)
note over Router: Before (conditional batching)
Router->>Router: Read env BRAZE_BATCH_IDENTIFY_RESOLUTION
alt env === 'true'
Router->>SPF: call(..., { identifyCallsArray })
else env !== 'true'
Router->>SPF: call(..., { identifyCallsArray: undefined })
end
end
rect rgb(240,255,240)
note over Router: After (unconditional batching)
Router->>SPF: call(..., { identifyCallsArray })
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
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. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/v0/destinations/braze/transform.js (2)
567-569: Consider graceful degradation if batched identify failsRight now, a failure in processBatchedIdentify will bubble up and can fail the entire router batch post-transformation. If that’s the desired behavior, ignore this. Otherwise, consider catching and logging to avoid dropping already-processed event responses, especially during transient Braze outages.
You could wrap this block:
- if (identifyCallsArray && identifyCallsArray.length > 0) { - await processBatchedIdentify(identifyCallsArray, destination.ID); - } + if (identifyCallsArray && identifyCallsArray.length > 0) { + try { + await processBatchedIdentify(identifyCallsArray, destination.ID); + } catch (err) { + logger.error('Braze batched identify failed', err); + // Optionally: emit a metric or enrich reqMetadata; decide whether to rethrow based on policy. + } + }
571-573: Nit: fix variable name typo (readability)Minor spelling fix to improve readability.
- const allTransfomredEvents = lodash.flatMap(output); - return processBatch(allTransfomredEvents); + const allTransformedEvents = lodash.flatMap(output); + return processBatch(allTransformedEvents);
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
src/v0/destinations/braze/config.js(0 hunks)src/v0/destinations/braze/transform.js(1 hunks)
💤 Files with no reviewable changes (1)
- src/v0/destinations/braze/config.js
🧰 Additional context used
📓 Path-based instructions (1)
**/*.js
⚙️ CodeRabbit configuration file
Focus on ESLint errors (max 3) and warnings (max 5).
Files:
src/v0/destinations/braze/transform.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
- GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image ARM64
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image ARM64
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Code Coverage
- GitHub Check: UT Tests
- GitHub Check: test_and_publish
- GitHub Check: Analyze (go)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
src/v0/destinations/braze/transform.js (1)
554-562: Review OK: identifyCallsArray routing validated
- Verified that the deprecated flag
shouldBatchBrazeIdentifyResolutionhas been fully removed—no references remain.- Confirmed both
simpleProcessRouterDestSync(src/v0/util/index.js:1849) andsimpleProcessRouterDest(src/v0/util/index.js:1820) accept aprocessParamsargument and forward it to the providedsingleTfFunc.- Confirmed
process()(src/v0/destinations/braze/transform.js:450) correctly readsidentifyCallsArrayfromprocessParams(used at line 503) and that batched identity calls are handled after awaiting all router responses.- Passing the shared
identifyCallsArrayacross asynchronously awaited router invocations is safe under Node’s single-threaded execution model.Approving these changes—no further action needed.
|
Allure Test reports for this run are available at:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4581 +/- ##
===========================================
- Coverage 91.81% 91.81% -0.01%
===========================================
Files 642 642
Lines 33930 33928 -2
Branches 8031 8040 +9
===========================================
- Hits 31152 31150 -2
Misses 2548 2548
Partials 230 230 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|



What are the changes introduced in this PR?
Braze alias identity batching feature was behind an ENV based feature flag. This PR cleans up that ENV now that the feature is stable.
What is the related Linear task?
Resolves INT-3922
Please explain the objectives of your changes below
Post feature release feature flag clean up.
Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
No
Any new dependencies introduced with this change?
No
Any new generic utility introduced or modified. Please explain the changes.
No
Any technical or performance related pointers to consider with the change?
No
@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.