Skip to content

fix: support update action type for linkedin audience destination - #4213

Merged
ItsSudip merged 2 commits into
developfrom
fix.linkedin_aud
Apr 1, 2025
Merged

ItsSudip merged 2 commits into
developfrom
fix.linkedin_aud

Conversation

@ItsSudip

Copy link
Copy Markdown
Member

What are the changes introduced in this PR?

We are not supporting update events for LinkedIn audience destination. With this pr we are supporting update events as add operation in LinkedIn Audience.

What is the related Linear task?

Resolves INT-3454

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 generic utility introduced or modified. Please explain the changes.

N/A

Any technical or performance related pointers to consider with the change?

N/A

@coderabbitai review


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?

  • Is the PR limited to 10 file changes?

  • Is the PR limited to one linear task?

  • Are relevant unit and component test-cases added in new readability format?

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.

@ItsSudip
ItsSudip requested review from a team and sivashanmukh as code owners March 27, 2025 15:08
@ItsSudip
ItsSudip requested review from a team, chandumlg and vinayteki95 March 27, 2025 15:08
@coderabbitai

coderabbitai Bot commented Mar 27, 2025 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Expanded available action options by introducing an update operation.
    • Enhanced processing logic to handle update actions consistently with insert operations.

Walkthrough

This pull request updates the action type handling for the LinkedIn audience module. The ACTION_TYPES constant in the configuration file is expanded to include 'update' in addition to 'insert' and 'delete'. In parallel, the generateActionType utility function is modified so that it now returns "ADD" when the provided action type is either 'insert' or 'update', while the behavior for 'delete' and other cases remains unchanged.

Changes

Files Change Summary
src/cdk/v2/.../linkedin_audience/config.ts and src/cdk/v2/.../linkedin_audience/utils.ts Expanded action types by adding 'update'. Updated the ACTION_TYPES constant and modified generateActionType to return "ADD" for both 'insert' and 'update'.

Sequence Diagram(s)

sequenceDiagram
    participant Client as Caller
    participant GA as generateActionType()
    
    Client->>GA: Call generateActionType(actionType)
    alt actionType equals 'insert' or 'update'
        GA-->>Client: Return "ADD"
    else actionType equals 'delete'
        GA-->>Client: Return "DELETE" (or existing handling)
    else
        GA-->>Client: Return default value
    end
Loading

Suggested reviewers

  • vinayteki95
  • krishna2020
  • koladilip

Suggestions for Improvements:

  • Ensure corresponding unit tests are updated or added to cover the new 'update' branch in generateActionType.
  • Update any relevant documentation to reflect the inclusion of the 'update' action type.
  • Review integration points where ACTION_TYPES is used to ensure consistency across related modules.

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 59c5d1e and 0e3c3a3.

⛔ Files ignored due to path filters (1)
  • test/integrations/destinations/linkedin_audience/processor/business.ts is excluded by !**/test/**
📒 Files selected for processing (2)
  • src/cdk/v2/destinations/linkedin_audience/config.ts (1 hunks)
  • src/cdk/v2/destinations/linkedin_audience/utils.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: Code Coverage
  • GitHub Check: UT Tests
  • GitHub Check: test_and_publish
  • GitHub Check: ingestion-service-test
  • GitHub Check: Check for formatting & lint errors
  • GitHub Check: check-health
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (go)
🔇 Additional comments (2)
src/cdk/v2/destinations/linkedin_audience/utils.ts (1)

79-80: Change looks good - adds support for update action type

The modification to the generateActionType function correctly implements support for the 'update' action type by treating it the same way as 'insert' (both returning 'ADD'). This aligns with the PR objective to support update events for the LinkedIn audience destination.

src/cdk/v2/destinations/linkedin_audience/config.ts (1)

2-2: Change correctly adds update action type to configuration

The ACTION_TYPES array has been appropriately updated to include 'update' alongside the existing 'insert' and 'delete' action types. This change is consistent with the modification in utils.ts and properly implements the PR objective.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

Allure Test reports for this run are available at:

@codecov

codecov Bot commented Mar 27, 2025 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.06%. Comparing base (078dca8) to head (730c9d3).
Report is 6 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4213   +/-   ##
========================================
  Coverage    91.06%   91.06%           
========================================
  Files          635      635           
  Lines        33172    33172           
  Branches      7836     7836           
========================================
  Hits         30208    30208           
- Misses        2716     2747   +31     
+ Partials       248      217   -31     

☔ 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.

@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

Allure Test reports for this run are available at:

@sonarqubecloud

sonarqubecloud Bot commented Apr 1, 2025

Copy link
Copy Markdown

@ItsSudip
ItsSudip merged commit f6c54e8 into develop Apr 1, 2025
@ItsSudip
ItsSudip deleted the fix.linkedin_aud branch April 1, 2025 06:22
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