Repository navigation
feat(http): support v2 event-name request overrides - #5782
shekhar-rudder merged 14 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
|
👋 I'm rudder-devbox. I opened this PR from task Mention |
|
The CI log shows |
|
Knowledge distillation completed |
|
I found two live-provider failures in the logs. Pushwoosh rejected the track batch with verdict 503 and These are external delivery/read-back failures, with no evidence of an HTTP override regression or a source fix in this branch. I made no code change; the live checks need a fresh run when the providers respond consistently. |
- Share one field-surfacing helper for destination and override templates in parse-template, and the override limit as MAX_EVENT_OVERRIDES. - Resolve override groups through one overrideAt helper and drop the groupIndices cache; recompute the cheap lookup in transformEvent. - Let groups that set no path or query params share the default request field evaluation instead of a separate isolate call. - Make recordCallMetrics an optional hook instead of a no-op needing three eslint-disable lines; drop guards zod already guarantees. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Counting inputs that fail validation is not required, so the http_event_override_events counter moves into HttpIntegration's own transformEvents, reusing the group lookup it already does. This drops the recordCallMetrics hook from the shared DestinationIntegration base and orchestrator, the second safeParse of raw config, and the defensive message checks in resolveOverrideGroup. Counters add up across the per-event dontBatch calls. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
This run failed in HubSpot test setup, before the transformer pipeline ran: The failure depends on HubSpot's external search indexing; no HS destination or test code changed on this branch, and the logs do not support an HTTP override code fix. I made no repository change. A fresh live run is needed when HubSpot search is consistent. |
Request fields were evaluated in one isolate call per override partition, and body templates in one call per request group (endpoint, headers, params, override group), so per-event path params cost one call per event. The sandbox now takes a list of jobs and returns results per job: - transformEvents evaluates every partition's request fields in one call. - Bodies for every request group, including dontBatch events, are evaluated in one call on the first batch() call; results are keyed by chunk job IDs, and a re-batched chunk falls back to its own call. A compile error in one job still fails only that job's events or chunks. For one 40-event router call with four override groups the isolate calls drop from 11 to 2, with identical router output. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…emplate parse-template now reports missing pathParams[].path / queryParams[].from as 'is required' errors instead of a 400, rejects an event listed in two override groups, and adds a pre-joined message string next to the structured errors so config-backend's save validation can pass it through without knowing the error shape. The errors array stays for the webapp. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Dedupe each group's events before the cross-group check (drops the within-group branch and a repeated error for a group listing the same event twice), destructure the parsed fields instead of copying them, spread the optional message, share MAX_OVERRIDE_EVENTS with the router schema, and correct the comment: the router picks the first group, so a later group listing the event never applies. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
The log shows I could not fix this from the workspace: the invalid commit is already pushed, and changing the PR title or adding another commit does not remove it from commitlint's range. Correcting its message requires a branch-history rewrite, which is disallowed for this branch. I made no code or PR-metadata change. |
929568d to
39d475a
Compare
Revert httpTemplateSandbox.ts to develop: the client now runs its job list inside one isolate call with a script that loops over the existing evaluateRequestFieldsInSandbox / evaluateHttpBodyInSandbox globals, so the isolate call count is unchanged and the sandbox contract is untouched. In the router, partition request fields by override index (every partition is already one job in the same isolate call), key body results by job IDs, and drop the intermediate bodies array and PayloadChunk import. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Replace the job-loop script string with typed job-list globals in the HTTP sandbox (evaluateRequestFieldsInSandbox / evaluateHttpBodyInSandbox take [expressions, events] / [template, chunks] jobs and return results per job), so isolate batching stays at one call per operation without untyped code in a script string. Remove the http_event_override_events counter and its test: override mismatches are already visible in the delivered requests, and the counter had no alert or dashboard. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
resolveOverrideGroup no longer requires type === 'track': any message whose top-level `event` is a string listed in a group uses that group. Messages without a string `event` (page/screen names, identify without an event) still use the defaults. Matching stays exact and case-sensitive, first group wins. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Build the parse-template body and override items from one field schema (overrides omit headers), type verificationFields from it instead of a Pick of the body type, surface headers and queryParams in one loop, and share the workspaceId schema with the custom-audience parse body. Field order, labels and responses are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The first batch call evaluated every request group's bodies in one isolate call, so one router batch could exceed the per-call time and memory limits that each group used to get alone; the platform error then failed the whole batch on every retry. Calls now hold at most MAX_BATCH_SIZE bodies, the most a single group could send before. The current group was also evaluated twice on that call: it was both in pendingGroups and passed in again. It is now evaluated after the pending groups, where it is normally found already. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…rides type Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The router rejected every event for a destination whose overrides had a missing name, an empty event list, no request settings, or more groups or events than the save-time caps, though it could deliver them: a group that sets nothing uses the defaults and one that lists no events matches none. The destination's config schema and parse-template enforce these at save time, so the router now only checks what it uses. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|



What are the changes introduced in this PR?
Add HTTP v2 event-name override routing, group-aware request-field evaluation and batching, and parse-template group verification. Add router, controller, helper, and component tests.
What is the related Linear task?
Resolves INT-7542
Please explain the objectives of your changes below
Ship the transformer portion before config-backend, webapp, and integrations-config expose and allowlist eventOverrides. Those dependent repository changes are required for save validation, the edit UI, and data-plane config propagation.
Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
HTTP v2 requests with configured override groups split by the first group whose events exactly match the message's top-level
event(any message type) and use its effective path, query parameters, template, and batch size. Requests without groups retain existing behavior; HTTP major 1 is unchanged.Any new dependencies introduced with this change?
None.
Any new generic utility introduced or modified. Please explain the changes.
No new metric: override mismatches show in the delivered requests (path, body, batch size). The shared
DestinationIntegrationframework is unchanged.Any technical or performance related pointers to consider with the change?
Each router call evaluates all request fields in one isolate call and all body templates in as few isolate calls as fit, each capped at 5000 bodies (the most one group can send) (plus one request-field call per dontBatch event), through typed job-list functions in
httpTemplateSandbox.ts(a deliberate change to the sandbox contract). The framework's fixed /http endpointPath and FORM single-event limit remain unchanged.Validation
npm run lint— passed.npm test -- --testPathPattern=http --no-coverage --runInBand --silent— passed, 89 tests.npm test -- --testPathPattern=eventTest --no-coverage --runInBand --silent— passed, 41 tests.npm run test:ts -- component --destination=http --runInBand --silent— passed, 21 tests.npx tsc --noEmit -p tsconfig.jsonandgit diff --check— passed.HTTPremains["headers"]and the final manifest has no diff./routerTransform(override groups, per-event path params, dontBatch, a failing group template): router output matched the previous commit exactly, with isolate calls down from 11/14/7 to 2/5/2 across the three scenarios.Developer checklist
Reviewer checklist
Adversarial self-review surfaced findings that were not auto-fixed. Each carries its disposition — please evaluate before merging.
src/controllers/eventTest.ts:186— not auto-fixed (iteration budget exhausted)🔭 Live preview
Resumable while this task is open.