Skip to content

feat: carry integration version on DestinationT to the transformer - #7125

Merged
saikumarrs merged 2 commits into
masterfrom
feature/int-6484-rudder-server-carry-version-on-destinationt
Jun 29, 2026
Merged

saikumarrs merged 2 commits into
masterfrom
feature/int-6484-rudder-server-carry-version-on-destinationt

Conversation

@saikumarrs

@saikumarrs saikumarrs commented Jun 25, 2026 •

Copy link
Copy Markdown
Member

What

Adds an integration major version to DestinationT and carries it through to the transformer on every path a destination reaches it.

  • backend-config: new DestinationT.Version int tagged json:"version" (no omitempty, always emitted). rudder-server only carries it — never interprets it.
  • Rides along for free on whole-destination embed paths: processor TransformerEvent, router RouterJobT/DestinationJobT, and the compacted variants.
  • The delivery proxy (slimmed payload) carries it explicitly via ProxyRequestPayload.DestinationVersion / ProxyRequestPayloadV0, populated in router/worker.go.

Testing

  • backend-config: round-trip for single-workspace + namespace unmarshal paths, case-insensitive key, missing→0, and always-present number marshalling.
  • Presence in marshalled TransformerEvent (golden goldenUtMirrorClientEvents.json, now v1) and proxy payload (v0 + v1 adapters).

INT-6484

Add Version (int, json tag "version", no omitempty) to DestinationT so the integration major rides along to the transformer on every whole-destination embed path (processor TransformerEvent, router RouterJobT/DestinationJobT, compacted variants). The slimmed delivery proxy payload carries it explicitly via ProxyRequestPayload.DestinationVersion, populated in router/worker.go.

rudder-server only carries the value, never interprets it; a destination without version deserializes to 0 (treated as v1 downstream). Serialized as a JSON number per the INT-6484 decision, overriding the original string design. The reduced user-transformation payload is intentionally excluded.

INT-6484

Scanned-by: gitleaks 8.30.0
@codecov

codecov Bot commented Jun 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.98%. Comparing base (9d5c58a) to head (c8ad90d).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7125      +/-   ##
==========================================
+ Coverage   79.88%   79.98%   +0.10%     
==========================================
  Files         584      584              
  Lines       65493    65483      -10     
==========================================
+ Hits        52319    52377      +58     
+ Misses      10053    10012      -41     
+ Partials     3121     3094      -27     

☔ 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.

@saikumarrs

Copy link
Copy Markdown
Member Author

Transformer counterpart: rudderlabs/rudder-transformer#5318

Reads destination.version (transform/router) and the top-level destinationVersion (proxy) and dispatches on the integration major in-file. Pairs with this PR's DestinationT.Version plumbing. (INT-6495 / INT-6492)

