Kanishk Lohumi created AIRFLOW-4046:
---------------------------------------
Summary: Validate poke_interval and timeout value in Airflow Sensor
Key: AIRFLOW-4046
URL: https://issues.apache.org/jira/browse/AIRFLOW-4046
Project: Apache Airflow
Issue Type: Improvement
Components: operators
Affects Versions: 1.10.2
Reporter: Kanishk Lohumi
Assignee: Kanishk Lohumi
There is no validation being done on poke_interval & timeout values provided to
BaseSensor, this results in ValueError with negative value of poke_interval
when mode is *poke* because time.sleep() doesn't support negative values and
give below error. {{}}
{noformat}
[2019-03-07 11:48:08,182] {models.py:1790} ERROR - sleep length must be
non-negative:cG9rZS1rYW5pc2hrcy1tYnAuY29ycC5hZG9iZS5jb20= Traceback (most
recent call last): File
"/Users/lohumi/Documents/airflow_1.10.2/lib/python3.6/site-packages/airflow/models.py",
line 1659, in _run_raw_task result = task_copy.execute(context=context) File
"/Users/lohumi/Documents/airflow_1.10.2/lib/python3.6/site-packages/airflow/sensors/base_sensor_operator.py",
line 112, in execute sleep(self.poke_interval) ValueError: sleep length must
be non-negative{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)