Skip to content

Add operators for Google BidManager API - #62521

Merged
potiuk merged 1 commit into
apache:mainfrom
VladaZakharova:add-bid-manager-operators
Mar 10, 2026
Merged

Add operators for Google BidManager API#62521
potiuk merged 1 commit into
apache:mainfrom
VladaZakharova:add-bid-manager-operators

Conversation

@Crowiant

Copy link
Copy Markdown
Contributor

In the #55683 Report operators were removed by mistake.
See: #61873
Return the operators as a separate Bid Manager API operators with slight changes according to the new version of the API.
Ref: https://developers.google.com/bid-manager


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@Crowiant
Crowiant requested a review from shahar1 as a code owner February 26, 2026 13:56
@boring-cyborg boring-cyborg Bot added area:providers kind:documentation provider:google Google (including GCP) related issues labels Feb 26, 2026
@Crowiant Crowiant mentioned this pull request Feb 26, 2026
2 tasks
@kaxil
kaxil requested a review from Copilot February 26, 2026 18:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request restores operators for the Google Bid Manager API (part of Display & Video 360) that were inadvertently removed in PR #55683. The operators have been updated to use API v2 and include functionality for creating queries, running queries, downloading reports, and waiting for query completion.

Changes:

  • Added GoogleBidManagerHook with methods to interact with the Bid Manager API v2
  • Added four operators: GoogleBidManagerCreateQueryOperator, GoogleBidManagerRunQueryOperator, GoogleBidManagerDeleteQueryOperator, and GoogleBidManagerDownloadReportOperator
  • Added GoogleBidManagerRunQuerySensor to wait for query completion
  • Added comprehensive unit tests and system test examples
  • Updated provider configuration files and documentation

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
providers/google/src/airflow/providers/google/marketing_platform/hooks/bid_manager.py Implements hook for Bid Manager API v2 with methods for query and report management
providers/google/src/airflow/providers/google/marketing_platform/operators/bid_manager.py Implements four operators for creating, running, deleting queries and downloading reports
providers/google/src/airflow/providers/google/marketing_platform/sensors/bid_manager.py Implements sensor to wait for query completion
providers/google/src/airflow/providers/google/marketing_platform/sensors/display_video.py Updated docstring to clarify it's for SDF operations
providers/google/tests/unit/google/marketing_platform/hooks/test_bid_manager.py Unit tests for the Bid Manager hook
providers/google/tests/unit/google/marketing_platform/operators/test_bid_manager.py Unit tests for the Bid Manager operators
providers/google/tests/unit/google/marketing_platform/sensors/test_bid_manager.py Unit tests for the Bid Manager sensor
providers/google/tests/system/google/marketing_platform/example_bid_manager.py System test example DAG demonstrating usage
providers/google/docs/operators/marketing_platform/bid_manager.rst Documentation for the new operators and sensor
providers/google/docs/operators/marketing_platform/display_video.rst Minor formatting fix (removed extra blank line)
providers/google/src/airflow/providers/google/get_provider_info.py Registered Bid Manager API integration
providers/google/provider.yaml Registered Bid Manager API integration

Comment thread providers/google/tests/system/google/marketing_platform/example_bid_manager.py Outdated
Comment thread providers/google/tests/system/google/marketing_platform/example_bid_manager.py Outdated
Comment thread providers/google/tests/unit/google/marketing_platform/hooks/test_bid_manager.py Outdated

@shahar1 shahar1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please handle failing tests, as well as comments generated by Copilot (you may resolve if you find those irrelevant).
Also, please note that we're trying to reduce usage of AirflowException in new logic, so I'll be happy if you could replace it with native Python exceptions.

@Crowiant
Crowiant force-pushed the add-bid-manager-operators branch 3 times, most recently from d42ef26 to 5b56f39 Compare March 4, 2026 14:33
@Crowiant
Crowiant force-pushed the add-bid-manager-operators branch from 5b56f39 to 2f6b1cb Compare March 4, 2026 15:38
@Crowiant

Crowiant commented Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

Hello @shahar1, thank you for your comment! I've resolved the Copilot comments and the tests are now green. Regarding the AirflowExceptions: is it possible to leave them as they are, at least for now? This matches the logic of the old operators. I plan to update the exceptions in the future, but right now, I'd like to keep them consistent with the old operators.

@Crowiant
Crowiant requested a review from shahar1 March 4, 2026 17:11
@Crowiant

Crowiant commented Mar 6, 2026

Copy link
Copy Markdown
Contributor Author

Hi @shahar1, thanks for the approval. Are we good to merge this, or do you have any remaining objections to the PR?

@shahar1

shahar1 commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

Hi @shahar1, thanks for the approval. Are we good to merge this, or do you have any remaining objections to the PR?

One of the integration tests gets cancelled everytime I rerun it. Doesn't seem related (redis), but I want this to be checked before merging (currently I'm connected from my phone which is less ideal for debugging).
I'll try to figure it out - once it's settled I'm good with merging.

@potiuk
potiuk merged commit 838e8e8 into apache:main Mar 10, 2026
367 of 371 checks passed
dominikhei pushed a commit to dominikhei/airflow that referenced this pull request Mar 11, 2026
Co-authored-by: Anton Nitochkin <nitochkin@google.com>
Pyasma pushed a commit to Pyasma/airflow that referenced this pull request Mar 13, 2026
Co-authored-by: Anton Nitochkin <nitochkin@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers kind:documentation provider:google Google (including GCP) related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants