I am new to airflow and I am trying something simple with GoogleCloudStorageDownloadOperator:
default_args = {
'start_date': airflow.utils.dates.days_ago(0),
'schedule_interval': None,
'retries': 1,
'retry_delay': timedelta(minutes=5),
'params': {
'work_dir': '/tmp'
}
}
dag = DAG(
'foo',
default_args=default_args,
description='This is foobar',
schedule_interval=timedelta(weeks=1),
dagrun_timeout=timedelta(minutes=60))
mock_download = GoogleCloudStorageDownloadOperator(
task_id='download-foo-from-gcp',
bucket='foo-data',
object='{% if (task_instance.pid % 2 == 0) %}foo{% else %}bar{% endif %}/data.tar.gz',
filename='{{ params.work_dir }}/data.tar.gz',
google_cloud_storage_conn_id='google_cloud_default',
dag=dag
)
While I can run this task in PyCharm for example (using airflow test
), it fails all the time when triggered from the web interface (scheduled). The error message in the log is completely useless, to say the least:
...
[2020-01-09 17:04:18,871] {gcs_download_operator.py:86} INFO - Executing download: crunchbase-mock-data, foo/data.tar.gz, /tmp/data.tar.gz
[2020-01-09 17:04:28,751] {logging_mixin.py:112} INFO - [2020-01-09 17:04:28,751] {local_task_job.py:103} INFO - Task exited with return code -6
Can anyone shed any light on this? What the heck is -6 supposed to mean? Is there a way to see a little more details about what happened there?