Repository navigation
feat: add dynamic config existence flag for destinations - #5821
Merged
koladilip merged 4 commits intoMay 13, 2025
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5821 +/- ##
==========================================
+ Coverage 76.93% 77.02% +0.09%
==========================================
Files 491 496 +5
Lines 67615 67838 +223
==========================================
+ Hits 52022 52255 +233
+ Misses 12762 12757 -5
+ Partials 2831 2826 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Tested locally and these changes are working as expected. |
koladilip
force-pushed
the
feat.add-dynamic-config-used-flag-in-destination
branch
4 times, most recently
from
May 8, 2025 04:05
2a879e3 to
ee1b5db
Compare
atzoum
reviewed
May 8, 2025
koladilip
force-pushed
the
feat.add-dynamic-config-used-flag-in-destination
branch
3 times, most recently
from
May 9, 2025 08:15
ff35d82 to
a430593
Compare
This change adds the ability to detect and flag destinations that use dynamic config patterns. Key changes: - Add HasDynamicConfig field to DestinationT struct - Create utility functions to detect dynamic config patterns in destination configs - Update config processing to set HasDynamicConfig flag on destinations - Add tests to verify the functionality Resolves: INT-3613
koladilip
force-pushed
the
feat.add-dynamic-config-used-flag-in-destination
branch
from
May 9, 2025 08:21
a430593 to
9a8c03e
Compare
koladilip
force-pushed
the
feat.add-dynamic-config-used-flag-in-destination
branch
from
May 9, 2025 11:31
9a8c03e to
8ff2baa
Compare
atzoum
reviewed
May 9, 2025
atzoum
approved these changes
May 9, 2025
ItsSudip
reviewed
May 13, 2025
koladilip
force-pushed
the
feat.add-dynamic-config-used-flag-in-destination
branch
from
May 13, 2025 04:53
71464fd to
4bd89d2
Compare
ItsSudip
approved these changes
May 13, 2025
koladilip
enabled auto-merge (squash)
May 13, 2025 05:05
This was referenced May 13, 2025
Closed
Merged
satishrudderstack
pushed a commit
that referenced
this pull request
May 13, 2025
🤖 I have created a release *beep* *boop* --- ## [1.49.0](v1.48.0...v1.49.0) (2025-05-13) ### Features * add dynamic config existence flag for destinations ([#5821](#5821)) ([1b4ea06](1b4ea06)) * add support for processing of upload_v2 job type by slave ([#5796](#5796)) ([67988d1](67988d1)) * batch staging files for creating upload_v2 notifier jobs ([#5765](#5765)) ([7dc3a45](7dc3a45)) * enable worker-based kafka client batching ([#5788](#5788)) ([66dc19f](66dc19f)) * support claim renewal in notifier jobs ([#5818](#5818)) ([a499d9c](a499d9c)) * support new consent resolution strategy values ([#5798](#5798)) ([181b95b](181b95b)) * update config to add account details with destination in workspaceConfig ([#5753](#5753)) ([dbd46bf](dbd46bf)) * update contract for account and accountDefinition ([#5830](#5830)) ([c704b07](c704b07)) * use account to decide oauth type of a destination ([#5810](#5810)) ([9165e8c](9165e8c)) ### Bug Fixes * add check for nil secret on oauthv2 ([#5807](#5807)) ([fbc4abe](fbc4abe)) * convert bad request errors to 500 errors in oauth interceptor to prevent panics ([#5813](#5813)) ([3a08ec4](3a08ec4)) * embedded transformations upload ([#5848](#5848)) ([0b19968](0b19968)) * **jobsdb:** completed datasets don't get deleted without a pair ([#5793](#5793)) ([54aee71](54aee71)) * reporting common client path with query ([#5842](#5842)) ([c068920](c068920)) * transformer client recycle ttl bound to connection idle timeout ([#5800](#5800)) ([b13f92c](b13f92c)) * update account type to remove id which we are getting as map key ([#5835](#5835)) ([bc52242](bc52242)) * ut mirroring race condition ([#5824](#5824)) ([a4d579f](a4d579f)) * warehouse cached schema mismatch ([#5805](#5805)) ([4656247](4656247)) * warehouse transformations mismatches ([#5779](#5779)) ([01a7b83](01a7b83)) ### Miscellaneous * **deps:** bump github.com/snowflakedb/gosnowflake from 1.13.2 to 1.13.3 in the go_modules group ([#5787](#5787)) ([41db33e](41db33e)) * **deps:** bump golangci/golangci-lint-action from 7 to 8 ([#5815](#5815)) ([bf3e808](bf3e808)) * enrich event with bot details ([#5836](#5836)) ([6035658](6035658)) * **jobsdb:** cache distinct parameters query result for all datasets except last ([#5752](#5752)) ([e85811e](e85811e)) * migrate from denisenkom/go-mssqldb to microsoft/go-mssqldb ([#5776](#5776)) ([dbd46bf](dbd46bf)) * revert synapse staging table with max varchar length ([#5817](#5817)) ([2418329](2418329)) * **router:** support destination-specific configuration overrides for all options ([#5841](#5841)) ([695cf53](695cf53)) * synapse staging table with max varchar length ([#5775](#5775)) ([2fc5384](2fc5384)) * update accountDefination type with authenticationType ([#5791](#5791)) ([2a24e59](2a24e59)) * update rudder-go-kit to 0.49.2 ([#5832](#5832)) ([01a7b83](01a7b83)) * upload embedded dt response difference samples to s3 ([#5792](#5792)) ([c81001f](c81001f)) * warehouse transformer migration to embedded destination transformer package ([#5827](#5827)) ([e124bb0](e124bb0)) * warehouse transformer sample diff ([#5837](#5837)) ([8af55de](8af55de)) * warehouse transformer uploader ([#5828](#5828)) ([fc640bf](fc640bf)) * webhook integration test module upgrade ([#5665](#5665)) ([f4130d1](f4130d1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
Description
This PR adds the ability to detect and flag destinations that use dynamic config patterns. It introduces a new field
HasDynamicConfigin theDestinationTstruct that indicates whether a destination's configuration contains dynamic config patterns.Goal
The primary goal of this change is to detect and flag destinations that use dynamic config patterns during the configuration initialization phase rather than during event processing. This approach provides significant performance benefits:
Reduced Latency: By computing the
HasDynamicConfigflag during config initialization (which happens infrequently), we avoid performing this computation during event processing (which happens frequently), thereby reducing event processing latency.Cost Optimization: The detection of dynamic config patterns involves recursive traversal of configuration objects, which can be computationally expensive. Doing this once during initialization rather than for every event significantly reduces CPU usage and overall processing costs.
Transformer Optimization: This flag will be used in rudder-transformer to skip certain heavy computations that are only necessary when dynamic config is used. If a destination doesn't use dynamic config (which is the majority case), these computations can be bypassed entirely.
Key Changes
HasDynamicConfigfield toDestinationTstruct inbackend-config/types.goutils/misc/dynamic_config.goto detect dynamic config patterns:FindDynamicConfigPatterns- Recursively searches for template patterns in a mapContainsDynamicConfigPattern- Checks if a map contains at least one template patternbackend-config/dynamic_config.goto process and set theHasDynamicConfigflag:setHasDynamicConfig- Sets the flag on a single destinationprocessDynamicConfig- Processes all destinations in the configprocessDynamicConfig()when loading configurationsPattern Detection
The implementation detects dynamic config patterns in the format
{{ path || fallback }}in destination configs. It can detect patterns in:Why
This change allows the system to identify destinations that use dynamic configuration patterns during initialization, which can be used to optimize processing and improve error handling for these destinations. By avoiding this computation during event processing, we reduce latency and processing costs while maintaining the same functionality.
Resolves
Resolves: INT-3613