-
Notifications
You must be signed in to change notification settings - Fork 282
[MAIN] [STRATCONN-6153]: [DV360] added API_VERSION and CANARY_API_VERSION in first party dv360 with code refactoring #3325
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
base: main
Are you sure you want to change the base?
Conversation
…y dv360 with code refactoring
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3325 +/- ##
==========================================
+ Coverage 80.03% 80.08% +0.05%
==========================================
Files 1202 1203 +1
Lines 22105 22136 +31
Branches 4355 4360 +5
==========================================
+ Hits 17691 17728 +37
+ Misses 3637 3630 -7
- Partials 777 778 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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 refactors the first-party DV360 destination to support API version migration from v3 to v4 using feature flags. The changes introduce structured API version management through constants and centralized functions while maintaining backward compatibility.
Key changes:
- Introduces
API_VERSION
,CANARY_API_VERSION
constants andgetApiVersion()
function for centralized version management - Updates feature flag name from
actions-first-party-dv360-version-update
tofirst-party-dv360-canary-version
- Refactors endpoint URL construction into reusable helper functions
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
packages/destination-actions/src/destinations/first-party-dv360/functions.ts | Added version constants, centralized API version logic, and refactored endpoint construction functions |
packages/destination-actions/src/destinations/first-party-dv360/index.ts | Updated to use new version management functions and feature flag name |
packages/destination-actions/src/destinations/first-party-dv360/tests/index.test.ts | Updated test descriptions and feature flag references to reflect new naming |
packages/destination-actions/src/destinations/first-party-dv360/addToAudContactInfo/tests/index.test.ts | Updated test descriptions and feature flag references |
packages/destination-actions/src/destinations/first-party-dv360/addToAudMobileDeviceId/tests/index.test.ts | Updated test descriptions and feature flag references |
packages/destination-actions/src/destinations/first-party-dv360/removeFromAudContactInfo/tests/index.test.ts | Updated test descriptions and feature flag references |
packages/destination-actions/src/destinations/first-party-dv360/functions.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
tags?.push(`version:${version}`) | ||
statsClient?.incr('dv360_api_version', 1, tags) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function modifies the tags
array parameter by reference, which could cause side effects for callers. Consider creating a copy of the tags array before modification: const newTags = [...(tags || []), \
version:${version}`]and use
newTags` for the stats call.
tags?.push(`version:${version}`) | |
statsClient?.incr('dv360_api_version', 1, tags) | |
const newTags = [...(tags || []), `version:${version}`] | |
statsClient?.incr('dv360_api_version', 1, newTags) |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
JIRA
https://twilio-engineering.atlassian.net/browse/STRATCONN-6153
A summary of your pull request, including the what change you're making and why.
Description
This PR includes changes for migration from v3 to v4 for first party DV360 action destination with feature flag and API_VERSION AND CANARY_API_VERSION with code refactoring .
Code changes are done based on this comment
[MAIN][STRATCONN-6153] : [DV360] added feature flag for first party dv360 destination for upgrade version from v3 to v4 #3283 (review)
Updated the unit test cases to v4 from v3 in first party action destination with CANARY_API_VERSION .
Google is depreciating the v3 version of dv360 hence the changes are done .
Reason of doing changes
Testing
Please find the testing document attached here .
https://docs.google.com/document/d/1GIxrjRqm5ExkAC_1uNZwCBNNi6Jv9_gfC2xmQQ1JOx0/edit?tab=t.0
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.