Add operators for Google BidManager API - #62521
Conversation
There was a problem hiding this comment.
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 |
shahar1
left a comment
There was a problem hiding this comment.
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.
d42ef26 to
5b56f39
Compare
5b56f39 to
2f6b1cb
Compare
|
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. |
|
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). |
Co-authored-by: Anton Nitochkin <nitochkin@google.com>
Co-authored-by: Anton Nitochkin <nitochkin@google.com>
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?
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.