@ktgowtham
ktgowtham requested a review from atzoum June 26, 2026 07:28
saikumarrs added a commit to rudderlabs/rudder-transformer that referenced this pull request Jun 26, 2026
…est_destination (#5318)

## What

The data-plane half of integration definition-versioning in the
transformer — carry the **integration major** on the destination and
dispatch on it, plus a dev-only destination that exercises it
end-to-end. No production destination grows a real per-major branch
here.

### INT-6495 — version on the `Destination` type + dispatch idiom
- `version?: number` on the `Destination` type (mirrors Go
`DestinationT.Version`). Optional because it can be undefined — `0` /
`undefined` / `1` all dispatch as v1 (`Number(undefined)` is `NaN`), so
existing destinations behave identically.
- `destinationVersion?: number` received on the proxy/dataDelivery
payload (`ProxyV0/V1Request` + zod schemas) — the proxy route carries no
destination object, so the major arrives as a sibling field.
- Dispatch idiom documented in `CONTRIBUTING.md` and the
`code-structure` Claude skill (in-file branch by default; sibling-module
escalation; never route majors through `getDestHandler`).

### INT-6492 — dev-only `test_destination` (v1 only)
- `src/v0/destinations/test_destination/` dispatches on
`Number(destination.version)` in `transform`/`processRouterDest` and on
`destinationVersion` in `networkHandler`; `major >= 2` throws
not-implemented (only v1 is built).
- Processor / router / dataDelivery integration fixtures (v1,
no-version, v2-rejection) + a co-located unit test.
- Router capability registered in `features.ts`. Clearly labelled
**"DEV-ONLY — NOT A REAL DESTINATION"**; uses the reserved `.invalid`
endpoint. Control-plane exposure is gated to dev only (other repos).

## Out of scope
- No real per-major branch for any production destination (rollout
milestone).
- `test_destination` v2 path — stubbed to throw; only v1 implemented.

## Testing
- `test_destination` unit 4/4 · component
(processor/router/dataDelivery) 7/7
- `webhook` smoke 23/23 · `misc` (getFeatures) 2/2 — no regression
- Full pre-commit suite (`test:ts` + `test:js` + lint) green.

## References
- Linear: [INT-6495](https://linear.app/rudderstack/issue/INT-6495)
(version on the `Destination` type + dispatch idiom) ·
[INT-6492](https://linear.app/rudderstack/issue/INT-6492) (dev-only
`test_destination`)
- Paired (data plane sender): rudderlabs/rudder-server#7125 — carries
`version` on `DestinationT`; sends `destination.version`
(transform/router) + top-level `destinationVersion` (proxy).
- Stacked follow-up: #5319 —
[INT-6576](https://linear.app/rudderstack/issue/INT-6576) `destVersion`
metric label.
saikumarrs added a commit to rudderlabs/rudder-transformer that referenced this pull request Jun 26, 2026
…#5319)

## What

Low-cardinality observability follow-up (INT-6576) — emit the
integration major as a `destVersion` label on the per-destination
transform metrics, so adoption / per-version error & latency /
retirement-readiness are sliceable by major. Label-wiring only, no
data-path change.

- `destVersion` label on `dest_transform_input_events` +
`dest_transform_output_events` (processor + router paths), read from
`events[0]?.destination?.version`.
- Registered in the prometheus labelset (`src/util/prometheus.js`) —
prom-client rejects labels absent from a metric's initial labelset.

## Scope
Scoped to the two transform-event histograms (where
`destination.version` is in scope in the controller). The other
candidates were deliberately left out:
`event_transform_success`/`failure` and `outgoing_request_*` need
cross-cutting threading through
`getTags`/`MetaTransferObject`/`network.js`; `tf_proxy_*`,
`transformer_proxy_*`, `dest_transform_requests`, and
`v0_transformation_time` are defined but never emitted.

## Stacked on
Built on top of **#5318**
([INT-6495](https://linear.app/rudderstack/issue/INT-6495) — `version?`
on the `Destination` type). Base branch is that PR's branch; this metric
reads the field it adds. **Review/merge #5318 first.**

## Testing
- `test_destination` component run: histograms emit with `destVersion`;
prom-client raises no "label not in initial labelset" error. `webhook`
smoke 23/23 (no regression).
- Full pre-commit suite (`test:ts` + `test:js` + lint) green.

## References
- Linear: [INT-6576](https://linear.app/rudderstack/issue/INT-6576) —
`version` metric label on per-destination metrics.
- Stacked on: #5318
([INT-6495](https://linear.app/rudderstack/issue/INT-6495) /
[INT-6492](https://linear.app/rudderstack/issue/INT-6492)).
- Data source: rudderlabs/rudder-server#7125 — provides
`destination.version`.
Comment thread router/transformer/transformer.go Resolved
Per review feedback, add omitempty to DestinationT.Version and both proxy
DestinationVersion fields so a v1-default (zero) version is not sent over the
wire. Absent and 0 both mean v1, so this is lossless; the transformer treats a
missing version as v1.

INT-6484

Scanned-by: gitleaks 8.30.0
@saikumarrs
saikumarrs requested a review from atzoum June 29, 2026 06:52
@saikumarrs
saikumarrs merged commit 9e6ee1c into master Jun 29, 2026
110 of 113 checks passed
@saikumarrs
saikumarrs deleted the feature/int-6484-rudder-server-carry-version-on-destinationt branch June 29, 2026 11:01
atzoum added a commit that referenced this pull request Jun 30, 2026
# Description

Syncing release v1.79.0 to main branch

**WARNING: Do NOT rewrite git history and ALWAYS use a "Merge Commit"
for merging!**

**↓↓ Please review and edit commit overrides before merging ↓↓**

BEGIN_COMMIT_OVERRIDE
feat: carry integration version on DestinationT to the transformer
(#7125)
END_COMMIT_OVERRIDE
This was referenced Jul 6, 2026
itsmihir pushed a commit that referenced this pull request Jul 6, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.80.0-rc.1](v1.79.0...v1.80.0-rc.1)
(2026-07-06)


### Features

* add control-plane connection management for processor
([#7126](#7126))
([ea6ca00](ea6ca00))
* carry integration version on DestinationT to the transformer
([#7125](#7125))
([421c613](421c613))
* implement Forward RPC for control-plane requests to workspace pyt
transformers
([#7143](#7143))
([8a704cf](8a704cf))
* implement Kubernetes deployment scaler for workspace replica
management
([#7123](#7123))
([84fc747](84fc747))
* monthly active records (MAR) metering pipeline
([#7119](#7119))
([d1df486](d1df486))


### Bug Fixes

* **router:** transformer returning response with empty metadata array
causes server to panic
([#7144](#7144))
([d6a4dbc](d6a4dbc))


### Miscellaneous

* enable compression for google pubsub
([#7137](#7137))
([11c9ab8](11c9ab8))

---
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 Jul 7, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.80.0](v1.79.0...v1.80.0)
(2026-07-06)


### Features

* add control-plane connection management for processor
([#7126](#7126))
([ea6ca00](ea6ca00))
* carry integration version on DestinationT to the transformer
([#7125](#7125))
([421c613](421c613))
* implement Forward RPC for control-plane requests to workspace pyt
transformers
([#7143](#7143))
([8a704cf](8a704cf))
* implement Kubernetes deployment scaler for workspace replica
management
([#7123](#7123))
([84fc747](84fc747))
* monthly active records (MAR) metering pipeline
([#7119](#7119))
([d1df486](d1df486))


### Bug Fixes

* **router:** transformer returning response with empty metadata array
causes server to panic
([#7144](#7144))
([d6a4dbc](d6a4dbc))


### Miscellaneous

* enable compression for google pubsub
([#7137](#7137))
([11c9ab8](11c9ab8))

---
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.

3 participants