[ https://issues.apache.org/jira/browse/AIRFLOW-5350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kaxil Naik resolved AIRFLOW-5350. --------------------------------- Resolution: Fixed > Fix bug in the num_retires field in BigQueryHook > ------------------------------------------------ > > Key: AIRFLOW-5350 > URL: https://issues.apache.org/jira/browse/AIRFLOW-5350 > Project: Apache Airflow > Issue Type: Bug > Components: gcp > Affects Versions: 1.10.4 > Reporter: Kaxil Naik > Assignee: Kaxil Naik > Priority: Critical > Fix For: 1.10.5 > > > The `num_retries` extra is no set in old connections that were created before > 1.10.4, for those fields it's value is None which causes the below error: > From the StackOverflow Post: > {noformat} > [2019-08-27 02:49:58,076] {cli.py:516} INFO - Running <TaskInstance: > cadastro_remessas_paises2.gcs_to_bq 2019-08-27T02:42:43.970619+00:00 > [running]> on host > cadastroremessaspaises2gcstobq-78f1ea099c3b4e718ba707cb03ffda1e > [2019-08-27 02:49:58,136] {logging_mixin.py:95} INFO - [[34m2019-08-27 > 02:49:58,136[0m] {[34mdiscovery.py:[0m271} INFO[0m - URL being requested: GET > [1mhttps://www.googleapis.com/discovery/v1/apis/bigquery/v2/rest[0m[0m > [2019-08-27 02:49:59,259] {logging_mixin.py:95} INFO - [[34m2019-08-27 > 02:49:59,259[0m] {[34mmy_functions_google.py:[0m2224} INFO[0m - Project not > included in [1mdestination_project_dataset_table[0m: > [1mcadastro_remessas.paises2[0m; using project "[1mbigdata-staging[0m"[0m > [2019-08-27 02:49:59,266] {logging_mixin.py:95} INFO - [[34m2019-08-27 > 02:49:59,266[0m] {[34mdiscovery.py:[0m867} INFO[0m - URL being requested: > POST > https://www.googleapis.com/bigquery/v2/projects/bigdata-staging/jobs?alt=json[0m > > [2019-08-27 02:49:59,266] {taskinstance.py:1047} ERROR - unsupported > operand type(s) for +: 'NoneType' and 'int' Traceback (most recent call > last): File > "/usr/local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line > 922, in _run_raw_task > result = task_copy.execute(context=context) > File "/airflow/dags/git/subfolder/my_functions_google.py", line 2502, > in execute > cluster_fields=self.cluster_fields) > File "/airflow/dags/git/subfolder/my_functions_google.py", line 1396, > in run_load > return self.run_with_configuration(configuration) > File "/airflow/dags/git/subfolder/my_functions_google.py", line 1414, > in run_with_configuration > .execute(num_retries=self.num_retries) > File > "/usr/local/lib/python3.7/site-packages/googleapiclient/_helpers.py", line > 130, in positional_wrapper > return wrapped(*args, **kwargs) > File > "/usr/local/lib/python3.7/site-packages/googleapiclient/http.py", line 851, > in execute > method=str(self.method), body=self.body, headers=self.headers) > File > "/usr/local/lib/python3.7/site-packages/googleapiclient/http.py", line 153, > in _retry_request > for retry_num in range(num_retries + 1): TypeError: unsupported > operand type(s) for +: 'NoneType' and 'int' > {noformat} -- This message was sent by Atlassian Jira (v8.3.2#803003)