Skip to content

feat(router): gate 296 delivered-with-warning behind per-workspace rollout - #7217

Merged
ItsSudip merged 11 commits into
masterfrom
feature/int-6636-rudder-server-add-gate-logic-to-update-296-status-code-to
Jul 28, 2026
Merged

ItsSudip merged 11 commits into
masterfrom
feature/int-6636-rudder-server-add-gate-logic-to-update-296-status-code-to

Conversation

@ItsSudip

@ItsSudip ItsSudip commented Jul 24, 2026 •

Copy link
Copy Markdown
Member

🔒 Scanned for secrets using gitleaks 8.28.0

Description

This branch merged release/1.81.x before being squash-merged, so this single commit carries two related pieces of the "Delivered with Warning" work:

INT-6636 — gate 296 → 200

rudder-transformer converts Braze's 200 + warning response into statusCode 296. Honouring that unconditionally would let any destination surface 296 — including via handler bugs or destinations not yet onboarded — so rudder-server downgrades 296 → 200 unless the feature is enabled for that job.

Enablement — the OR of two inputs, both defaulting to off

Input Where Purpose
supportsDeliveredWithWarnings DestinationDefinition.Config, read at Setup and refreshed by the backend-config subscriber GA switch — enables the feature for every workspace at once
deliveredWithWarningsEnabledWorkspaceIDs Router.<destType>.deliveredWithWarningsEnabledWorkspaceIDs, reloadable Controlled-rollout allow-list — enables selected workspaces ahead of GA

Both empty ⇒ downgrade, so un-onboarded destinations fail closed. Handle.deliveredWithWarningsEnabled(workspaceID) is the single place the OR is expressed.

Changes

  • utils/types: add DeliveredWithWarningCode = 296.
  • router/handle.go: supportsDeliveredWithWarnings (atomic.Bool), the workspace allow-list predicate, the deliveredWithWarningsEnabled OR helper, and statusDowngradedStat — a func(from, to int) stats.Counter constructor for the generic router_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 (mirroring orderingDisabledWorkspaceIDs), and wire the downgrade-metric constructor at Setup.
  • router/worker.go: gateDeliveredWithWarning, called from prepareRouterJobResponses immediately after hydrateRespStatusCodes — the single funnel every delivery path (transformer proxy, direct HTTP, custom destination manager) converges on, upstream of JobStatusT.ErrorCode and reporting.

Scope & safety — only 296 is rewritten; 200/4xx/5xx pass through untouched, response bodies byte-identical. The rewrite-to-200 makes it idempotent across duplicate job IDs, so router_status_downgraded_count fires once per job.

INT-6637 — report delivery payload for 296

On the success path, postStatusOnResponseQ reported 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 reports destinationJob.Message for 296 only and marks the status payloadStage=delivery.

  • Gated by storeDeliveredWithWarningPayload — a reloadable per-destType bool, default false (opt-in), mirroring reportJobsdbPayload.
  • Strictly limited to 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), and TestPostStatusOnResponseQStoreDeliveredWithWarningPayload (296 → delivery body, 200 → input, flag-off → input, filter → Filtered). go build ./..., go vet, and the full TestRouter suite pass.

Linear Tickets

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

maheshkutty and others added 2 commits July 22, 2026 16:22
🔒 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

codecov Bot commented Jul 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.96296% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.76%. Comparing base (896fa37) to head (e47d3f7).
⚠️ Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
router/handle_lifecycle.go 14.28% 8 Missing and 4 partials ⚠️
...l/transformer/user_transformer/user_transformer.go 66.66% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread router/handle.go Resolved
Comment thread router/handle_lifecycle.go Resolved
Comment thread router/handle.go Resolved
Comment thread router/handle.go Resolved
mihir20 and others added 2 commits July 27, 2026 12:46
# 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>
@ItsSudip ItsSudip self-assigned this Jul 27, 2026
mihir20 and others added 2 commits July 27, 2026 16:41
)

# Description

apply configured client QPS and Burst settings in restConfig

## 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.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>
ItsSudip added 3 commits July 28, 2026 11:29
…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
ItsSudip force-pushed the feature/int-6636-rudder-server-add-gate-logic-to-update-296-status-code-to branch from 070838e to 6b4f6b1 Compare July 28, 2026 06:00
@ItsSudip
ItsSudip changed the base branch from master to release/1.81.x July 28, 2026 06:00
ItsSudip and others added 2 commits July 28, 2026 12:54
…-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
ItsSudip changed the base branch from release/1.81.x to master July 28, 2026 08:01
@ItsSudip
ItsSudip merged commit 1d772a1 into master Jul 28, 2026
74 checks passed
@ItsSudip
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
This was referenced Aug 3, 2026
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>
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.

5 participants