Repository navigation
feat: add endpointPath to Google AdWords Remarketing Lists destination - #4662
Conversation
- Add OFFLINE_USER_DATA_JOBS_ENDPOINT constant to config.js - Update responseBuilder to include endpointPath in response - Update all test data files to include endpointPath in expected responses - Ensure consistency across processor and router test data
Summary by CodeRabbit
WalkthroughAdded a constant for the offline user data jobs endpoint in config, updated util to use this constant and include endpointPath in the response, and adjusted tests to expect endpointPath. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Caller
participant U as util.responseBuilder
participant CFG as config (OFFLINE_USER_DATA_JOBS_ENDPOINT)
participant R as Response
C->>U: Build response(payload, destination)
U->>CFG: Read OFFLINE_USER_DATA_JOBS_ENDPOINT
Note right of CFG: Returns 'offlineUserDataJobs'
U->>U: Compute endpointPath = 'offlineUserDataJobs'
U->>U: Build endpoint = BASE_ENDPOINT/filteredCustomerId/endpointPath
U-->>R: { endpointPath, endpoint, ... }
R-->>C: Response object
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Allure Test reports for this run are available at:
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
src/v0/destinations/google_adwords_remarketing_lists/util.test.js (1)
72-72: Prefer using the exported constant in tests to avoid string drift.Import OFFLINE_USER_DATA_JOBS_ENDPOINT and use it for both endpointPath and endpoint construction.
-const { API_VERSION } = require('./config'); +const { API_VERSION, OFFLINE_USER_DATA_JOBS_ENDPOINT } = require('./config'); @@ - endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/7693729833/offlineUserDataJobs`, - endpointPath: 'offlineUserDataJobs', + endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/7693729833/${OFFLINE_USER_DATA_JOBS_ENDPOINT}`, + endpointPath: OFFLINE_USER_DATA_JOBS_ENDPOINT,Also applies to: 2-2, 71-71
src/v0/destinations/google_adwords_remarketing_lists/config.js (1)
5-5: Naming nit: clarify that this is a path segment, not a full endpoint.Consider OFFLINE_USER_DATA_JOBS_PATH (or an ENDPOINTS object) to make intent explicit. Optional, no functional change.
src/v0/destinations/google_adwords_remarketing_lists/util.js (1)
19-23: Approve — endpointPath is sourced from config; update tests to use the constant and consider normalizing endpointPath format
- Verified: src/v0/destinations/google_adwords_remarketing_lists/util.js sets response.endpointPath = OFFLINE_USER_DATA_JOBS_ENDPOINT and builds response.endpoint via BASE_ENDPOINT/.../OFFLINE_USER_DATA_JOBS_ENDPOINT (lines 45–46).
- Found: src/v0/destinations/google_adwords_remarketing_lists/util.test.js still hardcodes 'offlineUserDataJobs' and the full endpoint (lines ~70–73). Switch tests to import/use OFFLINE_USER_DATA_JOBS_ENDPOINT to avoid duplicated literals.
- Optional: src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js contains endpointPath entries with leading slashes ('/customers/create', '/addOperations', '/run') (lines ~44,71,96) — consider standardizing whether endpointPath includes a leading slash.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
test/integrations/destinations/google_adwords_remarketing_lists/processor/data.tsis excluded by!**/test/**test/integrations/destinations/google_adwords_remarketing_lists/router/data.tsis excluded by!**/test/**
📒 Files selected for processing (3)
src/v0/destinations/google_adwords_remarketing_lists/config.js(2 hunks)src/v0/destinations/google_adwords_remarketing_lists/util.js(2 hunks)src/v0/destinations/google_adwords_remarketing_lists/util.test.js(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.js
⚙️ CodeRabbit configuration file
Focus on ESLint errors (max 3) and warnings (max 5).
Files:
src/v0/destinations/google_adwords_remarketing_lists/util.test.jssrc/v0/destinations/google_adwords_remarketing_lists/util.jssrc/v0/destinations/google_adwords_remarketing_lists/config.js
🧠 Learnings (1)
📚 Learning: 2025-05-29T13:29:39.436Z
Learnt from: maheshkutty
PR: rudderlabs/rudder-transformer#4359
File: src/v0/util/index.js:2272-2272
Timestamp: 2025-05-29T13:29:39.436Z
Learning: The `combineBatchRequestsWithSameJobIds` function in `src/v0/util/index.js` is used by both Mixpanel and Google AdWords Offline Conversions destinations in production. The function assumes metadata is always an array in multiple operations (forEach, filter, sort, map) and needs defensive programming to handle non-array metadata cases to prevent runtime errors.
Applied to files:
src/v0/destinations/google_adwords_remarketing_lists/util.test.jssrc/v0/destinations/google_adwords_remarketing_lists/util.js
🧬 Code graph analysis (1)
src/v0/destinations/google_adwords_remarketing_lists/util.js (1)
src/v0/destinations/google_adwords_remarketing_lists/config.js (2)
OFFLINE_USER_DATA_JOBS_ENDPOINT(5-5)BASE_ENDPOINT(6-6)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
- GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image ARM64
- GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image ARM64
- GitHub Check: Code Coverage
- GitHub Check: test_and_publish
- GitHub Check: UT Tests
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (go)
🔇 Additional comments (1)
src/v0/destinations/google_adwords_remarketing_lists/config.js (1)
5-5: Centralizing the endpoint path looks good.Exporting OFFLINE_USER_DATA_JOBS_ENDPOINT here keeps util.js clean and consistent.
Also applies to: 30-30
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4662 +/- ##
========================================
Coverage 91.78% 91.78%
========================================
Files 642 642
Lines 33974 33981 +7
Branches 8037 8037
========================================
+ Hits 31184 31191 +7
Misses 2560 2560
Partials 230 230 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
#4662) - Add OFFLINE_USER_DATA_JOBS_ENDPOINT constant to config.js - Update responseBuilder to include endpointPath in response - Update all test data files to include endpointPath in expected responses - Ensure consistency across processor and router test data



Summary
This PR adds the property to the Google AdWords Remarketing Lists destination response configuration.
Changes
Technical Details
The property provides better traceability and debugging capabilities by clearly identifying the specific API endpoint being used in the response object. This change ensures consistency with other destinations that include endpoint paths in their responses.
Testing
Files Modified
src/v0/destinations/google_adwords_remarketing_lists/config.jssrc/v0/destinations/google_adwords_remarketing_lists/util.jssrc/v0/destinations/google_adwords_remarketing_lists/util.test.jstest/integrations/destinations/google_adwords_remarketing_lists/processor/data.tstest/integrations/destinations/google_adwords_remarketing_lists/router/data.ts