Skip to content

chore(release): pull main into develop post release v1.107.6 - #4643

Merged
krishna2020 merged 3 commits into
developfrom
main
Sep 16, 2025
Merged

krishna2020 merged 3 commits into
developfrom
main

Conversation

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

👑 An automated PR

koladilip and others added 3 commits September 16, 2025 13:55
- 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
@coderabbitai

coderabbitai Bot commented Sep 16, 2025 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes

    • Improved LinkedIn Ads error handling by standardizing deprecation-related responses, providing clearer failures and more consistent behavior for retries and alerts. No action required for existing integrations.
  • Chores

    • Updated LinkedIn API version to 202410 for Ads and Audience batch create workflows to align with the latest platform requirements and maintain compatibility.

Walkthrough

Updates 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

Cohort / File(s) Summary
LinkedIn Ads API version bump
src/cdk/v2/destinations/linkedin_ads/config.js
Updated API_VERSION constant from '202409' to '202410'.
LinkedIn Audience workflow header update
src/cdk/v2/destinations/linkedin_audience/procWorkflow.yaml
Updated LinkedIn-Version header from "202409" to "202410" in BATCH_CREATE path.
LinkedIn Ads v1 response handling
src/v1/destinations/linkedin_ads/networkHandler.js
Introduced parseVersionDeprecationStatusCode; remaps HTTP 426 to 500. Response handling now uses remapped status. No exported API 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
Loading

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

  • sivashanmukh
  • utsabc
  • maheshkutty
  • koladilip

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description contains only ":crown: An automated PR" and does not follow the repository's required description template, leaving out essential sections such as "What are the changes introduced in this PR?", the related Linear task, objectives, impact/breaking-change notes, testing/docs information, and the developer checklist. Because the template's required structure and details are missing, the description is insufficient to guide reviewers or track the change. Therefore this check fails. Please update the PR description to match the repository template by adding a concise summary of code changes, the related Linear task ID, objectives and any dependent changes, notes on breaking or behavior changes, testing performed and documentation updates, and complete the developer checklist so reviewers can validate the merge quickly.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "chore(release): pull main into develop post release v1.107.6" accurately describes the intent of this automated merge and references the release version that motivates the changes; it is concise, on-topic, and not misleading relative to the changeset. The title is a single clear sentence and follows conventional release-chore formatting used for automated merges. No additional specificity is required for this repository's workflow.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch main

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.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor Author

Allure Test reports for this run are available at:

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between b2635bf and 645b51d.

⛔ Files ignored due to path filters (13)
  • CHANGELOG.md is excluded by !**/*.md
  • package-lock.json is excluded by !**/package-lock.json, !**/*.json
  • package.json is excluded by !**/*.json
  • test/integrations/destinations/linkedin_ads/dataDelivery/business.ts is excluded by !**/test/**
  • test/integrations/destinations/linkedin_ads/dataDelivery/oauth.ts is excluded by !**/test/**
  • test/integrations/destinations/linkedin_ads/network.ts is excluded by !**/test/**
  • test/integrations/destinations/linkedin_ads/processor/configLevelFeaturesTestData.ts is excluded by !**/test/**
  • test/integrations/destinations/linkedin_ads/processor/trackTestData.ts is excluded by !**/test/**
  • test/integrations/destinations/linkedin_ads/processor/validationTestData.ts is excluded by !**/test/**
  • test/integrations/destinations/linkedin_ads/router/data.ts is excluded by !**/test/**
  • test/integrations/destinations/linkedin_audience/processor/business.ts is excluded by !**/test/**
  • test/integrations/destinations/linkedin_audience/processor/validation.ts is excluded by !**/test/**
  • test/integrations/destinations/linkedin_audience/router/data.ts is 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.js
  • src/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 usages

Script 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 || true

If 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 — verified

Confirmed 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

codecov Bot commented Sep 16, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.78%. Comparing base (f37f925) to head (645b51d).
⚠️ Report is 39 commits behind head on develop.

Files with missing lines Patch % Lines
src/v1/destinations/linkedin_ads/networkHandler.js 83.33% 1 Missing ⚠️
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.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud

Copy link
Copy Markdown

@krishna2020
krishna2020 merged commit 04e2ace into develop Sep 16, 2025
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.

4 participants