Upgrade version of Campaign Manager API to v5#62510
Upgrade version of Campaign Manager API to v5#62510Crowiant wants to merge 1 commit intoapache:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates Google Campaign Manager 360 operators to default to the v5 API in response to the deprecation and impending sunset of v4.
Changes:
- Bump default
api_versionfor Campaign Manager operators fromv4tov5. - Update operator unit test constant to use
v5. - Adjust operator docstring parameter examples to reference
v5.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
providers/google/src/airflow/providers/google/marketing_platform/operators/campaign_manager.py |
Switches operator defaults (and docstring param examples) to Campaign Manager API v5. |
providers/google/tests/unit/google/marketing_platform/operators/test_campaign_manager.py |
Updates test constant to v5 for operator tests. |
| :param report_id: The ID of the report. | ||
| :param synchronous: If set and true, tries to run the report synchronously. | ||
| :param api_version: The version of the api that will be requested, for example 'v4'. | ||
| :param api_version: The version of the api that will be requested, for example 'v5'. |
There was a problem hiding this comment.
This docstring now mentions api_version 'v5', but the referenced official API docs URL for this operator still uses /rest/v4/.... Please update the link(s) to v5 (or a version-neutral reference) to avoid confusion.
| (the %m macro) or from Data Transfer. | ||
| :param max_failed_inserts: The maximum number of conversions that failed to be inserted | ||
| :param api_version: The version of the api that will be requested, for example 'v4'. | ||
| :param api_version: The version of the api that will be requested, for example 'v5'. |
There was a problem hiding this comment.
The docstring now documents api_version example 'v5', but it still references v4 REST docs for conversions (/rest/v4/...). Please update the linked docs URLs to v5 (or a version-neutral page) so the guidance matches the operator defaults.
| (the %m macro) or from Data Transfer. | ||
| :param max_failed_updates: The maximum number of conversions that failed to be updated | ||
| :param api_version: The version of the api that will be requested, for example 'v4'. | ||
| :param api_version: The version of the api that will be requested, for example 'v5'. |
There was a problem hiding this comment.
This docstring now documents api_version example 'v5', but the linked conversions documentation URLs still point at v4 (/rest/v4/...). Please update those URLs to v5 (or a version-neutral page) to keep documentation accurate.
| from tests_common.test_utils.taskinstance import run_task_instance | ||
|
|
||
| API_VERSION = "v4" | ||
| API_VERSION = "v5" |
There was a problem hiding this comment.
These tests always pass api_version explicitly, so they don't verify that the operators' default api_version was changed to v5. Please add at least one test case that omits api_version and asserts the hook is instantiated with v5 by default.
| :param report_name: The name of the report to delete. | ||
| :param report_id: The ID of the report. | ||
| :param api_version: The version of the api that will be requested, for example 'v4'. | ||
| :param api_version: The version of the api that will be requested, for example 'v5'. |
There was a problem hiding this comment.
The docstring now uses api_version example 'v5', but the "Check official API docs" URL in the same docstring still points to /rest/v4/.... Please update the referenced URL(s) to v5 (or make the URL version-neutral) to avoid misleading users.
| :param gzip: Option to compress local file or file data for upload | ||
| :param chunk_size: File will be downloaded in chunks of this many bytes. | ||
| :param api_version: The version of the api that will be requested, for example 'v4'. | ||
| :param api_version: The version of the api that will be requested, for example 'v5'. |
There was a problem hiding this comment.
The docstring now references api_version 'v5', but the linked official docs in this class still point to the v4 REST path (/rest/v4/...). Please update the doc links (or make them version-neutral) so the documentation matches the new default.
| :param profile_id: The DFA user profile ID. | ||
| :param report: Report to be created. | ||
| :param api_version: The version of the api that will be requested, for example 'v4'. | ||
| :param api_version: The version of the api that will be requested, for example 'v5'. |
There was a problem hiding this comment.
The docstring was updated to use api_version example 'v5', but this class still links to v4 REST docs (/rest/v4/...) above. Please update those URLs to v5 (or a versionless page) to keep documentation consistent with the default behavior.
Campaign Manager 360 API v4 is deprecated(https://developers.google.com/doubleclick-advertisers/deprecation) and will be sunset on February 26, 2026.
PR updates default version inside Campaign Manager Operators.
Release notes for the new version: https://developers.google.com/doubleclick-advertisers/rel_notes
Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.