Skip to content

feat: support compacted destination transformation payloads - #5667

Merged
atzoum merged 4 commits into
masterfrom
feat.dtransformCompaction
Apr 10, 2025
Merged

atzoum merged 4 commits into
masterfrom
feat.dtransformCompaction

Conversation

@atzoum

@atzoum atzoum commented Mar 31, 2025 •

Copy link
Copy Markdown
Contributor

Description

Related to rudderlabs/rudder-transformer#4220

From now on, as long as transformer service supports it and the relevant feature flag is enabled, rudder-server is going to send compacted transformation request payloads by making use of lookup tables instead of repeating the same destination and connection information in every event.

The feature can be enabled through the following configuration options

Transformer:
  compactionEnabled: true # enables compaction in both processor and router as long as the remote transformer service supports it
  forceCompactionEnabled: true # enables compaction in both processor and router regardless if the remote transformer service supports it or not
Router:
  DestinationTransformer:
    compactionEnabled: true # enables compaction in router as long as the remote transformer service supports it
    forceCompactionEnabled: true # enables compaction in router regardless if the remote transformer service supports it or not
Processor:
  DestinationTransformer:
    compactionEnabled: true # enables it in processor as long as the remote transformer service supports it
    forceCompactionEnabled: true # enables compaction in processor regardless if the remote transformer service supports it or not

All three transformer endpoints are being tested for proper handling of compacted payloads through integration tests:

  • POST /:version/destinations/:destination in processor_isolation_test.go using a WEBHOOK destination
  • POST /routerTransform in router_isolation_test.go using a WEBHOOK destination
  • POST /batch in kafka_batching_test.go using a KAFKA destination

We are making use of RSERVER_TRANSFORMER_FORCE_COMPACTION_ENABLED flag in our tests for ensuring that the rudder-transformer container we are using is indeed able to understand compacted payloads.

Note: tests are expected to fail until the required feature gets released in rudder-transformer. (update: all ✅ now)

Additional items

  • Trimming down user transformation payloads by stripping out empty metadata fields and zero destination and connection structs

Linear Ticket

Resolves PIPE-1992

Security

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

@atzoum
atzoum force-pushed the feat.dtransformCompaction branch from 8cd80b8 to 8a9d792 Compare April 1, 2025 06:36
@atzoum
atzoum force-pushed the feat.dtransformCompaction branch 2 times, most recently from 99dae96 to 2e18acd Compare April 8, 2025 08:29
@atzoum
atzoum force-pushed the feat.dtransformCompaction branch 3 times, most recently from 19c0271 to df58b6e Compare April 9, 2025 05:11
@atzoum atzoum changed the title [WIP] feat: support compacted destination transformation payloads feat: support compacted destination transformation payloads Apr 9, 2025
@atzoum
atzoum marked this pull request as ready for review April 9, 2025 09:52
@atzoum
atzoum force-pushed the feat.dtransformCompaction branch from df58b6e to 1ebe6d3 Compare April 9, 2025 09:52
@atzoum
atzoum force-pushed the feat.dtransformCompaction branch 6 times, most recently from b80a04b to 5ffe1f9 Compare April 10, 2025 06:52
@codecov

codecov Bot commented Apr 10, 2025 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 86.63366% with 27 lines in your changes missing coverage. Please review.

Project coverage is 77.02%. Comparing base (2435cba) to head (d4e23aa).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
testhelper/transformertest/builder.go 65.90% 11 Missing and 4 partials ⚠️
...destination_transformer/destination_transformer.go 88.23% 4 Missing and 2 partials ⚠️
...l/transformer/user_transformer/user_transformer.go 73.91% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5667      +/-   ##
==========================================
+ Coverage   76.95%   77.02%   +0.07%     
==========================================
  Files         487      487              
  Lines       66041    66186     +145     
==========================================
+ Hits        50823    50982     +159     
+ Misses      12456    12448       -8     
+ Partials     2762     2756       -6     

☔ View full report in Codecov by Sentry.
📢 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.

