Skip to content

[STRATCONN-5489] - Add batch_keys to Klaviyo actions #2880

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

varadarajan-tw
Copy link
Contributor

@varadarajan-tw varadarajan-tw commented Apr 23, 2025

This PR adds a new hidden batch_keys mapping to all Klaviyo actions. This mapping controls how events are batched together.

This PR in itself won't have any effect as it depends on https://github.com/segmentio/integrations-go/pull/449. The integrations-go changes are behind a flagon and we'll be doing a controlled rollout.

Test Doc - here

Testing

  • Added unit tests for new functionality
  • Tested end-to-end using the local server
  • [If destination is already live] Tested for backward compatibility of destination. Note: New required fields are a breaking change.
  • [Segmenters] Tested in the staging environment
  • [Segmenters] [If applicable for this change] Tested for regression with Hadron.

@varadarajan-tw varadarajan-tw force-pushed the add-batch-keys-klaviyo branch from 2470c87 to 62b67cd Compare April 28, 2025 17:46
Copy link

codecov bot commented Apr 28, 2025

Codecov Report

Attention: Patch coverage is 61.76471% with 13 lines in your changes missing coverage. Please review.

Project coverage is 77.84%. Comparing base (cf633f8) to head (5094161).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
...tion-actions/src/destinations/klaviyo/functions.ts 28.57% 8 Missing and 2 partials ⚠️
...src/destinations/klaviyo/subscribeProfile/index.ts 83.33% 0 Missing and 1 partial ⚠️
...c/destinations/klaviyo/unsubscribeProfile/index.ts 83.33% 0 Missing and 1 partial ⚠️
...ns/src/destinations/klaviyo/upsertProfile/index.ts 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2880       +/-   ##
===========================================
+ Coverage   32.57%   77.84%   +45.27%     
===========================================
  Files          14     1049     +1035     
  Lines         703    19470    +18767     
  Branches      119     3818     +3699     
===========================================
+ Hits          229    15157    +14928     
- Misses        474     2969     +2495     
- Partials        0     1344     +1344     

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

nick-Ag
nick-Ag previously approved these changes May 1, 2025
Copy link
Member

@nick-Ag nick-Ag left a comment

Choose a reason for hiding this comment

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

Is this something you think would be worth it to add a unit test for? One that fails if some future developer changes this for some reason

@varadarajan-tw
Copy link
Contributor Author

@nick-Ag - Good idea. Added a snapshot test for batch key configuration.

@varadarajan-tw varadarajan-tw marked this pull request as ready for review May 2, 2025 09:08
@varadarajan-tw varadarajan-tw requested a review from a team as a code owner May 2, 2025 09:08
@varadarajan-tw varadarajan-tw requested a review from nick-Ag May 2, 2025 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants