[Google Campaign Manager 360] Canary Version Upgrade to v5#3667
[Google Campaign Manager 360] Canary Version Upgrade to v5#3667harsh-joshi99 wants to merge 4 commits intomainfrom
Conversation
…rade - Add comprehensive tests for both v4 (stable) and v5 (canary) API versions - Test that default behavior uses v4 API - Test that v5 API is used when feature flag cm360-canary-api-version is enabled - Add breaking-changes-analysis.md documenting the v4→v5 upgrade - All 33 tests passing Breaking changes analysis confirms v5 is backward compatible with v4. No schema changes, no new required fields, same authentication flow. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3667 +/- ##
=======================================
Coverage ? 80.61%
=======================================
Files ? 1326
Lines ? 24545
Branches ? 5053
=======================================
Hits ? 19788
Misses ? 3830
Partials ? 927 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds API version routing for the Google Campaign Manager 360 destination so requests can be sent to a canary dfareporting API version (v5) via a feature flag, while keeping a “stable” default version.
Changes:
- Introduces
versioning-info.tsand agetApiVersion(features)helper to choose between stable and canary API versions. - Updates conversion upload/adjustment actions to pass
featuresthrough and use a versioned dfareporting URL. - Updates and extends unit tests to validate the stable vs canary endpoint selection behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/destination-actions/src/destinations/google-campaign-manager-360/versioning-info.ts | Adds stable/canary API version constants. |
| packages/destination-actions/src/destinations/google-campaign-manager-360/utils.ts | Adds feature-flag-based API version selection and uses it in request URL construction. |
| packages/destination-actions/src/destinations/google-campaign-manager-360/conversionUpload/index.ts | Passes features through to the shared send() helper. |
| packages/destination-actions/src/destinations/google-campaign-manager-360/conversionUpload/tests/index.test.ts | Updates nock URLs to use version constants and adds feature-flag coverage. |
| packages/destination-actions/src/destinations/google-campaign-manager-360/conversionAdjustmentUpload/index.ts | Passes features through to the shared send() helper. |
| packages/destination-actions/src/destinations/google-campaign-manager-360/conversionAdjustmentUpload/tests/index.test.ts | Updates nock URLs to use version constants and adds feature-flag coverage. |
| packages/destination-actions/src/destinations/google-campaign-manager-360/breaking-changes-analysis.md | Adds upgrade analysis/rollout notes for v4 → v5. |
packages/destination-actions/src/destinations/google-campaign-manager-360/versioning-info.ts
Show resolved
Hide resolved
...estination-actions/src/destinations/google-campaign-manager-360/breaking-changes-analysis.md
Outdated
Show resolved
Hide resolved
...estination-actions/src/destinations/google-campaign-manager-360/breaking-changes-analysis.md
Outdated
Show resolved
Hide resolved
...ctions/src/destinations/google-campaign-manager-360/conversionUpload/__tests__/index.test.ts
Outdated
Show resolved
Hide resolved
.../destinations/google-campaign-manager-360/conversionAdjustmentUpload/__tests__/index.test.ts
Outdated
Show resolved
Hide resolved
Replace hard-coded 'v5' and 'cm360-canary-api-version' string literals with CANARY_API_VERSION and FLAGON_NAME constants in both test files. Remove breaking-changes-analysis.md from the codebase. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| import { Payload as UploadPayload } from './conversionUpload/generated-types' | ||
| import { Payload as Adjustayload } from './conversionAdjustmentUpload/generated-types' | ||
| import { AuthTokens } from '@segment/actions-core/destination-kit/parse-settings' |
There was a problem hiding this comment.
The imported payload type alias Adjustayload appears to be a typo (missing "P"). Renaming it to something like AdjustPayload (and updating its uses in this file) would improve clarity and avoid confusion when working with both Upload vs Adjustment payload types.
| @@ -2,6 +2,7 @@ import nock from 'nock' | |||
| import { createTestEvent, createTestIntegration } from '@segment/actions-core' | |||
| import Destination from '../../index' | |||
| import { SegmentEvent } from '@segment/actions-core/*' | |||
There was a problem hiding this comment.
SegmentEvent is being imported from @segment/actions-core/*, which is not a valid module path and is inconsistent with other tests in this destination. Import the type from @segment/actions-core (prefer import type { SegmentEvent } ...) so TypeScript/module resolution is correct and the import won’t be emitted at runtime.
| import { SegmentEvent } from '@segment/actions-core/*' | |
| import type { SegmentEvent } from '@segment/actions-core' |
Adds API version routing for the Google Campaign Manager 360 destination so requests can be sent to a canary dfareporting API version (v5) via a feature flag, while keeping a “stable” default version.
Changes:
Introduces versioning-info.ts and a getApiVersion(features) helper to choose between stable and canary API versions.
Updates conversion upload/adjustment actions to pass features through and use a versioned dfareporting URL.
Updates and extends unit tests to validate the stable vs canary endpoint selection behavior.
Testing
Testing cannot be completed because there is no CRM 360 test account.
The changes are behind a flag: https://flagon.segment.com/families/centrifuge-destinations/gates/cm360-canary-api-version
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.
Security Review
Please ensure sensitive data is properly protected in your integration.
type: 'password'New Destination Checklist
verioning-info.tsfile. example