@atzoum
atzoum force-pushed the feat.dtransformCompaction branch from 5ffe1f9 to 8322e27 Compare April 10, 2025 09:05
Comment thread router/transformer/transformer.go Resolved
@atzoum
atzoum requested a review from cisse21 April 10, 2025 12:18
@atzoum
atzoum merged commit 15ccaac into master Apr 10, 2025
@atzoum
atzoum deleted the feat.dtransformCompaction branch April 10, 2025 13:10
This was referenced Apr 14, 2025
Sidddddarth pushed a commit that referenced this pull request Apr 14, 2025
🤖 I have created a release *beep* *boop*
---


##
[1.47.0-rc.1](v1.46.0...v1.47.0-rc.1)
(2025-04-14)


### Features

* add a common package for validation
([#5579](#5579))
([f2cee9d](f2cee9d))
* add support for table size metadata in warehouse /v1/process API
([#5705](#5705))
([cbebd23](cbebd23))
* add tracer support to partition and pipeline workers
([#5668](#5668))
([a38b4f5](a38b4f5))
* add upload_id column in wh_load_files table
([#5682](#5682))
([9def123](9def123))
* embedded google pubsub transformer
([#5525](#5525))
([dcdb681](dcdb681))
* embedded kafka transformer
([#5575](#5575))
([224228b](224228b))
* **jobsdb:** introduce jobMinRowsLeftMigrateThres
([#5704](#5704))
([b1f4ce0](b1f4ce0))
* **processor:** concurrent store steps
([#5687](#5687))
([2435cba](2435cba))
* support compacted destination transformation payloads
([#5667](#5667))
([15ccaac](15ccaac))


### Bug Fixes

* handle consent management filtering per connection
([#5718](#5718))
([69f1baf](69f1baf))
* handling isBlank for nested and empty arrays
([#5714](#5714))
([69f1baf](69f1baf))
* kafka message batching applies to Confluent Cloud and Azure Event Hub
([#5699](#5699))
([7d8cdb9](7d8cdb9))
* **router:** applying excessive read pressure to the database when jobs
are being throttled
([#5685](#5685))
([69f1baf](69f1baf))
* **router:** applying excessive read pressure to the database when jobs
are being throttled
([#5685](#5685))
([0b83028](0b83028))
* **router:** applying excessive read pressure to the database when jobs
are being throttled
([#5685](#5685))
([f0e8b75](f0e8b75))
* snowflake fetch schema privileges
([#5692](#5692))
([69f1baf](69f1baf))
* snowflake fetch schema privileges
([#5692](#5692))
([0b83028](0b83028))
* warehouse transformations comparisions
([#5694](#5694))
([69f1baf](69f1baf))
* warehouse transformations comparisions
([#5694](#5694))
([0b83028](0b83028))
* warehouse transformations ordering for comparison
([#5670](#5670))
([28ba26e](28ba26e))
* warehouse transformations ordering while processing properties
([#5713](#5713))
([69f1baf](69f1baf))
* warehouse transformations valid timestamp formats and log file path
([#5707](#5707))
([69f1baf](69f1baf))


### Miscellaneous

* add sourceDef field to stats and related structures for enhanced
observability
([#5660](#5660))
([632bfca](632bfca))
* avoid using reflections for warehouse transformations
([#5673](#5673))
([3290794](3290794))
* clean up tests because transformer defaults to v2
([#5712](#5712))
([e9b96cf](e9b96cf))
* datetime detection
([#5675](#5675))
([1c53807](1c53807))
* default webhook contract version to v2
([#5659](#5659))
([7dbf5d8](7dbf5d8))
* **deps:** bump beatlabs/delete-old-branches-action from 0.0.10 to
0.0.11
([#5620](#5620))
([451c593](451c593))
* **deps:** bump google.golang.org/api from 0.227.0 to 0.228.0 in the
frequent group
([#5708](#5708))
([cbce33a](cbce33a))
* **deps:** bump the frequent group across 1 directory with 3 updates
([#5702](#5702))
([00a1bc5](00a1bc5))
* **deps:** bump the go-deps group across 1 directory with 12 updates
([#5698](#5698))
([4c3e4ff](4c3e4ff))
* **deps:** bump the go-deps group with 2 updates
([#5701](#5701))
([27c71e6](27c71e6))
* **deps:** bump the go-deps group with 2 updates
([#5709](#5709))
([1335fa6](1335fa6))
* **deps:** bump the go-deps group with 2 updates
([#5719](#5719))
([d3ab3e6](d3ab3e6))
* remove explicit schema synchronization in upload job
([#5672](#5672))
([462db8a](462db8a))
* remove unused schema v1 code
([#5661](#5661))
([3290794](3290794))
* snowflake integrations tests to use keypair instead of password
([#5684](#5684))
([3ed7a11](3ed7a11))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
shekhar-rudder pushed a commit that referenced this pull request Apr 14, 2025
🤖 I have created a release *beep* *boop*
---


##
[1.47.0-rc.2](v1.46.0...v1.47.0-rc.2)
(2025-04-14)


### Features

* add a common package for validation
([#5579](#5579))
([f2cee9d](f2cee9d))
* add support for table size metadata in warehouse /v1/process API
([#5705](#5705))
([cbebd23](cbebd23))
* add tracer support to partition and pipeline workers
([#5668](#5668))
([a38b4f5](a38b4f5))
* add upload_id column in wh_load_files table
([#5682](#5682))
([9def123](9def123))
* embedded google pubsub transformer
([#5525](#5525))
([dcdb681](dcdb681))
* embedded kafka transformer
([#5575](#5575))
([224228b](224228b))
* **jobsdb:** introduce jobMinRowsLeftMigrateThres
([#5704](#5704))
([b1f4ce0](b1f4ce0))
* **processor:** concurrent store steps
([#5687](#5687))
([2435cba](2435cba))
* support compacted destination transformation payloads
([#5667](#5667))
([15ccaac](15ccaac))


### Bug Fixes

* handle consent management filtering per connection
([#5718](#5718))
([69f1baf](69f1baf))
* handling isBlank for nested and empty arrays
([#5714](#5714))
([69f1baf](69f1baf))
* kafka message batching applies to Confluent Cloud and Azure Event Hub
([#5699](#5699))
([7d8cdb9](7d8cdb9))
* **router:** applying excessive read pressure to the database when jobs
are being throttled
([#5685](#5685))
([f0e8b75](f0e8b75))
* snowflake fetch schema privileges
([#5692](#5692))
([0b83028](0b83028))
* unmarshalling error for staging files without bytes per table
([#5725](#5725))
([8c35d0a](8c35d0a))
* warehouse transformations comparisions
([#5694](#5694))
([0b83028](0b83028))
* warehouse transformations ordering for comparison
([#5670](#5670))
([28ba26e](28ba26e))
* warehouse transformations ordering while processing properties
([#5713](#5713))
([69f1baf](69f1baf))
* warehouse transformations valid timestamp formats and log file path
([#5707](#5707))
([69f1baf](69f1baf))


### Miscellaneous

* add sourceDef field to stats and related structures for enhanced
observability
([#5660](#5660))
([632bfca](632bfca))
* avoid using reflections for warehouse transformations
([#5673](#5673))
([3290794](3290794))
* clean up tests because transformer defaults to v2
([#5712](#5712))
([e9b96cf](e9b96cf))
* datetime detection
([#5675](#5675))
([1c53807](1c53807))
* default webhook contract version to v2
([#5659](#5659))
([7dbf5d8](7dbf5d8))
* **deps:** bump beatlabs/delete-old-branches-action from 0.0.10 to
0.0.11
([#5620](#5620))
([451c593](451c593))
* **deps:** bump google.golang.org/api from 0.227.0 to 0.228.0 in the
frequent group
([#5708](#5708))
([cbce33a](cbce33a))
* **deps:** bump the frequent group across 1 directory with 3 updates
([#5702](#5702))
([00a1bc5](00a1bc5))
* **deps:** bump the go-deps group across 1 directory with 12 updates
([#5698](#5698))
([4c3e4ff](4c3e4ff))
* **deps:** bump the go-deps group with 2 updates
([#5701](#5701))
([27c71e6](27c71e6))
* **deps:** bump the go-deps group with 2 updates
([#5709](#5709))
([1335fa6](1335fa6))
* **deps:** bump the go-deps group with 2 updates
([#5719](#5719))
([d3ab3e6](d3ab3e6))
* remove explicit schema synchronization in upload job
([#5672](#5672))
([462db8a](462db8a))
* remove unused schema v1 code
([#5661](#5661))
([3290794](3290794))
* snowflake integrations tests to use keypair instead of password
([#5684](#5684))
([3ed7a11](3ed7a11))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sidddddarth pushed a commit that referenced this pull request Apr 15, 2025
🤖 I have created a release *beep* *boop*
---


##
[1.47.0](v1.46.0...v1.47.0)
(2025-04-14)


### Features

* add a common package for validation
([#5579](#5579))
([f2cee9d](f2cee9d))
* add support for table size metadata in warehouse /v1/process API
([#5705](#5705))
([cbebd23](cbebd23))
* add tracer support to partition and pipeline workers
([#5668](#5668))
([a38b4f5](a38b4f5))
* add upload_id column in wh_load_files table
([#5682](#5682))
([9def123](9def123))
* embedded google pubsub transformer
([#5525](#5525))
([dcdb681](dcdb681))
* embedded kafka transformer
([#5575](#5575))
([224228b](224228b))
* **jobsdb:** introduce jobMinRowsLeftMigrateThres
([#5704](#5704))
([b1f4ce0](b1f4ce0))
* **processor:** concurrent store steps
([#5687](#5687))
([2435cba](2435cba))
* support compacted destination transformation payloads
([#5667](#5667))
([15ccaac](15ccaac))


### Bug Fixes

* handle consent management filtering per connection
([#5718](#5718))
([69f1baf](69f1baf))
* handling isBlank for nested and empty arrays
([#5714](#5714))
([69f1baf](69f1baf))
* kafka message batching applies to Confluent Cloud and Azure Event Hub
([#5699](#5699))
([7d8cdb9](7d8cdb9))
* **router:** applying excessive read pressure to the database when jobs
are being throttled
([#5685](#5685))
([f0e8b75](f0e8b75))
* snowflake fetch schema privileges
([#5692](#5692))
([0b83028](0b83028))
* unmarshalling error for staging files without bytes per table
([#5725](#5725))
([8c35d0a](8c35d0a))
* warehouse transformations comparisions
([#5694](#5694))
([0b83028](0b83028))
* warehouse transformations concurrent writes
([#5724](#5724))
([68e6309](68e6309))
* warehouse transformations ordering for comparison
([#5670](#5670))
([28ba26e](28ba26e))
* warehouse transformations ordering while processing properties
([#5713](#5713))
([69f1baf](69f1baf))
* warehouse transformations valid timestamp formats and log file path
([#5707](#5707))
([69f1baf](69f1baf))


### Miscellaneous

* add sourceDef field to stats and related structures for enhanced
observability
([#5660](#5660))
([632bfca](632bfca))
* avoid using reflections for warehouse transformations
([#5673](#5673))
([3290794](3290794))
* clean up tests because transformer defaults to v2
([#5712](#5712))
([e9b96cf](e9b96cf))
* datetime detection
([#5675](#5675))
([1c53807](1c53807))
* default webhook contract version to v2
([#5659](#5659))
([7dbf5d8](7dbf5d8))
* **deps:** bump beatlabs/delete-old-branches-action from 0.0.10 to
0.0.11
([#5620](#5620))
([451c593](451c593))
* **deps:** bump google.golang.org/api from 0.227.0 to 0.228.0 in the
frequent group
([#5708](#5708))
([cbce33a](cbce33a))
* **deps:** bump the frequent group across 1 directory with 3 updates
([#5702](#5702))
([00a1bc5](00a1bc5))
* **deps:** bump the go-deps group across 1 directory with 12 updates
([#5698](#5698))
([4c3e4ff](4c3e4ff))
* **deps:** bump the go-deps group with 2 updates
([#5701](#5701))
([27c71e6](27c71e6))
* **deps:** bump the go-deps group with 2 updates
([#5709](#5709))
([1335fa6](1335fa6))
* **deps:** bump the go-deps group with 2 updates
([#5719](#5719))
([d3ab3e6](d3ab3e6))
* remove explicit schema synchronization in upload job
([#5672](#5672))
([462db8a](462db8a))
* remove unused schema v1 code
([#5661](#5661))
([3290794](3290794))
* snowflake integrations tests to use keypair instead of password
([#5684](#5684))
([3ed7a11](3ed7a11))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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