Repository navigation
chore(release): pull main into develop post release v1.107.6 - #4643
Conversation
- Update LinkedIn Ads API version from 202409 to 202410 - Add status code mapping for 426 (Upgrade Required) to 500 - Improve error handling for version deprecation responses fix: linkedin ads tests
Summary by CodeRabbit
WalkthroughUpdates LinkedIn API version from 202409 to 202410 in config and workflow header. Adds internal status normalization in the v1 LinkedIn Ads network handler to remap HTTP 426 to 500 before downstream error handling. No public/exported API changes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Client
participant NetworkHandler
participant LinkedInAPI
Client->>NetworkHandler: sendRequest(payload)
NetworkHandler->>LinkedInAPI: HTTP request
LinkedInAPI-->>NetworkHandler: HTTP response (status)
rect rgba(200,220,255,0.25)
note right of NetworkHandler: New logic: normalize status
NetworkHandler->>NetworkHandler: parseVersionDeprecationStatusCode(status)\n- 426 -> 500\n- otherwise unchanged
end
alt status == 2xx
NetworkHandler-->>Client: success response
else status >= 400
NetworkHandler-->>Client: error handling using remapped status
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggestions: add a unit test covering 426→500 remap; verify downstream metrics/alerts treat 500 as intended; confirm LinkedIn 202410 version compatibility across both v1 and v2 paths. Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/v1/destinations/linkedin_ads/networkHandler.js (1)
36-61: Pass status code (not destinationResponse object) to getAuthErrCategoryFromStCode.Currently the 401/403 branch passes the whole response object, likely misclassifying auth errors.
Apply:
- getAuthErrCategoryFromStCode(destinationResponse), + getAuthErrCategoryFromStCode(status),
🧹 Nitpick comments (2)
src/v1/destinations/linkedin_ads/networkHandler.js (2)
17-23: Clarify 426 → 500 remap; add inline rationale (and optional metric/log).Good normalization. Add a brief comment so future readers know this is intentional for retry semantics.
Apply:
-const parseVersionDeprecationStatusCode = (status) => { +// Normalizes LinkedIn's 426 (Upgrade Required/version deprecation) to 500 +// so upstream retry logic treats it as transient and rotates versions. +const parseVersionDeprecationStatusCode = (status) => { if (status === 426) { return 500; } return status; };
80-85: Use a non-“success” message for partial failures (422 path).Returning “Request Processed Successfully” alongside 422 responses is misleading.
Apply:
- return { - status, - message, + const partialMessage = '[LINKEDIN_CONVERSION_API Response V1 Handler] - Request processed with partial failures'; + return { + status, + message: partialMessage, destinationResponse, response: responseWithIndividualEvents, };
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (13)
CHANGELOG.mdis excluded by!**/*.mdpackage-lock.jsonis excluded by!**/package-lock.json,!**/*.jsonpackage.jsonis excluded by!**/*.jsontest/integrations/destinations/linkedin_ads/dataDelivery/business.tsis excluded by!**/test/**test/integrations/destinations/linkedin_ads/dataDelivery/oauth.tsis excluded by!**/test/**test/integrations/destinations/linkedin_ads/network.tsis excluded by!**/test/**test/integrations/destinations/linkedin_ads/processor/configLevelFeaturesTestData.tsis excluded by!**/test/**test/integrations/destinations/linkedin_ads/processor/trackTestData.tsis excluded by!**/test/**test/integrations/destinations/linkedin_ads/processor/validationTestData.tsis excluded by!**/test/**test/integrations/destinations/linkedin_ads/router/data.tsis excluded by!**/test/**test/integrations/destinations/linkedin_audience/processor/business.tsis excluded by!**/test/**test/integrations/destinations/linkedin_audience/processor/validation.tsis excluded by!**/test/**test/integrations/destinations/linkedin_audience/router/data.tsis excluded by!**/test/**
📒 Files selected for processing (3)
src/cdk/v2/destinations/linkedin_ads/config.js(1 hunks)src/cdk/v2/destinations/linkedin_audience/procWorkflow.yaml(1 hunks)src/v1/destinations/linkedin_ads/networkHandler.js(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.js
⚙️ CodeRabbit configuration file
Focus on ESLint errors (max 3) and warnings (max 5).
Files:
src/v1/destinations/linkedin_ads/networkHandler.jssrc/cdk/v2/destinations/linkedin_ads/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/v1/destinations/linkedin_ads/networkHandler.js
🧬 Code graph analysis (1)
src/v1/destinations/linkedin_ads/networkHandler.js (1)
src/cdk/v2/destinations/linkedin_ads/utils.js (1)
destinationResponse(253-253)
⏰ 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). (6)
- GitHub Check: Code Coverage
- GitHub Check: UT Tests
- GitHub Check: test_and_publish
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (go)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (2)
src/cdk/v2/destinations/linkedin_ads/config.js (1)
6-6: API_VERSION -> 202410: definition OK — verify remaining usagesScript output shows:
- src/cdk/v2/destinations/linkedin_ads/config.js:6 — const API_VERSION = '202410';
- src/cdk/v2/destinations/linkedin_audience/procWorkflow.yaml:87 — "LinkedIn-Version": "202410"
Actions to finish verification (run locally):
rg -nP '\bAPI_VERSION\b' src -S rg -nP '"LinkedIn-Version"\s*:\s*"' src -S rg -nP '"LinkedIn-Version"\s*:\s*"(?!202410)[0-9]{6}' src -S || trueIf any hard-coded or non-202410 headers are found, update them to use the central API_VERSION (or centralize header generation) to avoid version drift.
src/cdk/v2/destinations/linkedin_audience/procWorkflow.yaml (1)
87-88: Approve: LinkedIn-Version bumped to 202410 — verifiedConfirmed no remaining "202409" occurrences. Updated instances found and consistent: src/cdk/v2/destinations/linkedin_audience/procWorkflow.yaml:87 ("LinkedIn-Version": "202410") and src/cdk/v2/destinations/linkedin_ads/config.js:6 (API_VERSION = '202410'); linkedin_ads/utils.js and tests reference API_VERSION and will pick up the new value. Optional: add a changelog entry and run integration tests that exercise LinkedIn workflows.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4643 +/- ##
========================================
Coverage 91.78% 91.78%
========================================
Files 642 642
Lines 33941 33970 +29
Branches 8035 8045 +10
========================================
+ Hits 31153 31180 +27
+ Misses 2558 2538 -20
- Partials 230 252 +22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|



👑 An automated PR