You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/12/16 01:14:43 UTC
[GitHub] [airflow] happyhuman opened a new issue #13095: Getting an error when using CloudTasksTaskCreateOperator
happyhuman opened a new issue #13095:
URL: https://github.com/apache/airflow/issues/13095
I am trying to create and run a task in Google Cloud Tasks from my composer environment (composer-1.13.3-airflow-1.10.12). The code is somewhat simple:
```
import datetime
from airflow import models
from airflow.providers.google.cloud.operators import tasks
ts = timestamp_pb2.Timestamp()
ts.FromDatetime(datetime.datetime.now() + datetime.timedelta(minutes=10))
with models.DAG(
DAG_NAME,
schedule_interval=None,
start_date=days_ago(1),
tags=TAGS,
) as my_dag:
create_extract_raw_data_task = tasks.CloudTasksTaskCreateOperator(
location=TASK_LOCATION,
queue_name=TASK_QUEUE,
task= {
'app_engine_http_request': {
'http_method': 'GET',
'relative_uri': relative_url
},
'schedule_time': ts,
},
task_name=TASK_NAME,
retry=retry.Retry(maximum=2),
timeout=60,
task_id='my_task_id',
)
```
I am however getting the following error:
```
raceback (most recent call last)
File "/opt/python3.6/lib/python3.6/site-packages/google/api_core/grpc_helpers.py", line 57, in error_remapped_callabl
return callable_(*args, **kwargs
File "/opt/python3.6/lib/python3.6/site-packages/grpc/_channel.py", line 826, in __call_
return _end_unary_response_blocking(state, call, False, None
File "/opt/python3.6/lib/python3.6/site-packages/grpc/_channel.py", line 729, in _end_unary_response_blockin
raise _InactiveRpcError(state
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with
status = StatusCode.INVALID_ARGUMEN
details = "The request deadline is 2020-12-15T17:08:30.110470727-08:00. The deadline cannot be more than 30s in the future.
debug_error_string = "{"created":"@1608080850.425033019","description":"Error received from peer ipv4:142.250.128.95:443","file":"src/core/lib/surface/call.cc","file_line":1061,"grpc_message":"The request deadline is 2020-12-15T17:08:30.110470727-08:00. The deadline cannot be more than 30s in the future.","grpc_status":3}
```
I tried different values for both `start_date` and `schedule_time` and neither one made a difference. I think there may be a bug causing this, since there is not really much to this code to begin with.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] turbaszek commented on issue #13095: Getting an error when using CloudTasksTaskCreateOperator
Posted by GitBox <gi...@apache.org>.
turbaszek commented on issue #13095:
URL: https://github.com/apache/airflow/issues/13095#issuecomment-745959285
@happyhuman have you tried removing timeout setting? Quick googling suggests that it's not only Airflow problem but a problem with task api / libraries.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] happyhuman closed issue #13095: Getting an error when using CloudTasksTaskCreateOperator
Posted by GitBox <gi...@apache.org>.
happyhuman closed issue #13095:
URL: https://github.com/apache/airflow/issues/13095
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] boring-cyborg[bot] commented on issue #13095: Getting an error when using CloudTasksTaskCreateOperator
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #13095:
URL: https://github.com/apache/airflow/issues/13095#issuecomment-745699109
Thanks for opening your first issue here! Be sure to follow the issue template!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] happyhuman commented on issue #13095: Getting an error when using CloudTasksTaskCreateOperator
Posted by GitBox <gi...@apache.org>.
happyhuman commented on issue #13095:
URL: https://github.com/apache/airflow/issues/13095#issuecomment-747580962
Thanks, yeah that helped the issue. I wish the error message was a bit more helpful. :)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org