Skip to content

feat: remove batch forwarding to kits#1281

Open
alexs-mparticle wants to merge 1 commit into
developmentfrom
chore/remove-batch-forwarding
Open

feat: remove batch forwarding to kits#1281
alexs-mparticle wants to merge 1 commit into
developmentfrom
chore/remove-batch-forwarding

Conversation

@alexs-mparticle

Copy link
Copy Markdown
Collaborator

Summary

Removes the client-side sendBatchToForwarders batch-forwarding path that pushed event batches into kit processBatch. Server-side mParticle integration now handles this data, making the client-side batch-stream forwarding redundant.

This is the SDK-side slice of a broader effort to remove the redundant client-side mParticle → Rokt batch-stream pipeline (the kit and WSDK changes are tracked separately).

Changes

  • src/batchUploader.ts — drop the sendBatchToForwarders() call site in createNewBatches.
  • src/forwarders.js — remove the sendBatchToForwarders method and its now-unused batch-filtering helper imports (isBatchEventAllowed, filterBatchEventAttributes, filterBatchIdentities).
  • test/jest/batchUploader.spec.ts — remove the batch forwarding to kits describe block and its mock.
  • test/src/tests-forwarders.ts — remove the batch forwarding describe block.

Notes

  • The batch-filtering helpers in src/forwarder-utils.ts (added in feat: enable data filtering for batches #1245) are now only referenced by removed code. They are left in place for this PR to keep the diff scoped; they can be cleaned up in a follow-up.
  • Runtime-safe and independent: sendBatchToForwarders already no-op'd for kits without processBatch, so this has no hard ordering dependency on the kit/WSDK changes.

Testing

  • npm run lint — clean.
  • npm run test:jest — no new failures introduced (pre-existing failures in sdkToEventsApiConverter.ts TS error and an untracked local click-id-refactor/ dir are unrelated to this change).

Remove the client-side sendBatchToForwarders path that pushed event
batches into kit processBatch. Server-side mParticle integration now
handles this data, making the client-side batch-stream forwarding
redundant.

- Drop the sendBatchToForwarders() call site in batchUploader.ts
- Remove the sendBatchToForwarders method and its now-unused batch
  filtering helper imports from forwarders.js
- Remove the associated test coverage in batchUploader.spec.ts and
  tests-forwarders.ts
@alexs-mparticle alexs-mparticle requested a review from a team as a code owner June 17, 2026 21:21
@cursor

cursor Bot commented Jun 17, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Integrations that relied on client-side processBatch will stop receiving batched kit payloads; server-side forwarding is the intended replacement.

Overview
Removes the client-side batch → kit pipeline: event batches are no longer pushed to forwarders via processBatch after createNewBatches.

batchUploader.ts no longer calls _Forwarders.sendBatchToForwarders when a batch is built (including before onCreateBatch). forwarders.js drops sendBatchToForwarders and the batch-specific filter imports it used. Batches still go to mParticle servers and sendEventToForwarders / process() for per-event kit forwarding is unchanged.

Tests for batch forwarding in batchUploader.spec.ts and tests-forwarders.ts are removed. Batch helpers in forwarder-utils.ts may remain unused until a follow-up cleanup.

Reviewed by Cursor Bugbot for commit cc85fa1. Bugbot is set up for automated code reviews on this repo. Configure here.

@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant