Skip to content
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

[SMART-HASHING] [STRATCONN-5550] Updated hashing utils for tiktok-audiences #2796

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

AnkitSegment
Copy link
Contributor

Implemented Smart hashing utils on tiktok-audiences

JIRA TICKETS: https://segment.atlassian.net/browse/STRATCONN-5550

TESTING DOCS: https://docs.google.com/document/d/10-776AUC9pQKt3IEjsdnN-ulOQcr_ZP2ui6S6WzwUrE/edit?tab=t.f0py7u3xfwio

A summary of your pull request, including the what change you're making and why.

Testing

Include any additional information about the testing you have completed to
ensure your changes behave as expected. For a speedy review, please check
any of the tasks you completed below during your 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.

Copy link

codecov bot commented Mar 13, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 8 lines in your changes missing coverage. Please review.

Project coverage is 78.34%. Comparing base (25c9d2a) to head (7438908).
Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
...stinations/tiktok-audiences/addToAudience/index.ts 0.00% 1 Missing and 1 partial ⚠️
...src/destinations/tiktok-audiences/addUser/index.ts 0.00% 1 Missing and 1 partial ⚠️
...tions/tiktok-audiences/removeFromAudience/index.ts 0.00% 1 Missing and 1 partial ⚠️
.../destinations/tiktok-audiences/removeUser/index.ts 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2796      +/-   ##
==========================================
- Coverage   78.36%   78.34%   -0.02%     
==========================================
  Files        1042     1042              
  Lines       18937    18939       +2     
  Branches     3646     3654       +8     
==========================================
- Hits        14840    14838       -2     
  Misses       2860     2860              
- Partials     1237     1241       +4     

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

@AnkitSegment AnkitSegment requested a review from Copilot March 13, 2025 12:24

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the TikTok Audiences destination to incorporate smart hashing utilities by replacing direct crypto calls with a new processHashing utility and propagating a features flag throughout the payload processing functions.

  • Updated hashing logic in functions.ts to use processHashing with a new hash wrapper function.
  • Modified processPayload and related functions to accept and pass a features parameter.
  • Updated action definitions and tests to include the features parameter for smart hashing.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/destination-actions/src/destinations/tiktok-audiences/functions.ts Updated imports, added Features parameter, and replaced createHash calls with a wrapper using processHashing.
packages/destination-actions/src/destinations/tiktok-audiences/addUser/index.ts Adjusted perform and performBatch functions to pass features to processPayload.
packages/destination-actions/src/destinations/tiktok-audiences/tests/functions.test.ts Updated tests to supply a features object to the extractUsers function.
packages/destination-actions/src/destinations/tiktok-audiences/addToAudience/index.ts Updated perform and performBatch functions to pass features to processPayload.
packages/destination-actions/src/destinations/tiktok-audiences/removeFromAudience/index.ts Updated perform and performBatch functions to pass features to processPayload.
packages/destination-actions/src/destinations/tiktok-audiences/removeUser/index.ts Updated perform and performBatch functions to pass features to processPayload.
@AnkitSegment AnkitSegment merged commit d126d73 into main Mar 20, 2025
19 of 21 checks passed
@AnkitSegment AnkitSegment deleted the ankit/tiktok-audiences branch March 20, 2025 05:21
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.

2 participants