Repository navigation
feat(router): gate 296 delivered-with-warning behind per-workspace rollout - #7217
Merged
ItsSudip merged 11 commits intoJul 28, 2026
Conversation
🔒 Scanned for secrets using gitleaks 8.30.1 # Description The RecordFields struct read the adjustment time under the wrong JSON key (conversionAdjustedTime), while the VDM field, rETL record events, and the Transform validation all use adjustedConversionTime. As a result, update (Restate) and delete (Retract) rows shipped with an empty Adjustment Time column and Microsoft rejected them with OfflineConversionAdjustmentTimeNullOrEmpty; only inserts succeeded. Fix the struct tag to adjustedConversionTime and add tests asserting the Adjustment Time column is populated: a Transform test and a table-driven populateZipFile test that compares the full CSV output per action. ## Linear Ticket [Resolves INT-6853](https://linear.app/rudderstack/issue/INT-6853/bingads-offline-conversions-failures-in-the-sync) ## Security - [ ] The code changed/added as part of this pull request won't create any security issues with how the software is being used.
🤖 I have created a release *beep* *boop* --- ## [1.81.1](v1.81.0...v1.81.1) (2026-07-22) ### Bug Fixes * use correct JSON tag for adjustedConversionTime in bing-ads ([#7204](#7204)) ([a95807f](a95807f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7217 +/- ##
==========================================
- Coverage 79.89% 79.76% -0.14%
==========================================
Files 596 596
Lines 66713 66512 -201
==========================================
- Hits 53300 53050 -250
- Misses 10288 10333 +45
- Partials 3125 3129 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
achettyiitr
reviewed
Jul 24, 2026
# Description
Fixes a mid-run pod-death bug in concurrent ephemeral pyt test runs,
adds per-operation observability to the processor's CP-facing `Forward`
RPC (Python transformation tests), and makes the ephemeral pyt
deployer's timing knobs configurable.
### Bug fix: mid-run pod deaths under concurrent test runs
Concurrent ephemeral test runs for the same workspace carried identical
label sets, so every run's Service selected **every** run's pods. A
request forwarded through run A's Service could land on run B's
pod — which run B deletes the moment it finishes, killing A's request
mid-flight ("Subprocess died (exit code -15)").
Each run's Deployment selector, pod template labels, and Service
selector now also carry a per-run name label (`rudderstack.com/run` =
the unique `pyt-test-<suffix>` name), making concurrent runs
label-disjoint: each Service selects only its own run's pods. Covered by
a test asserting two same-workspace runs produce Services that select
their own pods and not each other's.
### New metrics
| Metric | Type | Tags | What it measures |
|---|---|---|---|
| `processor_pyt_forward_rpc_time` | timer | `op`, `route`,
`workspaceId` | The whole `Forward` RPC: deployment setup + readiness
wait + request |
| `processor_pyt_request_handle_time` | timer | `op`, `route`,
`workspaceId` | Just the HTTP request to the pyt pod |
| `processor_pyt_readiness_wait_time` | timer | `workspaceId`, `success`
| Time spent waiting for the ephemeral Deployment to report ready |
| `processor_pyt_cleanup_failure_count` | count | `workspaceId` |
Best-effort delete failures (work leaked to the reaper) |
- `route` distinguishes the three forwarding paths: `ephemeral` (fresh
pyt deployment), `production` (config-flagged workspaces), `static` (AST
ops).
- On the ephemeral route, `forward_rpc_time − request_handle_time` tells
you how much of a slow test was setup vs. actual execution; the
readiness-wait timer breaks the setup portion down further.
`success:false` readiness samples cluster at the configured timeout,
making timeouts visible.
- `processor_pyt_request_handle_time` is only emitted when a request was
actually made — a deployer failure before forwarding records no sample.
Rejected requests (invalid op/workspaceId) emit nothing.
- Histogram buckets for all three timers are registered in
`runner/buckets.go`.
- The cold-start / retry counters in `user_transformer.forwardTest` now
carry a `path` tag so retries can be attributed per pyt endpoint.
### New config keys (`Processor.pytDeployer.*`)
| Key | Default | Notes |
|---|---|---|
| `pytTestReadinessPollInterval` | `250ms` | Reloadable; was a hardcoded
constant |
| `pytTestDeleteTimeout` | `15s` | Reloadable; bounds best-effort
cleanup, was a hardcoded constant |
| `pytTestRunIDLength` | `8` | Random suffix length for ephemeral
resource names; clamped to keep `pyt-test-<suffix>` a valid DNS-1035
label |
### Implementation notes
- `pytdeployer.New` now takes `stats.Stats`; `cpservice.Service` retains
the stats handle it already received.
- The three routes in `Forward` share a single `timedForward` closure
that emits the request timer itself, so no forward ⇒ no sample, with no
extra bookkeeping.
## Linear Ticket
-
## Security
- [x] The code changed/added as part of this pull request won't create
any security issues with how the software is being used.
🤖 I have created a release *beep* *boop* --- ## [1.81.2](v1.81.1...v1.81.2) (2026-07-27) ### Bug Fixes * mid-run pod deaths under concurrent test runs ([#7212](#7212)) ([cf89256](cf89256)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
achettyiitr
approved these changes
Jul 27, 2026
🤖 I have created a release *beep* *boop* --- ## [1.81.3](v1.81.2...v1.81.3) (2026-07-27) ### Bug Fixes * apply configured client QPS and Burst settings in restConfig ([#7220](#7220)) ([ab4dbf7](ab4dbf7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
itsmihir
approved these changes
Jul 27, 2026
…llout 🔒 Scanned for secrets using gitleaks 8.28.0
- make the downgrade counter generic/reusable: rename warningStatusDowngradedStat -> statusDowngradedStat, type stats.Counter, metric router_status_downgraded_count with from/to tags (296 -> 200 here) - simplify deliveredWithWarningsEnabled to a plain OR and drop the nil guard; Setup always wires the workspace predicate INT-6636 Co-Authored-By: Claude Opus 4.8 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.28.0
Per review: build router_status_downgraded_count on demand via a func(from, to int) stats.Counter instead of a single pre-built handle, so the metric is reusable for any status-code downgrade at runtime. The gate calls it with 296 -> 200. INT-6636 Co-Authored-By: Claude Opus 4.8 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.28.0
ItsSudip
force-pushed
the
feature/int-6636-rudder-server-add-gate-logic-to-update-296-status-code-to
branch
from
July 28, 2026 06:00
070838e to
6b4f6b1
Compare
…-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
ItsSudip
deleted the
feature/int-6636-rudder-server-add-gate-logic-to-update-296-status-code-to
branch
July 28, 2026 12:09
ItsSudip
added a commit
that referenced
this pull request
Jul 30, 2026
…y-payload-for-success-scenario-in Resolve conflicts from INT-6636 (PR #7217) landing in master: - utils/types: single DeliveredWithWarningCode constant (both PRs added it) - router/handle.go: keep both storeDeliveredWithWarningPayload (this PR) and supportsDeliveredWithWarnings (INT-6636) - 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
1 task done
This was referenced Aug 3, 2026
Merged
itsmihir
pushed a commit
that referenced
this pull request
Aug 3, 2026
🤖 I have created a release *beep* *boop* --- ## [1.82.0-rc.1](v1.81.0...v1.82.0-rc.1) (2026-08-03) ### Features * **processor:** fork event processing for configured isolated destinations ([#7207](#7207)) ([6eb91b4](6eb91b4)) * **processor:** isolated destination processing pipeline ([#7202](#7202)) ([a684641](a684641)) * **router:** detect and classify transformer-proxy contract breaches (INT-6839) ([#7184](#7184)) ([c7a15a8](c7a15a8)) * **router:** gate 296 delivered-with-warning behind per-workspace rollout ([#7217](#7217)) ([1d772a1](1d772a1)) ### Bug Fixes * apply configured client QPS and Burst settings in restConfig ([#7220](#7220)) ([762bc06](762bc06)) * gcs manager allows non-service account credentials and warehouse ssl keys can escape their containing path ([#7227](#7227)) ([3e126b2](3e126b2)) * mid-run pod deaths under concurrent test runs ([#7212](#7212)) ([5279b64](5279b64)) * normalize null BingAds offline conversion fields ([#7236](#7236)) ([678f130](678f130)) * use correct JSON tag for adjustedConversionTime in bing-ads ([#7204](#7204)) ([50df0f7](50df0f7)) ### Miscellaneous * add new readme logo ([#7200](#7200)) ([ab86afd](ab86afd)) * **deps:** bump the go-deps group across 1 directory with 32 updates ([#7199](#7199)) ([0eaa833](0eaa833)) * **jobsdb:** graceful shutdown of addNewDSLoop and refreshDSListLoop ([#7210](#7210)) ([78e104c](78e104c)) * remove archiveInPreProcess processor toggle ([#7205](#7205)) ([f471b1d](f471b1d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
itsmihir
pushed a commit
that referenced
this pull request
Aug 4, 2026
🤖 I have created a release *beep* *boop* --- ## [1.82.0](v1.81.0...v1.82.0) (2026-08-03) ### Features * **processor:** fork event processing for configured isolated destinations ([#7207](#7207)) ([6eb91b4](6eb91b4)) * **processor:** isolated destination processing pipeline ([#7202](#7202)) ([a684641](a684641)) * **router:** detect and classify transformer-proxy contract breaches (INT-6839) ([#7184](#7184)) ([c7a15a8](c7a15a8)) * **router:** gate 296 delivered-with-warning behind per-workspace rollout ([#7217](#7217)) ([1d772a1](1d772a1)) ### Bug Fixes * apply configured client QPS and Burst settings in restConfig ([#7220](#7220)) ([762bc06](762bc06)) * gcs manager allows non-service account credentials and warehouse ssl keys can escape their containing path ([#7227](#7227)) ([3e126b2](3e126b2)) * mid-run pod deaths under concurrent test runs ([#7212](#7212)) ([5279b64](5279b64)) * normalize null BingAds offline conversion fields ([#7236](#7236)) ([678f130](678f130)) * use correct JSON tag for adjustedConversionTime in bing-ads ([#7204](#7204)) ([50df0f7](50df0f7)) ### Miscellaneous * add new readme logo ([#7200](#7200)) ([ab86afd](ab86afd)) * **deps:** bump the go-deps group across 1 directory with 32 updates ([#7199](#7199)) ([0eaa833](0eaa833)) * **jobsdb:** graceful shutdown of addNewDSLoop and refreshDSListLoop ([#7210](#7210)) ([78e104c](78e104c)) * remove archiveInPreProcess processor toggle ([#7205](#7205)) ([f471b1d](f471b1d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
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
This branch merged
release/1.81.xbefore being squash-merged, so this single commit carries two related pieces of the "Delivered with Warning" work:296 → 200behind a per-workspace rollout (the primary subject of this PR).INT-6636 — gate 296 → 200
rudder-transformer converts Braze's
200 + warningresponse into statusCode 296. Honouring that unconditionally would let any destination surface 296 — including via handler bugs or destinations not yet onboarded — so rudder-server downgrades296 → 200unless the feature is enabled for that job.Enablement — the OR of two inputs, both defaulting to off
supportsDeliveredWithWarningsDestinationDefinition.Config, read atSetupand refreshed by the backend-config subscriberdeliveredWithWarningsEnabledWorkspaceIDsRouter.<destType>.deliveredWithWarningsEnabledWorkspaceIDs, reloadableBoth empty ⇒ downgrade, so un-onboarded destinations fail closed.
Handle.deliveredWithWarningsEnabled(workspaceID)is the single place the OR is expressed.Changes
utils/types: addDeliveredWithWarningCode = 296.router/handle.go:supportsDeliveredWithWarnings(atomic.Bool), the workspace allow-list predicate, thedeliveredWithWarningsEnabledOR helper, andstatusDowngradedStat— afunc(from, to int) stats.Counterconstructor for the genericrouter_status_downgraded_count{destType,from,to}metric.router/handle_lifecycle.go: read the dest-def flag at both dest-def read sites, register the allow-list (mirroringorderingDisabledWorkspaceIDs), and wire the downgrade-metric constructor atSetup.router/worker.go:gateDeliveredWithWarning, called fromprepareRouterJobResponsesimmediately afterhydrateRespStatusCodes— the single funnel every delivery path (transformer proxy, direct HTTP, custom destination manager) converges on, upstream ofJobStatusT.ErrorCodeand reporting.Scope & safety — only
296is rewritten; 200/4xx/5xx pass through untouched, response bodies byte-identical. The rewrite-to-200 makes it idempotent across duplicate job IDs, sorouter_status_downgraded_countfires once per job.INT-6637 — report delivery payload for 296
On the success path,
postStatusOnResponseQreported the router input payload for every status code, so the transformed body actually sent to the destination was never available to reporting. For 296 the Events tab needs that delivery body, so this reportsdestinationJob.Messagefor 296 only and marks the statuspayloadStage=delivery.storeDeliveredWithWarningPayload— a reloadable per-destType bool, defaultfalse(opt-in), mirroringreportJobsdbPayload.respStatusCode == 296; 200, filter (298), and the failure path are unchanged.Testing —
TestDeliveredWithWarningsEnabled(enablement matrix incl. fail-closed),TestGateDeliveredWithWarning(pass-through, downgrade + counter, mixed-workspace batch, mixed-code batch, duplicate-job idempotency), andTestPostStatusOnResponseQStoreDeliveredWithWarningPayload(296 → delivery body, 200 → input, flag-off → input, filter → Filtered).go build ./...,go vet, and the fullTestRoutersuite pass.Linear Tickets
Security