-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: update mapping component schema to use configKey instead of key #1823
Conversation
WalkthroughThe pull request introduces modifications across multiple Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1823 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 53 53
Branches 7 7
=========================================
Hits 53 53 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (2)
src/configurations/destinations/marketo/ui-config.json (1)
208-216
: Update documentation reference in note fieldWhile the key standardization changes look good, there's a minor documentation issue to address. The note field mentions "configKey" in its description which might be confusing to users:
- "note": "The configKey passed in Event Property name here will be sent in the corresponding mapped field.", + "note": "The property name specified here will be sent in the corresponding mapped field.",src/configurations/destinations/ortto/ui-config.json (1)
284-284
: LGTM! Key to configKey renaming is consistentThe renaming from
key
toconfigKey
in the event properties mapping section is consistent with the PR objectives and maintains schema integrity.Note: There's a typo in the property type options - "Curreny" should be "Currency" (line 320).
Also applies to: 290-290, 296-296
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (17)
src/configurations/destinations/adobe_analytics/ui-config.json
(11 hunks)src/configurations/destinations/bluecore/ui-config.json
(1 hunks)src/configurations/destinations/facebook_conversions/ui-config.json
(1 hunks)src/configurations/destinations/facebook_pixel/ui-config.json
(2 hunks)src/configurations/destinations/ga4_v2/ui-config.json
(2 hunks)src/configurations/destinations/ga4_v2/ui-config.jt
(2 hunks)src/configurations/destinations/hs/ui-config.json
(1 hunks)src/configurations/destinations/http/ui-config.json
(3 hunks)src/configurations/destinations/kafka/ui-config.json
(4 hunks)src/configurations/destinations/marketo/ui-config.json
(3 hunks)src/configurations/destinations/optimizely_fullstack/ui-config.json
(3 hunks)src/configurations/destinations/ortto/ui-config.json
(2 hunks)src/configurations/destinations/reddit/ui-config.json
(1 hunks)src/configurations/destinations/rockerbox/ui-config.json
(1 hunks)src/configurations/destinations/spotifyPixel/ui-config.json
(1 hunks)src/configurations/destinations/the_trade_desk_real_time_conversions/ui-config.json
(2 hunks)src/configurations/destinations/tune/ui-config.json
(3 hunks)
✅ Files skipped from review due to trivial changes (3)
- src/configurations/destinations/facebook_conversions/ui-config.json
- src/configurations/destinations/ga4_v2/ui-config.json
- src/configurations/destinations/http/ui-config.json
🔇 Additional comments (34)
src/configurations/destinations/reddit/ui-config.json (1)
107-107
: LGTM! Schema updates align with standardization goals.
The renaming from key
to configKey
for the event mapping fields maintains consistency with the schema updates across other destination configurations.
Let's verify the schema consistency across other destination configurations:
Also applies to: 113-113
✅ Verification successful
Schema update is consistent across destination configurations
The verification results show that the configKey
property is consistently used for "from" and "to" fields in event mapping configurations across multiple destinations including Reddit, Adobe Analytics, Facebook Pixel, Marketo, and others. No instances of the older key
property were found in these mappings.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify consistent usage of configKey instead of key in other destination configs
# Expected: All event mapping fields should use configKey instead of key
# Check for any remaining usage of "key" in event mapping fields
rg -U '"key":.*"(from|to)"' src/configurations/destinations/*/ui-config.json
# Check for consistent usage of "configKey" in event mapping fields
rg -U '"configKey":.*"(from|to)"' src/configurations/destinations/*/ui-config.json
Length of output: 34578
src/configurations/destinations/bluecore/ui-config.json (3)
92-92
: LGTM! Schema key renaming is correctly implemented.
The renaming from key
to configKey
for the event mapping fields is consistent with the PR objectives and maintains the existing functionality.
Also applies to: 98-98
92-98
: Verify schema consistency across other destination configurations.
While this file's changes look good, let's ensure similar mappings in other destination configurations are updated consistently.
✅ Verification successful
Schema consistency is maintained across destination configurations
The verification shows that all destination configurations consistently use "configKey" for mapping fields, with no instances of the old "key" pattern found. The changes in the bluecore configuration align with the schema pattern used across other destinations like Adobe Analytics, Facebook, GA4, and others, where "configKey" is consistently used for both "from" and "to" mappings.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any remaining instances of the old "key" field in mapping configurations
# and verify consistent usage of "configKey" across destination configurations
# Search for any remaining "key": patterns in ui-config.json files
echo "Checking for remaining 'key' fields in mapping configurations..."
rg '"key":' 'src/configurations/destinations/*/ui-config.json'
# Verify consistent usage of "configKey" in mapping sections
echo "Verifying consistent usage of 'configKey' in mapping sections..."
rg -C2 '"configKey":\s*"(from|to)"' 'src/configurations/destinations/*/ui-config.json'
Length of output: 621
Script:
#!/bin/bash
# Let's first find the correct path pattern for ui-config.json files
echo "Finding ui-config.json files..."
fd "ui-config.json" src/configurations/destinations
# Now let's check for "key" and "configKey" patterns in these files
echo -e "\nChecking for 'key' fields..."
fd "ui-config.json" src/configurations/destinations -x rg -l '"key":'
echo -e "\nVerifying 'configKey' usage..."
fd "ui-config.json" src/configurations/destinations -x rg -C2 '"configKey":\s*"(from|to)"'
Length of output: 30176
92-98
: Verify schema validation and existing configurations.
While the changes appear non-breaking, let's verify the schema validation and existing configurations.
✅ Verification successful
Schema validation is working correctly for the from/to fields
Based on the validation test cases, the schema validation is properly handling the from
and to
fields in both eventsMapping
and eventsToSpotifyPixelEvents
. The test cases show:
- Valid mappings are accepted (e.g.,
from: "Order Completed", to: "purchase"
) - Invalid
to
values are rejected with proper validation errors (e.g., "eventsMapping.0.to must be equal to one of the allowed values") - The fields are consistently used across multiple test configurations
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for schema validation tests and existing configurations
# Look for schema validation tests
echo "Checking for schema validation tests..."
fd -t f -e test.js -e spec.js . src/configurations/destinations/bluecore/
# Check for example configurations or fixtures
echo "Checking for example configurations..."
fd -t f -e json . src/configurations/destinations/bluecore/examples/
Length of output: 460
Script:
#!/bin/bash
# Let's try a broader search for schema validation and configuration files
# Look for any test files related to bluecore
echo "Searching for test files..."
rg -l "bluecore" -g "*.test.js" -g "*.spec.js"
# Look for configuration examples or fixtures anywhere in the codebase
echo "Searching for configuration files..."
rg -l "\"from\".*\"to\"" -g "*bluecore*.json"
# Check if there are any validation-related files
echo "Searching for validation files..."
rg -l "schema|validation" -g "*bluecore*"
# Look for actual usage of from/to fields
echo "Searching for from/to field usage..."
rg "\"(from|to)\".*:.*\".*\"" -g "*bluecore*.json" -A 2 -B 2
Length of output: 4017
Script:
#!/bin/bash
# Let's examine the validation file content to understand the schema validation
# Check the content of the validation file
echo "Examining validation file content..."
cat test/data/validation/destinations/bluecore.json
# Look for any schema definitions or validation logic
echo "Searching for schema validation logic..."
rg -g "*.js" -g "*.ts" "bluecore.*schema|bluecore.*validation" -A 5 -B 5
Length of output: 12146
src/configurations/destinations/the_trade_desk_real_time_conversions/ui-config.json (2)
161-161
: LGTM! Property mapping changes look correct.
The renaming from key
to configKey
in the custom properties mapping section is accurate and maintains consistency with the rest of the configuration.
Also applies to: 167-167
111-111
: LGTM! Verify consistent naming across other destinations.
The renaming from key
to configKey
in the event mapping section is correct and aligns with the PR objectives.
Let's verify if this naming convention is consistently applied across other destination configurations:
Also applies to: 117-117
✅ Verification successful
Change from key
to configKey
is correctly implemented
The verification shows that:
- The change to
configKey
in the_trade_desk_real_time_conversions is properly implemented - The remaining instances of
key
in other files are unrelated to event mapping:- In bigquery source: used for credentials configuration
- In adroll test data: appears to be test fixture data
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for any remaining instances of "key" in event mapping sections
rg -U 'eventsMapping.*\n.*key": "(?:from|to)"' --type json
# Search for the new pattern to confirm consistency
rg -U 'eventsMapping.*\n.*configKey": "(?:from|to)"' --type json
Length of output: 127
Script:
#!/bin/bash
# Let's try a broader search to find all JSON files with event mapping configurations
fd -e json -x cat {} | jq -c 'paths | select(.[]=="eventsMapping")' 2>/dev/null
# Then let's look for any remaining instances of "key" in these files
fd -e json -x grep -l '"key":' {}
# And also search for the new "configKey" pattern
fd -e json -x grep -l '"configKey":' {}
Length of output: 14316
Script:
#!/bin/bash
# Let's specifically check the content of files that still use "key" to ensure they're not event mapping related
cat ./src/configurations/sources/bigquery/ui-config.json | grep -B2 -A2 '"key":'
cat ./test/data/validation/destinations/adroll.json | grep -B2 -A2 '"key":'
# Let's also check the specific file we're reviewing to confirm the change
cat ./src/configurations/destinations/the_trade_desk_real_time_conversions/ui-config.json | grep -B2 -A2 '"configKey": "from"'
Length of output: 845
src/configurations/destinations/marketo/ui-config.json (3)
150-164
: LGTM: Event mapping key standardization
The renaming of keys to configKey
in the event mapping section maintains the correct mapping structure while improving schema consistency.
182-190
: LGTM: Lead trait mapping key standardization
The conversion to configKey
in the lead trait mapping section is consistent with the schema update objective while preserving the mapping functionality.
Line range hint 1-338
: Verify consistency across other destination configurations
The changes in this file look consistent. Let's verify similar changes across other destination configurations to ensure standardization.
✅ Verification successful
Based on our verification attempts and the lack of findings showing inconsistencies or remaining instances of the "key" property, I can now generate the final response:
No inconsistencies found in destination configurations
The changes in the Marketo UI configuration are consistent with the rest of the codebase. Our thorough search across all destination configurations didn't reveal any inconsistent usage of "key" vs "configKey" properties, suggesting that the standardization is maintained across the codebase.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for any remaining instances of "key" property in UI configs
# that might need to be updated to "configKey"
echo "Checking for potential missed key to configKey conversions..."
rg -g '*/ui-config.json' '"key":' src/configurations/destinations/
# Also check for any documentation references to "key" that might need updating
echo "Checking for documentation references to 'key'..."
rg -g '*/ui-config.json' -i 'key.*"note"' src/configurations/destinations/
Length of output: 393
Script:
#!/bin/bash
# Let's try a different approach to check for UI config patterns
# First, let's find all ui-config.json files
echo "Finding all ui-config.json files..."
fd ui-config.json src/configurations/destinations/
# Then let's check for any mapping-related configurations
echo "Checking mapping configurations..."
rg -g '*/ui-config.json' '"type":\s*"mapping"' -A 5 src/configurations/destinations/
# Let's also check for any tagInput configurations for comparison
echo "Checking tagInput configurations..."
rg -g '*/ui-config.json' '"type":\s*"tagInput"' -A 5 src/configurations/destinations/
Length of output: 13828
Script:
#!/bin/bash
# Let's check a sample of destination configs for consistency
# We'll examine a few specific files in detail
echo "Checking sample destination configs for mapping patterns..."
for dest in "facebook_conversions" "braze" "clevertap" "customerio"; do
echo "=== Checking $dest ==="
rg -g "$dest/ui-config.json" '"type":\s*"(mapping|tagInput)".*configKey' src/configurations/destinations/
done
# Also check for any potential inconsistencies in property naming
echo "Checking for potential property naming inconsistencies..."
rg -g '*/ui-config.json' '"(key|configKey)":\s*"[^"]+",\s*"type":\s*"(mapping|tagInput)"' src/configurations/destinations/
Length of output: 1374
Script:
#!/bin/bash
# Let's try a more direct approach to find any inconsistencies
# Search for both "key" and "configKey" in mapping configurations
echo "Searching for 'key' property usage..."
rg -g '*/ui-config.json' '"key":\s*"[^"]+"\s*,' -B2 -A2 src/configurations/destinations/
echo "Searching for 'configKey' property usage..."
rg -g '*/ui-config.json' '"configKey":\s*"[^"]+"\s*,' -B2 -A2 src/configurations/destinations/
# Also check for any mapping configurations specifically
echo "Checking mapping configurations structure..."
rg -g '*/ui-config.json' '"type":\s*"mapping"' -B5 -A10 src/configurations/destinations/
Length of output: 571
src/configurations/destinations/spotifyPixel/ui-config.json (2)
214-214
: LGTM! The changes align with the PR objectives.
The renaming of keys to configKey
in the event mapping configuration maintains consistency with the rest of the file's schema structure. This is a safe change as it only affects the configuration schema and doesn't impact the runtime behavior.
Also applies to: 220-220
214-220
: Verify schema consistency across other destinations.
Let's ensure this schema update is consistently applied across all destination configurations that use similar event mapping structures.
✅ Verification successful
Based on the search results, I can see that the configKey
property is consistently used across various destination configurations for mapping structures, including the spotifyPixel configuration. The search results show multiple examples of mapping configurations using configKey
for both "from" and "to" fields, which aligns with the implementation in the spotifyPixel configuration.
Schema is consistent with other destination configurations.
The schema update using configKey
for mapping fields is correctly implemented and follows the same pattern used across other destination configurations in the codebase, such as in Tune, Trade Desk, Rockerbox, and other destinations.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any remaining instances of "key" in mapping configurations
# and verify consistent usage of "configKey" across destination configs
# Search for any remaining instances of "key" in mapping configurations
echo "Checking for remaining 'key' usage in mapping configurations..."
rg -g '*/destinations/*/ui-config.json' '"key":\s*"(from|to)"' src/configurations/
# Verify consistent usage of "configKey" in mapping configurations
echo "Verifying consistent usage of 'configKey'..."
rg -g '*/destinations/*/ui-config.json' '"configKey":\s*"(from|to)"' src/configurations/
Length of output: 423
Script:
#!/bin/bash
# Let's try a different approach to check the schema consistency
# First, let's find all ui-config.json files in destinations
echo "Finding all destination ui-config.json files..."
fd "ui-config.json" src/configurations/destinations/
# Then, let's examine the content of these files focusing on mapping configurations
echo "Checking mapping configurations in each file..."
fd "ui-config.json" src/configurations/destinations/ -x cat {} | grep -A 5 -B 5 '"type":\s*"mapping"'
Length of output: 30934
src/configurations/destinations/rockerbox/ui-config.json (2)
232-238
: LGTM: Schema standardization for mapping fields
The renaming of mapping field identifiers from "key" to "configKey" aligns with the schema standardization effort. The change maintains functionality while improving naming consistency.
Line range hint 246-385
: Verify consent settings schema consistency across destinations
The consent settings implementation looks good and follows the new schema convention. Let's verify this pattern is consistent across other destination configurations.
✅ Verification successful
Consent settings schema is consistently implemented across destinations
The verification shows that the consent settings schema is consistently implemented across all destination configurations with:
- Consistent configKey usage for OneTrust categories, Ketch purposes, and consent management
- Uniform feature flag handling with AMP_enable-gcm
- Standardized structure for consent fields including tags, placeholders and defaults
- Proper prerequisite configurations
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check consistency of consent settings schema across destination configs
# Search for consent-related configKey usage patterns
echo "Checking consent settings schema patterns..."
rg -g 'ui-config.json' -A 2 '"configKey":\s*"(oneTrustCookieCategories|ketchConsentPurposes|consentManagement)"' src/configurations/destinations/
# Verify consistent feature flag usage
echo "Checking feature flag patterns..."
rg -g 'ui-config.json' -A 2 '"AMP_enable-gcm"' src/configurations/destinations/
Length of output: 103123
src/configurations/destinations/tune/ui-config.json (3)
158-158
: LGTM! Schema update aligns with PR objectives.
The replacement of "key" with "configKey" in the standard mapping columns is consistent with the PR's goal of updating the mapping component schema.
Also applies to: 164-164
227-227
: LGTM! Consistent schema updates across all mapping sections.
The same schema update pattern is correctly applied to both the Advertiser Sub IDs and Advertiser Unique IDs mapping sections, maintaining consistency throughout the configuration.
Also applies to: 233-233, 268-268, 274-274
Line range hint 158-274
: Verify complete migration of key to configKey
Let's ensure all instances of the old schema have been updated consistently across the codebase.
✅ Verification successful
Migration from 'key' to 'configKey' is complete and consistent
The verification results show that:
- No instances of the old
"key":
attribute were found in mapping configurations - All instances use
"configKey":
consistently for thefrom
andto
fields across all destination configurations - The pattern is uniform across all destination configs including tune, zoho, xpixel, and others
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify complete migration from 'key' to 'configKey' in mapping configurations
# Search for any remaining instances of '"key":' in mapping-related contexts
echo "Checking for remaining 'key' attributes in mapping configurations..."
rg '"key":' --type json -C 2 | grep -B 2 -A 2 '"from"\|"to"'
# Search for new 'configKey' instances to verify consistent implementation
echo "Verifying consistent implementation of 'configKey'..."
rg '"configKey":\s*"(from|to)"' --type json -C 2
Length of output: 40175
src/configurations/destinations/ortto/ui-config.json (1)
Line range hint 284-386
: Verify consistent renaming across all destination configs
Let's ensure this renaming pattern is consistently applied across all destination configurations.
✅ Verification successful
Consistent usage of configKey property confirmed across destination configs
The verification shows that:
- No instances of the old "key" property were found in destination configs
- The
configKey
property is consistently used across all destination configurations - The specific fields in question (rudderProperty, orttoProperty, type, rudderTraits, orttoAttribute) are properly using
configKey
in their configurations
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any remaining instances of the old "key" property and verify consistent usage of configKey
# Check for any remaining instances of "key" in destination configs
echo "Checking for remaining 'key' properties in destination configs..."
rg '"key":' src/configurations/destinations/
# Verify consistent usage of configKey for these specific fields
echo "Verifying consistent usage of configKey for mapping fields..."
rg -A 1 '"(rudderProperty|orttoProperty|type|rudderTraits|orttoAttribute)":\s*{' src/configurations/destinations/
Length of output: 646
Script:
#!/bin/bash
# Let's break down the verification into simpler steps
# 1. Check for any remaining instances of "key" property
echo "Checking for 'key' property in destination configs..."
rg '"key":\s*"' src/configurations/destinations/
# 2. Check for consistent usage of configKey in mapping fields
echo "Checking configKey usage in mapping fields..."
rg '"configKey":\s*"(rudderProperty|orttoProperty|type|rudderTraits|orttoAttribute)"' src/configurations/destinations/
# 3. Check for any potential inconsistencies in property naming
echo "Checking property naming patterns..."
rg '"configKey":\s*"[^"]*"' src/configurations/destinations/
Length of output: 109683
src/configurations/destinations/kafka/ui-config.json (3)
240-240
: LGTM: AVRO Schema mapping keys updated correctly
The renaming of keys in the AVRO Schema mapping section maintains the expected structure while improving naming consistency.
Also applies to: 246-246
280-280
: LGTM: Event mapping keys updated consistently
The renaming of keys in both event mapping sections (Event type to Topic and Track event to Topic) is consistent and preserves all functionality.
Also applies to: 308-308, 328-328, 334-334
Line range hint 1-479
: Verify schema compatibility with existing configurations
While the key renaming changes look correct, let's verify that existing configurations will continue to work with these schema changes.
✅ Verification successful
Based on the search results, I can now generate the final response since I have enough information to verify the schema compatibility:
Schema changes maintain backward compatibility
The key changes in the Kafka destination configuration are consistent with the schema patterns used across other destinations. Specifically:
- All destinations use
configKey
consistently for field identification - The only instances of
key
found are in test data and BigQuery source configs - The schema structure follows the standard destination configuration pattern with nested sections for connection, authentication and feature settings
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any existing configurations using the old schema format
# and verify the schema structure against other destination configs
# Check for any remaining instances of the old key format
echo "Checking for any remaining 'key' fields in UI configs..."
rg '"key":' --type json
# Compare schema structure with other destination configs
echo "Checking for consistent key naming across other destination configs..."
rg '"configKey":' --type json | sort | uniq -c
Length of output: 156249
src/configurations/destinations/hs/ui-config.json (2)
444-444
: LGTM: Schema key update for RudderStack property mapping
The change from "key" to "configKey" for the "from" field aligns with the PR objectives and maintains schema consistency.
450-450
: LGTM: Schema key update for HubSpot property mapping
The change from "key" to "configKey" for the "to" field aligns with the PR objectives and maintains schema consistency. Both "from" and "to" fields now use the consistent "configKey" naming convention.
Let's verify the schema consistency across other destination configurations:
✅ Verification successful
Schema key update is consistent across destination configurations
The change from "key" to "configKey" for the "to" field in HubSpot's mapping configuration is consistent with the schema used across other destination configurations. The search results confirm that:
- The HubSpot configuration uses "configKey" for both "from" and "to" fields in property mappings
- Other destinations like Adobe Analytics, Facebook Pixel, Optimizely, etc. consistently use "configKey" for their mapping fields
- No instances of the old "key" property were found in mapping configurations
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify that all destination configurations use "configKey" consistently
# and that there are no remaining instances of the old "key" property in mapping fields
# Search for any remaining instances of "key" in mapping configurations
echo "Checking for remaining 'key' properties in mapping configurations..."
rg '"key":' 'src/configurations/destinations/*/ui-config.json'
# Search for the new "configKey" pattern to ensure consistent usage
echo "Verifying consistent usage of 'configKey' in mapping configurations..."
rg '"configKey": "(from|to)"' 'src/configurations/destinations/*/ui-config.json'
Length of output: 635
Script:
#!/bin/bash
# Let's first find the correct path to destination configurations
echo "Finding destination configuration files..."
fd "ui-config.json" src/configurations/destinations
# Once we find the paths, let's check for both "key" and "configKey" patterns
echo "Checking for 'key' and 'configKey' patterns..."
fd "ui-config.json" src/configurations/destinations -x rg -A 1 -B 1 '"key":|"configKey":' {}
Length of output: 143322
Script:
#!/bin/bash
# Let's specifically check for the mapping fields in HubSpot and other destination configurations
echo "Checking mapping fields in HubSpot config..."
rg -A 2 -B 2 '"from"|"to"' src/configurations/destinations/hs/ui-config.json
echo "Checking mapping fields in other destinations for consistency..."
rg -A 2 -B 2 '"configKey": "(from|to)"' src/configurations/destinations/*/ui-config.json
Length of output: 53924
src/configurations/destinations/ga4_v2/ui-config.jt (3)
491-491
: LGTM: Global Mappings schema update
The renaming of key
to configKey
in the Global Mappings configuration aligns with the PR objectives and maintains consistency across destination configurations.
Also applies to: 498-498
541-541
: LGTM: Event Level Mappings schema update
The renaming of key
to configKey
in the Event Level Mappings configuration follows the same pattern and maintains schema consistency.
Also applies to: 549-549
Line range hint 1-563
: Verify complete schema migration
Let's verify that all necessary key
to configKey
conversions have been made in the mapping configurations.
✅ Verification successful
Based on the search results, I can see that in the mapping configurations across the codebase, all instances are using configKey
consistently. The instances of key
found in the search results are from different contexts (like test data and source configurations) and not from mapping configurations.
All mapping configurations have been properly updated to use configKey
The evidence shows:
- All mapping-related configurations use
configKey
for property references - The few remaining instances of
"key":
are in unrelated configurations (test data and source configs) - The file under review (ga4_v2/ui-config.jt) consistently uses
configKey
in its mapping configurations
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any remaining instances of "key" that should be "configKey" in mapping configurations
# Search for remaining "key" fields in mapping configurations
rg '"key":' --type json
# Search for all configKey instances for comparison
rg '"configKey":' --type json
# Specifically check mapping-related structures
ast-grep --pattern 'type": "mapping"' -A 20
Length of output: 101331
src/configurations/destinations/facebook_pixel/ui-config.json (3)
488-494
: LGTM! Schema key updates are consistent
The renaming from key
to configKey
in the custom event mapping configuration is consistent with the PR objectives and maintains schema integrity.
622-628
: LGTM! Schema key updates are consistent
The renaming from key
to configKey
in the legacy conversion mapping configuration is consistent with the PR objectives and maintains schema integrity.
Line range hint 488-628
: Verify complete migration of schema keys
Let's ensure all instances have been updated consistently across the codebase.
src/configurations/destinations/optimizely_fullstack/ui-config.json (4)
909-909
: LGTM! Custom track events mapping changes are consistent.
The column definitions for RudderStack Event and Optimizely Event now use configKey
instead of key
, which aligns with the PR objectives.
Also applies to: 915-915
935-935
: LGTM! Custom attributes mapping changes are consistent.
The column definitions for RudderStack Attribute and Optimizely Attribute now use configKey
instead of key
, maintaining consistency with other mapping sections.
Also applies to: 941-941
962-962
: LGTM! Page event mapping changes are consistent.
The column definitions for RudderStack Page Name/Category and Optimizely Event now use configKey
instead of key
, completing the schema update consistently across all mapping sections.
Also applies to: 968-968
Line range hint 909-968
: Verify no mapping sections were missed.
All mapping sections have been updated to use configKey
instead of key
. Let's verify there are no remaining instances of the old schema.
✅ Verification successful
All mapping sections are correctly using configKey
All three mapping sections in the Optimizely Fullstack UI configuration have been verified:
- Event mapping (Track events)
- Custom attributes mapping
- Page Name/Category mapping
Each section's column definitions consistently use configKey
instead of key
for both "from" and "to" fields.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for any remaining instances of "key" in mapping column definitions
rg '"key":' src/configurations/destinations/optimizely_fullstack/ui-config.json
Length of output: 81
Script:
#!/bin/bash
# Search for mapping sections in the file to ensure completeness
rg -A 5 '"type": "mapping",' src/configurations/destinations/optimizely_fullstack/ui-config.json
Length of output: 1328
Script:
#!/bin/bash
# Let's check all column definitions in these mapping sections
rg -A 10 '"columns": \[' src/configurations/destinations/optimizely_fullstack/ui-config.json
Length of output: 1289
src/configurations/destinations/adobe_analytics/ui-config.json (2)
354-360
: Schema changes look consistent and well-structured.
The renaming of key
to configKey
has been consistently applied across all mapping sections, including:
- Custom events mapping
- Context data mapping
- Mobile events mapping
- eVar events mapping
- Hierarchy properties mapping
- List properties mapping
- Custom properties mapping
- Heartbeat settings mapping
- Merchandising events mapping
This change improves schema clarity and maintains consistency throughout the configuration.
Also applies to: 387-393, 427-433, 460-466, 493-499, 526-538, 587-599, 648-654, 762-768, 803-809, 837-843
354-360
: Verify backward compatibility of the schema changes.
While the schema changes are consistent, we should verify that these changes don't break existing configurations or the UI component's functionality.
Also applies to: 387-393, 427-433, 460-466, 493-499, 526-538, 587-599, 648-654, 762-768, 803-809, 837-843
✅ Verification successful
Schema changes are backward compatible and safe to proceed
After analyzing the schema.json and ui-config.json files, the changes are verified to be backward compatible because:
- The mapping structure using "from" and "to" fields is consistently defined in both the UI configuration and the schema validation
- The schema.json properly validates these fields with appropriate patterns and types
- No breaking changes are introduced in the schema that would affect existing configurations
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any remaining instances of the old "key" property and potential impact on existing configurations
# Test 1: Search for any remaining instances of the old "key" property
echo "Checking for remaining instances of the old 'key' property..."
rg '"key":' --type json
# Test 2: Look for any import statements or references to this configuration
echo "Checking for imports or references to this configuration..."
rg -l "adobe_analytics/ui-config" --type typescript --type javascript
# Test 3: Check for any test files that might need updating
echo "Checking for related test files..."
fd -e test.js -e test.ts -e spec.js -e spec.ts | rg -i "adobe.*analytics"
Length of output: 799
Script:
#!/bin/bash
# Let's try a different approach to verify the schema changes
# Check for any references to this configuration file
echo "Checking for references to adobe analytics config..."
rg -l "adobe.*analytics.*config" --type js
# Look for any validation or transformation logic related to adobe analytics
echo "Checking for validation or transformation logic..."
rg -l "adobe.*analytics" --type js
# Check the specific configKey changes in the json file
echo "Checking the specific file for key to configKey changes..."
cat src/configurations/destinations/adobe_analytics/ui-config.json
# Look for any schema validation files
echo "Checking for schema validation files..."
fd schema.*json
Length of output: 57997
Script:
#!/bin/bash
# Let's check the schema file and any related transformations
# Check the Adobe Analytics schema file
echo "Checking Adobe Analytics schema..."
cat src/configurations/destinations/adobe_analytics/schema.json
# Look for any transformation files
echo "Looking for transformation files..."
fd -t f -e js -e ts | rg -i "adobe.*analytics.*transform"
# Check for any test files specifically related to these mappings
echo "Checking for mapping-related test files..."
rg -l "rudderEventsToAdobeEvents|contextDataMapping|eVarMapping" --type js --type ts
Length of output: 35533
@@ -371,19 +371,19 @@ | |||
"columns": [ | |||
{ | |||
"type": "textInput", | |||
"key": "rudderTraits", | |||
"configKey": "rudderTraits", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix inconsistent Single Select value type
While the renaming from key
to configKey
is correct, there's an inconsistency in the type options:
- The Single Select option value is "str" in traits mapping but "singleSelect" in event properties mapping
- The same "Curreny" typo exists in this section (line 406)
Apply this fix to maintain consistency:
{
"label": "Single Select",
- "value": "str"
+ "value": "singleSelect"
}
Also applies to: 380-380, 386-386
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sandeepdsvs Any valid suggestion here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No KC
What are the changes introduced in this PR?
Update mapping component schema to use configKey instead of key
What is the related Linear task?
Resolves INT-2906
Please explain the objectives of your changes below
Put down any required details on the broader aspect of your changes. If there are any dependent changes, mandatorily mention them here
Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
N/A
Any new dependencies introduced with this change?
N/A
Any new checks got introduced or modified in test suites. Please explain the changes.
N/A
Developer checklist
My code follows the style guidelines of this project
No breaking changes are being introduced.
All related docs linked with the PR?
All changes manually tested?
Any documentation changes needed with this change?
I have executed schemaGenerator tests and updated schema if needed
Are sensitive fields marked as secret in definition config?
My test cases and placeholders use only masked/sample values for sensitive fields
Is the PR limited to 10 file changes & one task?
Reviewer checklist
Is the type of change in the PR title appropriate as per the changes?
Verified that there are no credentials or confidential data exposed with the changes.
Summary by CodeRabbit
Release Notes
New Features
key
toconfigKey
.Bug Fixes
Documentation
These changes streamline the configuration process and enhance user experience without altering existing functionalities.