Skip to content
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

GoogleDisplayVideo360 (hooks|operators|sensors) aren't compatible with v2 of the Display & Video 360 API #28045

Closed
1 of 2 tasks
github-sang opened this issue Dec 2, 2022 · 7 comments
Labels
area:providers good first issue kind:bug This is a clearly a bug provider:google Google (including GCP) related issues

Comments

@github-sang
Copy link

github-sang commented Dec 2, 2022

Apache Airflow Provider(s)

google

Versions of Apache Airflow Providers

apache-airflow-providers-google 8.4.0

Apache Airflow version

airflow-2.3.4

Operating System

Ubuntu 18.04.6 LTS

Deployment

Composer

Deployment details

Create a new Google Cloud Composer environment (image version composer-1.19.15-airflow-2.3.4)

What happened

Attempting to run any DAG that uses the GoogleDisplayVideo360 (hooks|operators|sensors) trying to connect to v2 of the API (https://developers.google.com/bid-manager/reference/rest) results in the DAG failing with the following error in the log:

[2022-12-01, 23:54:02 UTC] {base.py:68} INFO - Using connection ID 'google_cloud_default' for task execution.
[2022-12-01, 23:54:02 UTC] {display_video.py:103} INFO - Creating Display & Video 360 report.
[2022-12-01, 23:54:02 UTC] {credentials_provider.py:325} INFO - Getting connection using google.auth.default() since no key file is defined for hook.
[2022-12-01, 23:54:02 UTC] {taskinstance.py:1904} ERROR - Task failed with exception
Traceback (most recent call last):
File "/opt/python3.8/lib/python3.8/site-packages/airflow/providers/google/marketing_platform/operators/display_video.py", line 104, in execute
response = hook.create_query(query=self.body)
File "/opt/python3.8/lib/python3.8/site-packages/airflow/providers/google/marketing_platform/hooks/display_video.py", line 96, in create_query
response = self.get_conn().queries().createquery(body=query).execute(num_retries=self.num_retries)
AttributeError: 'Resource' object has no attribute 'createquery'
[2022-12-01, 23:54:02 UTC] {taskinstance.py:1408} INFO - Marking task as FAILED. dag_id=dv360_v2_report, task_id=create_dv2_report, execution_date=20221201T235355, start_date=20221201T235401, end_date=20221201T235402
[2022-12-01, 23:54:02 UTC] {standard_task_runner.py:92} ERROR - Failed to execute job 9 for task create_dv2_report ('Resource' object has no attribute 'createquery'; 866)
[2022-12-01, 23:54:02 UTC] {local_task_job.py:156} INFO - Task exited with return code 1

What you think should happen instead

The operator should connect to version 2 of the Display & Video 360 API successfully and execute the operation

How to reproduce

  1. Create a Cloud Composer instance
  2. Create a DAG that calls a GoogleDisplayVideo360 operator (e.g. GoogleDisplayVideo360CreateReportOperator) with api_version='v2' as a param
  3. Upload DAG to Composer DAG folder
  4. Trigger DAG

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@github-sang github-sang added area:providers kind:bug This is a clearly a bug labels Dec 2, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Dec 2, 2022

Thanks for opening your first issue here! Be sure to follow the issue template!

@Taragolis Taragolis added the provider:google Google (including GCP) related issues label Dec 2, 2022
@potiuk
Copy link
Member

potiuk commented Dec 5, 2022

cc: @bhirsz

@bhirsz
Copy link
Contributor

bhirsz commented Dec 5, 2022

Thanks for the report, I will pass it to the team. I can see that the hardcoded api_version isn't up to date anyway (https://developers.google.com/doubleclick-advertisers/deprecation) and it should be handled better. I can't promise the support for v2 since it is long deprecated (depends on how much work is required to fix it).

@github-sang
Copy link
Author

Hi @bhirsz,

That link is the deprecation schedule for Campaign Manager 360 which yes sunset v2 a long time ago.

For Display & Video 360 (https://developers.google.com/bid-manager/release-notes), v2 is the latest version with v1.1 being deprecated.

Here is the instructions on the difference between v1.1 and v2 (https://developers.google.com/bid-manager/how-tos/v2-migration)

Cheers.

@jonheysek
Copy link

Looks like DV360 v1.1 API will be fully sunsetted on Feb 28, 2022, at which point
the current, stable GoogleDisplayVideo360 operators won't work.

https://ads-developers.googleblog.com/2022/08/deprecation-of-bid-manager-api-v11.html

@eladkal
Copy link
Contributor

eladkal commented Jan 26, 2023

PRs are welcome

@eladkal
Copy link
Contributor

eladkal commented Jul 8, 2023

I'm closing this issue as completed after #30326 as this issue is about v1 -> v2

if there are problems with latest Google provider please open new issue with reproduce example

@eladkal eladkal closed this as completed Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers good first issue kind:bug This is a clearly a bug provider:google Google (including GCP) related issues
Projects
None yet
Development

No branches or pull requests

6 participants