Repository navigation
feat(router): report delivery payload for 296 delivered-with-warning - #7213
Merged
ItsSudip merged 3 commits intoJul 28, 2026
Conversation
1 task done
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/1.81.x #7213 +/- ##
==================================================
+ Coverage 79.68% 80.15% +0.46%
==================================================
Files 596 599 +3
Lines 66477 66833 +356
==================================================
+ Hits 52975 53572 +597
+ Misses 10368 10117 -251
- Partials 3134 3144 +10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
achettyiitr
reviewed
Jul 24, 2026
itsmihir
reviewed
Jul 27, 2026
| // For 296 (Delivered with Warning) report the transformed delivery body actually sent to | ||
| // the destination, so the warnings UX can surface it. Gated by a per-destType opt-in flag | ||
| // (default off); every other success code keeps reporting the router input payload unchanged. | ||
| responsePayload := inputPayload |
Contributor
There was a problem hiding this comment.
responsePayload -> payload
achettyiitr
approved these changes
Jul 27, 2026
itsmihir
approved these changes
Jul 27, 2026
On the success path the router reported the router input payload for every status code, so the transformed body actually sent to the destination was never available to reporting. The Events tab needs that body for 296 (Delivered with Warning) to show what was really delivered. Report destinationJob.Message instead of the input payload when the status is 296, and mark the status with payloadStage=delivery so reporting can tell the sample is the delivery body rather than the input event. Scoped strictly to 296 and gated by store296DeliveryPayload, a reloadable per-destType kill-switch (default on) that reverts payload storage without disabling the warnings feature. All other status codes are unchanged. INT-6637 Co-Authored-By: Claude Opus 4.8 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.28.0
- rename store296DeliveryPayload -> storeDeliveredWithWarningPayload (field, config key, and test) so the flag reads by intent, not status code - default the flag to false: delivery-payload reporting is opt-in per destType - rename success-branch local successPayload -> responsePayload - drop the empty-delivery-body test case: a 296 always carries a delivered body, so the removed assertion could never fail INT-6637 Co-Authored-By: Claude Opus 4.8 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.28.0
- rename success-branch local responsePayload -> payload - note why non-296 success responses omit a payloadStage marker INT-6637 Co-Authored-By: Claude Opus 4.8 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.28.0
ItsSudip
force-pushed
the
feature/int-6637-rudder-server-add-delivery-payload-for-success-scenario-in
branch
from
July 28, 2026 06:00
09137ab to
ba77781
Compare
ItsSudip
deleted the
feature/int-6637-rudder-server-add-delivery-payload-for-success-scenario-in
branch
July 28, 2026 07:24
Closed
ItsSudip
added a commit
that referenced
this pull request
Jul 28, 2026
…-gate-logic-to-update-296-status-code-to Resolve conflicts from INT-6637 (PR #7213) landing in release/1.81.x: - utils/types: single DeliveredWithWarningCode constant (both PRs added it) - router/handle.go: keep both storeDeliveredWithWarningPayload and supportsDeliveredWithWarnings fields - router/worker_test.go: keep both PRs' test functions Co-Authored-By: Claude Opus 4.8 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.28.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔒 Scanned for secrets using gitleaks 8.28.0
Description
On the router's success path,
postStatusOnResponseQreported the router input payload (JobT.EventPayload) to reporting for every status code — the success branch hardcodedpayload: inputPayload, so the transformed body actually sent to the destination was never available to reporting. (Thepayloadlocal derived fromreportJobsdbPayloadis only consumed by the failure branch.)For the 296 "Delivered with Warning" outcome, the Events tab needs to show what was actually delivered, not the input event. This PR reports
destinationJob.Messagefor 296 only.Changes
utils/types: addDeliveredWithWarningCode = 296alongside the existingFilterEventCode/SuppressEventCodeconstants, so the status code isn't a magic number.router/worker.go: in the success branch ofpostStatusOnResponseQ, reportdestinationJob.Messageinstead of the input payload when the status is 296, and setpayloadStage=deliveryon the status so reporting can tell the sample is the delivery body rather than the input event.router/handle.go,router/handle_lifecycle.go: addstore296DeliveryPayload, a reloadable per-destType bool (defaulttrue) mirroring the existingreportJobsdbPayload. Flipping it off reverts delivery-payload reporting without disabling the warnings feature — the warning status and the destination's response body are unaffected.Scope
The behaviour change is strictly limited to
respStatusCode == 296. 200, the filter code (298), and the failure path are unchanged — the new value is computed in a separatesuccessPayloadlocal rather than reusing thereportJobsdbPayload-drivenpayload, so 200-success behaviour is untouched even when that flag is false.Testing
New
TestPostStatusOnResponseQ296DeliveryPayloadcovers: 296 → delivery body +payloadStage=delivery; 200 → input payload with no marker; 296 with the kill-switch off → input payload; filter code → stillFilteredwith input payload; empty delivery body on 296 → empty, no panic.go build ./...,go vet, and the fullTestRoutersuite pass.Linear Ticket
https://linear.app/rudderstack/issue/INT-6637/rudder-server-add-delivery-payload-for-success-scenario-in-reporting
Security